Hi,
I am getting an error using KeyGen. If I remove KeyGen from the mapping
the insert works, If I use Keygen then it blows up on some misterious
NullPoint exception.
Any ideas to resolve the problem would be great help. The obvius
workaround is not to use keygen but I am just wondering is it the tool
or how I use it?
I am running just solo in Junit against Postgresql 7.1, I am not in an
appserver when the error occurs.
Thanks Aron
The Error is:
[junit] Create Service Class: org.theatlantis.configuration.CastorService
[junit] OUT 2002-01-09 15:47:51,104 main [] DEBUG from castor.EBANK - Message:Key
generator HIGH/LOW has been instantiated, parameters: {key-column=tablename,
table=ebankkeys, grab-size=100, value-column=sequence}
[junit] OUT 2002-01-09 15:47:51,131 main [] DEBUG from castor.EBANK - Store
Statement:SQL for creating org.theatlantis.ebank.business.model.UserProfileVO: INSERT
INTO "profile" ("id","externaluserid") VALUES (?,?)
[junit] OUT 2002-01-09 15:47:51,132 main [] DEBUG from castor.EBANK - Store
Statement:SQL for deleting org.theatlantis.ebank.business.model.UserProfileVO: DELETE
FROM "profile" WHERE "id"=?
[junit] OUT 2002-01-09 15:47:51,133 main [] DEBUG from castor.EBANK - Store
Statement:SQL for updating org.theatlantis.ebank.business.model.UserProfileVO: UPDATE
"profile" SET "externaluserid"=? WHERE "id"=? AND "externaluserid"=?
[junit] OUT 2002-01-09 15:47:51,135 main [] DEBUG from castor.EBANK - Store
Statement:SQL for loading org.theatlantis.ebank.business.model.UserProfileVO: SELECT
"profile"."externaluserid" FROM "profile" WHERE "profile"."id"=?
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.847 sec
[junit] org.exolab.castor.jdo.PersistenceException: Nested error:
java.lang.NullPointerException
[junit] at
org.exolab.castor.persist.TransactionContext.create(TransactionContext.java:841)
[junit] at
org.exolab.castor.jdo.engine.DatabaseImpl.create(DatabaseImpl.java:338)
[junit] at
org.theatlantis.ebank.business.AccountManagerDelegate.createUserProfile(AccountManagerDelegate.java:59)
[junit] at
org.theatlantis.business.AccountManagerTest.testUserManagment(AccountManagerTest.java:98)
[junit] at java.lang.reflect.Method.invoke(Native Method)
[junit] at junit.framework.TestCase.runTest(TestCase.java:166)
[junit] at junit.framework.TestCase.runBare(TestCase.java:140)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:131)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:173)
[junit] at junit.framework.TestSuite.run(TestSuite.java:168)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:231)
[junit] at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:409)
Here is my mapping:
<key-generator name="HIGH/LOW">
<param name="table" value="ebankkeys"/>
<param name="key-column" value="tablename"/>
<param name="value-column" value="sequence"/>
<param name="grab-size" value="100"/>
</key-generator>
<!-- Mapping for UserProfile -->
<class name="org.theatlantis.ebank.business.model.UserProfileVO"
identity="userID" key-generator="HIGH/LOW">
<description>User Profile</description>
<map-to table="profile"/>
<field name="userID" type="integer" >
<sql name="id" type="integer"/>
</field>
<field name="externalUserID" type="string">
<sql name="externaluserid" type="char" dirty="check" />
</field>
</class>
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev