Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-312

NPE in generation process

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0
    • 5.0
    • Generator, Templates
    • None

    Description

      In a generation process, the following NPE appeared. Supposed reason is that a foreign key does not have a corresponding local column

      java.lang.NullPointerException
      at org.apache.torque.generator.source.SourceElement$ChildList.add(SourceElement.java:691)
      at org.apache.torque.generator.source.SourceElement$ChildList.add(SourceElement.java:642)
      at java.util.AbstractList.add(AbstractList.java:108)
      at org.apache.torque.templates.transformer.om.OMForeignKeyTransformer.createLocalElementForReference(OMForeignKeyTransformer.java:776)
      at org.apache.torque.templates.transformer.om.OMForeignKeyTransformer.transform(OMForeignKeyTransformer.java:91)
      at org.apache.torque.templates.transformer.om.OMTransformer.transform(OMTransformer.java:168)
      at org.apache.torque.generator.control.Controller.transformSource(Controller.java:547)
      at org.apache.torque.generator.control.Controller.processSourceInOutput(Controller.java:260)
      at org.apache.torque.generator.control.Controller.processOutput(Controller.java:228)
      at org.apache.torque.generator.control.Controller.processGenerationUnit(Controller.java:181)
      at org.apache.torque.generator.control.Controller.run(Controller.java:111)
      at org.apache.torque.generator.maven.TorqueGeneratorMojo.execute(TorqueGeneratorMojo.java:678)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

      Attachments

        Activity

          People

            tfischer Thomas Fox
            tfischer Thomas Fox
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: