This one time, at band camp, Dave Carlson said:
DC>Adding dirty="ignore" to any fields with primitive type or Date fixed the
DC>update() error. (And, yes, I had figured out that update() is only used for
DC>long transactions.)
DC>
DC>However, I still get the null pointer when calling insert().
DC>
DC>Here is a bit more on the error:
DC>
DC>Caused by: org.exolab.castor.jdo.PersistenceException: Nested error:
DC>java.lang.NullPointerException
DC> at org.exolab.castor.persist.TransactionContext.create(Unknown Source)
DC> at org.exolab.castor.jdo.engine.DatabaseImpl.create(Unknown Source)
DC> at com.xmlmodeling.portal.data.PortalUser.insert(PortalUser.java:41)
DC>
DC>The Java classes were generated from an XML Schema using Castor source
DC>generator, so they are a bit verbose to copy relevant parts. Here is the
DC>mapping.xml for the two classes involved in the inheritance. I'm attempting to
DC>insert the subclass, PortalUser.
The NullPointerException stack trace says that PortalUser.java, line
#41 is the problem. What's on that line? When debugging this type of
exception, without the relevant code it's difficult to speculate.
DC><class name="com.xmlmodeling.portal.data.PortalUser" identity="endUserId"
DC>extends="com.xmlmodeling.sentinel.express.EndUserType">
DC><map-to table="Portal_PortalUser" />
DC><field name="endUserId" type="integer" required="true">
DC><sql type="integer" name="EnduserID" />
DC></field>
DC><field name="createDate" type="date">
DC><sql type="timestamp" name="CreateDate" dirty="ignore" />
DC></field>
DC><field name="lastLoginDate" type="date">
DC><sql type="timestamp" name="LastLoginDate" dirty="ignore" />
DC></field>
DC><field name="confirmValue" type="string">
DC><sql type="varchar" name="ConfirmValue" />
DC></field>
DC><field name="emailOptIn" type="boolean">
DC><sql type="integer" name="EmailOptIn" dirty="ignore" />
DC></field>
DC><field name="acceptLicenseHyperModel" type="boolean">
DC><sql type="integer" name="AcceptLicenseHyperModel" dirty="ignore" />
DC></field>
DC><field name="maxUploadSize" type="integer">
DC><sql type="integer" name="MaxUploadSize" dirty="ignore" />
DC></field>
DC></class>
What database are you using? The reason I ask is that there is a problem with
either Oracle or the Oracle JDBC drivers and the way timestamps are handled.
The trouble is with handling of the nanoseconds. This is what could cause the
date fields to be off resulting in the ObjecModifiedException.
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev