Hi,
I would like to map a Vector of strings into a single VACHAR column.
According to the documentation OJB handles Vectors itself.
I added a field descriptor:
<field-descriptor id="6" name="stringEntries" column="stringEntries"
jdbc-type="VARCHAR"/>
The getter/setter return a List or Vector (tried both)
Storing is fine, the vector contains strings and these are stored as e.g.
[Deutsch, Englisch]
Lookup however fails with IllegalArgumentException i.e.
[org.apache.ojb.broker.util.sequence.SequenceManagerFactory] INFO: Use
sequence manager class: class
org.apache.ojb.broker.util.sequence.SequenceManagerHiLoImpl
[org.apache.ojb.broker.accesslayer.AbstractPoolableConnectionFactory] INFO:
# Create connection pool for JdbcDescriptorKey -1967118950 #
[DEFAULT] ERROR: Error in operation [set] of object
[PersistentFieldPropertyImpl], java.lang.IllegalArgumentException
[DEFAULT] ERROR: Declaring class
[de.intermediate.components.list.ListDefinitionValue]
[DEFAULT] ERROR: Property Name [stringEntries]
[DEFAULT] ERROR: Property Type [java.util.Vector]
[DEFAULT] ERROR: anObject was class
[de.intermediate.components.list.ListDefinitionValue]
[DEFAULT] ERROR: aValue was class [java.lang.String]
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.ojb.broker.metadata.PersistentFieldPropertyImpl.set(Unknown
Source)
Any ideas where I should look further? May this not be possible, or may
this require a special FieldConversion?
Thanks for any suggestions,
Stefan Schl�sser
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>