db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Litchfield <...@csh.rit.edu>
Subject [SOURCE] Issue #TRQS89 - NPE if referencing local column that does not exist
Date Fri, 06 Dec 2002 15:07:15 GMT
You can view the issue detail at the following URL:
<http://scarab.werken.com/scarab/issues/id/TRQS89>

Type :        Defect
Issue Id :    TRQS89
Reported by: Ben Litchfield
             ben@csh.rit.edu - (ben@csh.rit.edu)

Details:

Summary: NPE if referencing local column that does not exist
Description: When defining a foreign key I mistakenly used a local column that I did not define.
 I got a NPE instead of an error message when running the torque-sql.  I looked at Database(line:444)
and it looks like there is a check to see if the column is not defined but the check causes
a NPE.  Using torque-rc2 release.

See the attached schema file

BUILD FAILED
file:D:/ben/java/kelut/bugspot/build.xml:85: Generation failed. For more informa
tion consult the velocity log, or invoke ant with the -debug flag.
        at org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:579)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
--- Nested Exception ---
java.lang.NullPointerException
        at org.apache.torque.engine.database.model.Database.doFinalInitializatio
n(Database.java:444)
        at org.apache.torque.engine.database.model.AppData.doFinalInitialization
(AppData.java:305)
        at org.apache.torque.engine.database.model.AppData.getDatabase(AppData.j
ava:221)
        at org.apache.torque.task.TorqueDataModelTask.initControlContext(TorqueD
ataModelTask.java:351)
        at org.apache.torque.task.TorqueSQLTask.initControlContext(TorqueSQLTask
.java:204)
        at org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:480)
        at org.apache.tools.ant.Task.perform(Task.java:317)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:334)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
        at org.apache.tools.ant.Main.runBuild(Main.java:610)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 17 seconds
Status: New
Database: Postgresql
Operating system: Windows
Priority: Medium


Mime
View raw message