1 Reply Latest reply on Jan 26, 2009 3:32 PM by coenos

    weird Tomcat Embed Jboss problem : unknown entity

    coenos

      Hi, I am facing this weird problem when running my Seam app on Embedded Jboss in Tomcat6. It works fine on JBoss 4.2.2.


      When persisting an entity I get the following error:


      
      Caused by: java.lang.IllegalArgumentException: Unknown entity: co.uk.tntpost.umbrella.entity.SimpleExamp
           at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:216)
           at org.jboss.seam.persistence.EntityManagerProxy.persist(EntityManagerProxy.java:137)
           at org.jboss.seam.framework.EntityHome.persist(EntityHome.java:84)
      
      



      But in the startup log I see that the Entity is created:


      
      INFO  [org.hibernate.cfg.AnnotationBinder] Binding entity from annotated class: co.uk.tntpost.umbrella.entity.SimpleExamp
      INFO  [org.hibernate.cfg.annotations.EntityBinder] Bind entity co.uk.tntpost.umbrella.entity.SimpleExamp on table SIMPLE_EXAMP
      
      



      Why is the Entity unknown??


      My List and Home classes do not work either, I get:


      
      Caused by: java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: DistributionPeriod is not mapped [select distributionPeriod from DistributionPeriod distributionPeriod]
           at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:617)
           at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:96)
      
      



      I know this is interrelated. Am I forgetting some config setting on the Tomcat server ???


      Please help,
      Coen