openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukas Ruetz <>
Subject Re: How to set the type of the DB-field using @Externalizer
Date Tue, 10 Apr 2007 15:53:48 GMT

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.

 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="" version="1.0">
  <persistence-unit name="openjpa" transaction-type="RESOURCE_LOCAL">
      <property name="openjpa.ConnectionURL" 
      <property name="openjpa.ConnectionDriverName" 
      <property name="openjpa.ConnectionUserName" value="postgres"/>
      <property name="openjpa.ConnectionPassword" value=""/>
      <property name="openjpa.Log" value="DefaultLevel=TRACE, Tool=TRACE"/>

Anything else where I could look first?


View raw message