Hello,
I have the same problems using JPA 2.0 in Java EE 6.
My entity class looks like this :
Code:
@Entity
@EntityListeners({MultiLangStringEntityListener.class})
@Table(name = "DM_PHYSICAL_PROPERTY")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "DmPhysicalProperty.findAll", query = "SELECT d FROM DmPhysicalProperty d"),
@NamedQuery(name = "DmPhysicalProperty.findByPhysicalPropertyId", query = "SELECT d FROM DmPhysicalProperty d WHERE d.physicalPropertyId = :physicalPropertyId"),
public class DmPhysicalProperty implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_DM_PHYSICAL_PROPERTY")
@SequenceGenerator(name = "SEQ_DM_PHYSICAL_PROPERTY", sequenceName = "SEQ_DM_PHYSICAL_PROPERTY", allocationSize = 1)
@Column(name = "PHYSICAL_PROPERTY_ID")
private String physicalPropertyId;
...
}
An when I call the persist method, I have the following error :
Code:
13:29:11,716 ERROR [org.jboss.ejb3.tx2.impl.CMTTxInterceptor] javax.ejb.EJBTransactionRolledbackException: org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.lang.String
13:29:11,779 ERROR [org.jboss.webservices.integration.invocation.InvocationHandlerEJB3] Method invocation failed with exception: org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.lang.String: javax.ejb.EJBTransactionRolledbackException: org.hibernate.id.IdentifierGenerationException: Unknown integral data type for ids : java.lang.String
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:148) [:0.0.2]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:227) [:0.0.2]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:353) [:0.0.2]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.2]
at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.2]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.2.GA]
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
....
The database used is "Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production".
The same entity code works fine with EclipseLink (JPA 2.0) on GlassFish 3.1.2 Server.
I want to move to JBoss server, I have tested with JBoss 6.1.0 Final (and thus with Hibernate 3.6.6 Final) but I have this error.
I have also tested with GlassFish 3.1.2 and Hibernate 3.5.0-Final with the same error.
What does I have missed ?
Is this a sort of limitation in Hibernate ?
This error is annoying and prevent me to use JBoss application server ...
Best regards,
Laurent