Tag Archives: JPA

Hibernate Search and Glassfish

Problem: Using Hibernate Search in combination with Glassfish throws following Exception:

Solution: Add an additional

to your persitence.xml in order to use Hibernate JPA for Persistence Management.

Posted in Java, JavaEE | Tagged , , , , | Leave a comment

org.hibernate.MappingException: property mapping has wrong number of columns

Problem: When deploying a persistence unit (jar, jar within ear), Exception is thrown: org.hibernate.MappingException: property mapping has wrong number of columns Solution: Check data types of your Entity Bean, and change any Object to something else, e.g. String Further information: … Continue reading

Posted in Java, JavaEE, JPA | Tagged , , , , , , | 6 Comments

NoClassDefFoundError while deploying EAR

Problem: When deploying an EAR (enterprise archive file) to an application server like JBOSS, java.lang.NoClassDefFoundError is thrown. Solution: Fix your EAR package structure. Further information: All projects/files have been created with Eclipse application.ear: Exported “Enterprise Application Project” app-ejb.jar: Exported “Enterprise … Continue reading

Posted in Java, JavaEE | Tagged , , , , , , , , | 1 Comment

EJB ClassCastException

Problem: [Ljava.lang.Object; cannot be cast to x.y.z.beanEJB: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to x.y.z.beanEJB Solution: Add a “SELECT” statement to your (named) query. e.g. change : FROM beanEJB e INNER JOIN e.tags AS t WHERE t LIKE :ttt to SELECT … Continue reading

Posted in JPA | Tagged , , , , , , | Leave a comment