2 Replies Latest reply on Jul 14, 2005 3:54 PM by fquimbay

    Problem with jboss-4.0.2 and jbpm-1.0.1

    fquimbay

      I have an application that uses jbpm-1.0.1 (jbpm.ear), jbpm.ear internally uses hibernate2 (2.0.3) and to cglib-asm.jar. My application uses hibernate3 (3.0.5). Deploying my application on jboss-4.0.1 I don't have any problem, but when attempt to deploy it on jboss-4.0.2, shows error to me:

      11:32:14,880 ERROR [Db] couldn't configure hibernate session factory properly
      java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.visit(ILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
       at net.sf.cglib.ASMBackend.init(ASMBackend.java:83)
       at net.sf.cglib.ASMBackend.begin_constructor(ASMBackend.java:296)
       at net.sf.cglib.CodeGenerator.begin_constructor(CodeGenerator.java:281)
       at net.sf.cglib.CodeGenerator.begin_constructor(CodeGenerator.java:274)
       at net.sf.cglib.CodeGenerator.generateNullConstructor(CodeGenerator.java:970)
       at net.sf.cglib.KeyFactoryGenerator.generate(KeyFactoryGenerator.java:105)
       at net.sf.cglib.CodeGenerator.define(CodeGenerator.java:163)
       at net.sf.cglib.KeyFactory.create(KeyFactory.java:114)
       at net.sf.hibernate.impl.SessionFactoryImpl.<clinit>(SessionFactoryImpl.java:297)
       at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627)
       at org.jbpm.util.db.Db.configureSessionFactory(Db.java:12)
       ......
       ......
      11:32:14,925 INFO [Configuration] Configuration resource: /organisation.hibernate.cfg.xml
      11:32:14,935 INFO [Configuration] Mapping resource: org/jbpm/workflow/organisation/impl/ActorImpl.hbm.xml
      11:32:14,980 INFO [Binder] Mapping class: org.jbpm.workflow.organisation.impl.ActorImpl -> JBPM_ACTOR
      11:32:14,981 INFO [Binder] Mapping subclass: org.jbpm.workflow.organisation.impl.GroupImpl -> JBPM_ACTOR
      11:32:14,983 INFO [Binder] Mapping subclass: org.jbpm.workflow.organisation.impl.UserImpl -> JBPM_ACTOR
      11:32:14,983 INFO [Configuration] Mapping resource: org/jbpm/workflow/organisation/impl/MembershipImpl.hbm.xml
      11:32:15,055 INFO [Binder] Mapping class: org.jbpm.workflow.organisation.impl.MembershipImpl -> JBPM_MEMBERSHIP
      11:32:15,056 INFO [Configuration] Configured SessionFactory: /hibernate/organisationSessionFactory
      11:32:15,057 INFO [Configuration] processing one-to-many association mappings
      11:32:15,057 INFO [Binder] Mapping collection: org.jbpm.workflow.organisation.impl.GroupImpl.memberships -> JBPM_MEMBERSHIP
      11:32:15,059 INFO [Binder] Mapping collection: org.jbpm.workflow.organisation.impl.GroupImpl.children -> JBPM_ACTOR
      11:32:15,060 INFO [Binder] Mapping collection: org.jbpm.workflow.organisation.impl.UserImpl.memberships -> JBPM_MEMBERSHIP
      11:32:15,060 INFO [Configuration] processing foreign key constraints
      11:32:15,111 ERROR [Db] couldn't configure hibernate session factory properly
      java.lang.NoClassDefFoundError
       at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:627)
       at org.jbpm.util.db.Db.configureSessionFactory(Db.java:12)
       at org.jbpm.workflow.organisation.ejb.impl.OrganisationSessionBean.<clinit>(OrganisationSessionBean.java:152)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       ......
       ......
      

      In log of jboss-4.0.2, it shows the same error to me. The file #$$JBOSS_HOME/server/jbpm/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml>, I have modified it:
       <attribute name="Java2ClassLoadingCompliance">true</attribute>
       <attribute name="UseJBossWebLoader">true</attribute>
      

      so that it are equal to the one of jboss-4.0.1, but the problem is the same one. Which can be the problem? Beforehand, thank you very much.

        • 1. Re: Problem with jboss-4.0.2 and jbpm-1.0.1
          darranl

          Starting from JBoss 4.0.2 Hibernate 3 is installed as standard instead of
          Hibernate 2.

          http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossHibernate

          As your app deploys fine on 4.0.1 and not on 4.0.2, this is where I would start when looking at the problem. One option would be to remove Hibernate 3 and put Hibernate 2 back.

          What is the full structure of your deployment, what archives are where?

          • 2. Re: Problem with jboss-4.0.2 and jbpm-1.0.1
            fquimbay

            Thanks for its answer, but I prefer to continue with hibernate 3, because with hibernate 2 I had other problems. This is the structure of my application:

             $JBOSS_HOME/server/jbpm/deploy/
             |_ jbpm.ear
             |_ WEBModule.war
             |_ HibernateService.sar
             |_ SISModule.jar
             |_ other jars ...
            
             $JBOSS_HOME/server/jbpm/lib
             |_ hibernate3.jar
             |_ ehcache-1.1.jar
             |_ oher jars ...
            

            And inside of jbpm.ear they are the following jars
             c3p0.jar
             cglib.asm.jar
             commons-beanutils.jar
             commons-collections.jar
             commons-dbcp.jar
             commons-lang.jar
             commons-logging.jar
             commons-pool.jar
             dom4j.jar
             hibernate-tools.jar
             hibernate2.jar
             jbpm.jar
             jbpmclient.jar
             odmg.jar
             organisation.jar
             organisationclient.jar
             sequence.jar
             sequenceclient.jar
             utildb.jar
             utilejb.jar
            

            the really peculiar thing is that this same structure of archives works in jboss-4.0.1 but in jboss-4.0.2 does not work.