4 Replies Latest reply on Feb 7, 2011 11:57 PM by Stuart Douglas

    IllegalArgumentException: Not an entity when starting a weld application

    Emeric Kwemou Newbie
      Hi,
      i have a similar problem as the one mentioned here.
      my packaging structure:
      +projectName
        +META-INF
          +context.xml
          +persistence.xml
           +MANIFEST.MF
        +resources
          +css
           +image
        +WEB-INF
            +classes
                +org.some.internal.entities
                +org.some.other.beans
                 +import.sql
             +lib
                 +org.a.jar.file.containing.many.shared.entities.no.persistence.xml
                 +seam.*.jar
                 +postgres.jar
              +beans.xml
               +faces-config.xml
               +web.xml

      There is nothing declared in beans.xml, web.xml and faces-config.

      persistence.xml content:
      [code]   <properties>
               <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
               <property name="hibernate.hbm2ddl.auto" value="create"/>
               <property name="hibernate.show_sql" value="true"/>
               <property name="hibernate.format_sql" value="true"/>
               <property name="hibernate.default_schema" value="schema"/>
               <property name="jboss.entity.manager.factory.jndi.name" value="java:/cm.telpayEntityManagerFactory"/>
            </properties>  [/code] 

      When launching the application,
      [code]i have the following error:     ... 54 more
      Caused by: java.lang.IllegalArgumentException: Not an entity: class cm.the.server.model.Member
           at org.hibernate.ejb.metamodel.MetamodelImpl.entity(MetamodelImpl.java:160) [:3.6.0.Final]
           at org.hibernate.ejb.criteria.QueryStructure.from(QueryStructure.java:138) [:3.6.0.Final]
           at org.hibernate.ejb.criteria.CriteriaQueryImpl.from(CriteriaQueryImpl.java:179) [:3.6.0.Final]
           at cm.telpay.server.data.MemberListProducer.retrieveAllMembersOrderedByName(MemberListProducer.java:45) [:]
           ... 64 more[/code]