|
I seem to have come across a bug where castor it generates a
stack overflow, so I'm stuck in a loop somewhere in castor. My stack
trace for it is at the bottom. In my mapping
file I have the following: <class name="com.vort.ads.beans.Project" identity="projectNumber">
<map-to table="prjinfo" />
<field name="projectNumber" type="integer"> <sql name="projectNumber"
type="integer" />
</field>
<field name="systems" type="com.vort.ads.beans.SystemDims"
collection="vector"> <sql
many-key="projectNumber"/>
</field> ..... </class> <class name="com.vort.ads.beans.SystemManuals" identity="id" key-generator="IDENTITY" depends="com.vort.ads.beans.SystemDims">
<map-to table="prjdimsmanual" />
<field name="id" type="integer"> <sql name="id"
type="integer" />
</field>
<field name="system" type="com.vort.ads.beans.SystemDims"> <sql name="systemId"
/>
</field> ..... </class> <class name="com.vort.ads.beans.SystemModelDims"
identity="id" key-generator="IDENTITY" depends="com.vort.ads.beans.SystemDims">
<map-to table="prjdimsmodel" />
<field name="id" type="integer"> <sql name="id"
type="integer" />
</field>
<field name="system" type="com.vort.ads.beans.SystemDims"> <sql name="systemId"
/>
</field> ..... </class <class name="com.vort.ads.beans.SystemDims" identity="id"
key-generator="IDENTITY">
<map-to table="prjdims" />
<field name="id" type="integer"> <sql name="id"
type="integer" />
</field>
<field name="modelDims" type="com.vort.ads.beans.SystemModelDims"> <sql many-key="id"/>
</field>
<field name="manual" type="com.vort.ads.beans.SystemManuals"> <sql many-key="id"/>
</field> ..... </class> Now the only thing is that the modelDims and manual fields
aren't vectors/collections because they are one to one relationships to
SystemDims. When I go to call db.load(Project.class,
new Integer(0)) it just hangs there with nothing being spit out or errors
called or anything, it just overflows. I can't seem to debug it correctly
either to find out where it stops inside castor. Whenever I go to step into
db.load it just spits me to some odd place in my code. Short term fix would be
just make the fields vectors, knowing that there is never going to be more then
one value in there, but I would like to do
"correctly" and be sure that there could only ever be one
value in the code, even the db is setup to allow only one. Thanks for the help, -Nick java.lang.StackOverflowError at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:83) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:1503) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:1430) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:882) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956) at com.mysql.jdbc.Connection.execSQL(Connection.java:1874) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1538) at org.exolab.castor.jdo.engine.SQLEngine.load(SQLEngine.java:1028) at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:694) at org.exolab.castor.persist.LockEngine.load(LockEngine.java:359) at org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:649) at org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:555) at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:761) ß--- a whole
lot of these ---à at org.exolab.castor.persist.LockEngine.load(LockEngine.java:359) at org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:649) at org.exolab.castor.persist.TransactionContext.load(TransactionContext.java:555) at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:761) Exception in thread "main" |
- Re: [castor-dev] unexpected stop... Nick Stuart
- Re: [castor-dev] unexpected stop... Stein M. Eliassen
- Re: [castor-dev] unexpected stop... Bruce Snyder
- Re: [castor-dev] unexpected stop... Nick Stuart
- Re: [castor-dev] unexpected stop... Nick Stuart
