Well, at least the first insert/get works, I really wonder why the second does not.
My understanding is that Castor does a sort of (de)serialization in a String so the char storage should be ok?
Maybe I could use a second table to solve the problem but as the array size is variable the number of columns had to be the max. array size.
Just to illustrate, the following test run starts with an empty table:
C:\java\apps\jdotest>java jdotest store ok, id: 1 test retrieved id: 1 myarray: 1 myarray: 2 myarray: 3 myarray: 4 myarray: 5
C:\java\apps\jdotest>java jdotest
db_ktrans: Castor JDO
store ok, id: 2
JDO queryException: org.exolab.castor.jdo.DataObjectAccessException: Type conver
sion error: could not set value of FieldMolder of test.setmyarray(java.lang.Stri
ng myarray) with value of type java.lang.String
org.exolab.castor.jdo.DataObjectAccessException: Type conversion error: could no
t set value of FieldMolder of test.setmyarray(java.lang.String myarray) with val
ue of type java.lang.String
at org.exolab.castor.persist.FieldMolder.setValue(FieldMolder.java:330)
at org.exolab.castor.persist.ClassMolder.load(ClassMolder.java:720)
at org.exolab.castor.persist.LockEngine.load(LockEngine.java:356)
at org.exolab.castor.persist.TransactionContext.load(TransactionContext.
java:649)
at org.exolab.castor.persist.QueryResults.fetch(QueryResults.java:229)
at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.next(OQLQuer
yImpl.java:697)
at org.exolab.castor.jdo.engine.OQLQueryImpl$OQLEnumeration.next(OQLQuer
yImpl.java:670)
at jdotest.main(jdotest.java:46)
java.lang.IllegalStateException: Transaction org.exolab.castor.jdo.engine.Transa
[EMAIL PROTECTED] does not hold the read lock: test/1/1 -/-!
at org.exolab.castor.persist.LockEngine$TypeInfo.assure(LockEngine.java:
1279)
at org.exolab.castor.persist.LockEngine$TypeInfo.access$500(LockEngine.j
ava:1011)
at org.exolab.castor.persist.LockEngine.revertObject(LockEngine.java:849
)
at org.exolab.castor.persist.TransactionContext.rollback(TransactionCont
ext.java:1720)
at org.exolab.castor.jdo.engine.DatabaseImpl.close(DatabaseImpl.java:255
)
at jdotest.main(jdotest.java:76)
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
