1 Reply Latest reply on Nov 29, 2008 12:11 PM by Fratiman Vladut

    error with hibbernate - entity class not found

    Fratiman Vladut Newbie

      Work to an project based on adobe flex on client side, and java with hibernate at server side.
      Anyway, am not an expert on java or jboss.
      So i have installed on my windows desktop, eclipse with java 1.6, and jboss 4.2.3 GA. In my project i have hibernate with class mapping to table into an database. Everything work well.
      Now i want to move my application to my server that is freebsd 7.0
      So i installed jboss 4.2.2 GA and java 1.5 (that is in ports collection).
      Jboss start without any problem, so next i move my application into deploy directory. When i start jboss, i receive these errors:

      22:34:23,700 ERROR [[/flex]] StandardWrapper.Throwable
      java.lang.ExceptionInInitializerError
       at flex.data.assemblers.HibernateManager.createSessionFactory(HibernateManager.java:67)
       at flex.data.assemblers.HibernateManager.<init>(HibernateManager.java:45)
       at flex.data.assemblers.HibernateAssembler.setHibernateManager(HibernateAssembler.java:414)
      ....................................................
      Caused by: org.hibernate.MappingException: entity class not found: spa.Service.vo.Marcatb
       at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:99)
       at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:168)
       at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:44)
       at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:123)
       at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
       at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
       at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
       at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
       at flex.data.assemblers.HibernateManager.createSessionFactory(HibernateManager.java:52)
       ... 149 more
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: spa.Service.vo.Marcatb
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:164)
       at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
       at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:96)
       ... 158 more
      22:34:23,748 ERROR [[/flex]] Servlet /flex threw load() exception
      java.lang.ClassNotFoundException: No ClassLoaders found for: spa.Service.vo.Marcatb
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:521)
       at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:164)
       at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
       at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:96)
      .............................................
      
      

      There, "spa.Service.vo.Marcatb", is my custom class.
      My classes are simple, with variable declaration, setter and getter methods. I have tables created into mysql database.
      Where is the problem?