5 Replies Latest reply on Oct 25, 2005 9:02 AM by Farinaz Ghasemi

    A problem with jbpm.war deployment in JBOSS

    Farinaz Ghasemi Newbie

      Dear all,

      I want to deploy jbpm.war application to JBOSS ,
      I put the file in :
      ..\jboss-4.0.2\server\all\deploy, directory but I recieved the following exception:

      java.lang.NoClassDefFoundError: org/apache/commons/collections/ArrayStack
      at org.apache.commons.digester.Digester.(Digester.java:185)
      at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.(DigesterFacesConfigUnmarshallerImpl.java:61)
      at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:196)
      at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:105)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:88)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      ..............................


      I didn't modify any files just copy the jbpm.war from ..\jbpm-server\server\jbpm\deploy, directory and pasted it in the dircetory above
      and I didn't modify database settings either.the database is still hypersonic.
      what are jbpm extra settings since the jbpm.war application works on jbpm-server correctly and I can see the login.jsp page
      Would you please kindly help me?
      I need your urgent help please

        • 1. Re: A problem with jbpm.war deployment in JBOSS
          Ronald van Kuijk Master

          what version of JBoss? jBPM assumes commons-collections is already available in it. Look for that...

          • 2. Re: A problem with jbpm.war deployment in JBOSS
            Farinaz Ghasemi Newbie

            Dear Ronald,
            Thank you for your quick response,
            No the commons-collection was not exist in the lib directory I added the file myself,I also add the jbpm-3.0.jar,jbpm.sar.cfg,jbpm-identity-3.0 to
            WEB-INF>lib directory and war it again and put it in..\jboss-4.0.2\server\all\deploy but now I recive these new exceptions:
            ERROR [[/jbpm]] StandardWrapper.Throwable
            java.lang.ExceptionInInitializerError
            at org.jbpm.scheduler.impl.Scheduler.start(Scheduler.java:20)
            at org.jbpm.scheduler.impl.SchedulerServlet.init(SchedulerServlet.java:66)
            at javax.servlet.GenericServlet.init(GenericServlet.java:211)
            at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
            ........................
            ERROR [[/jbpm]] Servlet /jbpm threw load() exception
            java.lang.ExceptionInInitializerError
            at org.jbpm.scheduler.impl.Scheduler.start(Scheduler.java:20)
            at org.jbpm.scheduler.impl.SchedulerServlet.init(SchedulerServlet.java:66)
            at javax.servlet.GenericServlet.init(GenericServlet.java:211)
            at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
            ......................................................

            I don't know what is wrong?
            I'm going to get mad I am studying and working on JBPM for a month all alone and I can't run at least one real JBPM application yet and the project manager realy is not in the mood of my justifies
            I'll be so thankful if you can help me
            Regards,

            • 3. Re: A problem with jbpm.war deployment in JBOSS
              Farinaz Ghasemi Newbie

              Dear friends,
              I thought may be both of the exception are caused by jbpm.properties but I lookd for it and I found it in jbpm.sar.cfg.jar and I saw both these lines:
              jbpm.session.factory.jndi.name=java:/jbpm/JbpmSessionFactory
              and:
              jbpm.scheduler.service.factory=org.jbpm.scheduler.impl.SchedulerServiceImpl
              so what is wrong?
              what shall I do?
              please let me now if you have the same exceptions
              I'll be so appreciate

              • 4. Re: A problem with jbpm.war deployment in JBOSS
                Niral Jhjaveri Newbie

                Hi,

                I am new to JBPM.

                I am also getting this error java.lang.ExceptionInInitializerError

                I have all the Jar files in C:/WebSphere/classes dir and the property files in C:/WebSphere/properties.

                These are in the server runtime classpath.

                It fails when i try tp create a new configuration

                Configuration configuration = JbpmSessionFactory.createConfiguration();

                It fails right on this line.Can someone please advise.What should i be doing.
                Is it rewuired to put all the JBPM re;lated jar files in the /lib folder of the app?

                Any help is greatly appreciated.


                • 5. Re: A problem with jbpm.war deployment in JBOSS
                  Farinaz Ghasemi Newbie

                  Dear friend I asked the same question from one of JBPM developers and here is his kind reply:

                  What you really need is to have some component build a jBPM session factory and bind it in JNDI.

                  If you are using JBoss AS, the most convenient way is the jBPM service archive. Open the Ant build file, build.xml, in the base directory of your jBPM distribution. Run target build.service.archive. Now locate file build/jbpm.sar and deploy that to JBoss. Upon startup,
                  this component will bind the jBPM session factory into JNDI and use JBoss' default data source as its database. If you need to change that, open file
                  src/resources/jbpm.sar/jbpm.hibernate.properties and set the JDBC connection parameters to suit your environment. See chapter 4 of the Hibernate
                  reference manual for more information:
                  http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html
                  ****************************
                  and I can add some additional expalnations:
                  what ever your data base is you need to create a data base e.g jbpmtest anf edit its configuration information in hibernate.cfg.xml or hibernate.properties
                  then you should use these snippet of code:
                  public static Configuration getTestConfiguration() {
                  Configuration configuration = JbpmSessionFactory
                  .createConfiguration("hibernate.cfg.xml");
                  return configuration;
                  }
                  then:
                  public static synchronized JbpmSessionFactory getJbpmSessionFactory() {
                  if (! isJbpmSessionFactoryInitialized) {
                  isJbpmSessionFactoryInitialized = true;

                  Configuration configuration = getTestConfiguration();

                  jbpmSchema = new JbpmSchema(configuration);
                  jbpmSchema.createSchema();
                  try {
                  jbpmSessionFactory = JbpmSessionFactory.buildJbpmSessionFactory(configuration);
                  } catch (RuntimeException e) {
                  e.printStackTrace();
                  throw e;
                  }
                  }
                  return jbpmSessionFactory;
                  }
                  hope it helps!