Hi! Am Dienstag, 10. April 2007 17:01 schrieb Abe White: > > I'm trying to use the @Externalizer annotation but have problems > > with the resulting type of the DB-field - it's always a byte-array. > > You shouldn't need the @Type annotation -- the type will be inferred > > from the return type of the externalizer method. Are you dropping > the database table in between attempts? It's possible that if your > first attempt resulted in a byte array column because of some > misconfiguration, OpenJPA will think it is supposed to reuse that > column on subsequent mapping attempts, because technically it can fit > anything in a byte-array column.
I always drop the tables between my attempts. I have also tried to drop the whole DB but that doesn't help. for @Persistent @Externalizer("toString") private URI uri; the mapping-tool prints out: "uri" has mapping strategy "org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy" There are no warning or erros that say that there's something wrong. Here is my META-INF/persistence.xml : <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"> <persistence-unit name="openjpa" transaction-type="RESOURCE_LOCAL"> <class>domain.JPATest</class> <properties> <property name="openjpa.ConnectionURL" value="jdbc:postgresql://localhost/jpatest"/> <property name="openjpa.ConnectionDriverName" value="org.postgresql.Driver"/> <property name="openjpa.ConnectionUserName" value="postgres"/> <property name="openjpa.ConnectionPassword" value=""/> <property name="openjpa.Log" value="DefaultLevel=TRACE, Tool=TRACE"/> </properties> </persistence-unit> </persistence> Anything else where I could look first? Thanks Lukas