openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garpinc <>
Subject Re: @javax.persistence.ElementCollection instead of @org.apache.openjpa.persistence.PersistentCollection I get exception
Date Fri, 31 Aug 2012 21:00:56 GMT
After further investigation I found that it has nothing to do with the
ElementCollection or PersistentCollection.
The mapping that was working simply was erroneously leaving out the
problematic column.

I fixed the annotation so it's now as follows:
	public java.util.Collection<org.openanzo.rdf.URI> getImage() throws
org.openanzo.rdf.jastor.JastorException {

The table is now being created correctly but at runtime I'm getting a
ClassCastException at line 1300 in DBDictionary

                    setClobString(stmnt, idx, (String) val, col);

val is an instance of org.openanzo.rdf.URI which I passed into openjpa
config with:

+ Duration.class.getName() + "=" + DurationValueHandler.class.getName() +
"," + URI.class.getName() + "=" + URIValueHandler.class.getName() + "'");

But I can't seem to find where in the code it's supposed to apply that value
URIValueHandler to create val which could then be cast to a String. 

If anyone has any ideas it would be greatly appreciated.

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message