Dear all,

I received this exception when executing a entitymanager.persist.

org.apache.openjpa.persistence.ArgumentException: Attempt to cast
instance "[EMAIL PROTECTED]" to
PersistenceCapable failed.  Ensure that it has been enhanced.

Why does this occur? How do I solve it? This same code works with
other persistency provider? What makes it different in OpenJPA?

This is my persistence.xml snippets:
   <persistence-unit name="openjpaPU">
        
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
        <class>com.taxandtech.lab.faces.bean.Department</class>
        <properties>
                <property name="openjpa.ConnectionURL"
value="jdbc:mysql://localhost:3306/test"/>
                <property name="openjpa.ConnectionDriverName"
value="com.mysql.jdbc.Driver"/>
                <property name="openjpa.ConnectionUserName" value="joshua"/>
                <property name="openjpa.ConnectionPassword" value="password"/>
                <property name="openjpa.Log" value="DefaultLevel=INFO, 
Tool=INFO"/>
                <property name="openjpa.jdbc.SynchronizeMappings"
value="buildSchema(ForeignKeys=true)"/>
        </properties>
   </persistence-unit>

Thanks in advance

--
Let's create a highly maintainable and efficient code

YM!: thejavafreak
Blog: http://www.nagasakti.or.id/roller/joshua/

Reply via email to