Ok, found an odd one here. Nothing to do with Castor, but I think it
should be known. I'm using mysql 4.1.11 on my laptop here for dev
purposes, and there seems to be a problem with the reported fields
coming back from mysql.

In SQLEngine around line 963 (the for loop) I get the following exception:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
        at org.exolab.castor.jdo.engine.SQLEngine.store(SQLEngine.java:964)
        at org.exolab.castor.jdo.engine.SQLEngine.store(SQLEngine.java:826)
        at org.exolab.castor.persist.ClassMolder.store(ClassMolder.java:1622)
        at org.exolab.castor.persist.LockEngine.store(LockEngine.java:760)
        at 
org.exolab.castor.persist.TransactionContext.prepare(TransactionContext.java:1598)
        ... 47 more

The following SQL is being generated:
SELECT 
prjsystems.systemName,prjsystems.zipCode,prjsystems.projectId,prjsystems.sized,prjsystems.metric,prjsiteinfo.id
FROM prjsystems LEFT OUTER JOIN prjsiteinfo ON
prjsystems.id=prjsiteinfo.systemId WHERE prjsystems.id=?

which correctly shows the 6 fields needed for StdSystem (not sure why
the join is there but it is). Anyways, I threw some extra logging in
there and got this:

 DEBUG http-8084-Processor22 org.exolab.castor.jdo.engine.SQLEngine -
Got a total of 22 to check/store.
 DEBUG http-8084-Processor22 org.exolab.castor.jdo.engine.SQLEngine -
Getting field value for systemName
 DEBUG http-8084-Processor22 org.exolab.castor.jdo.engine.SQLEngine -
Getting field value for zipCode
 DEBUG http-8084-Processor22 org.exolab.castor.jdo.engine.SQLEngine -
Getting field value for projectId
 DEBUG http-8084-Processor22 org.exolab.castor.jdo.engine.SQLEngine -
Getting field value for sized
 DEBUG http-8084-Processor22 org.exolab.castor.jdo.engine.SQLEngine -
Getting field value for metric
 DEBUG http-8084-Processor22 org.exolab.castor.jdo.engine.SQLEngine -
Getting field value for id
<exception here>

Whats odd is the 22 there is from fields.length, thats how many fields
are reported as being needed/returned...hmm, thats not quite right!! I
dont think this is a connector/j issue. Tried both 3.1 and 3.0 series,
both with the same results. AND if I change the config around to use
another database, it works perfectly fine (all the same libs/src
everything)!

 Anyone else seen any thing like this?!? Guess its time to update
MySQL on my laptop. :(

-Nick

-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to