6 Replies Latest reply on Oct 25, 2005 2:32 PM by Gerhard Wittwer

    Create my own Webapp including jBPM Core

    Gerhard Wittwer Newbie

      Hello "oracle" :-)

      I would like to create my own jboss server configuration, called aibp.
      This configuration should contain the jBPM Core jar (jbpm-3.0.1.jar). I don't need the identity module, because I'm developing my own.
      I did the following steps:
      - copy the default serverconfiguration of JBoss 4.0.3 and rename it to aibp
      - create my webapp aibp.war, including the libs in /WEB-INF/lib as descriped in Chapter 5 of jBPM Manual
      - add the jbpm-3.0.1.jar to the same lib folder
      - build the webapp aibp.war
      - copy this war file to the jboss/server/aibp/deploy folder
      - start jboss
      - and getting a lot of exceptions :-(

      So, I'm not familiar how to integrate jars and libs to a own webapplication in J2EE.
      I don't know, what's the sense of the Service Archive in jBPM and how to integrate this in my own application.
      If someone could help me out of this dark tunnel or post a link for a "jBPM and J2EE for Dummies" page I will be very happy!
      Or if someone can post me a link to a preconfigured war, containing jbpm3.0 and all necessary stuff in a valid and deployable state, which I can extend with my jsp's and identity module, I will be very very happy :-)

      Thanks for your help!
      Gerhard

        • 1. Re: Create my own Webapp including jBPM Core
          Ronald van Kuijk Master

          Gerhard,

          If you get lots of errors, at least post them here.

          • 2. Re: Create my own Webapp including jBPM Core
            Gerhard Wittwer Newbie

            Following error is the first on startup server:

            20:31:21,671 DEBUG [ApplicationFactory] New ApplicationFactory instance created
            20:31:21,687 ERROR [[/aibp]] Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
            java.lang.NoClassDefFoundError: org/apache/struts/tiles/DefinitionsFactoryException
             at java.lang.Class.getDeclaredConstructors0(Native Method)
             at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
             at java.lang.Class.getConstructor0(Class.java:1930)
             at java.lang.Class.getConstructor(Class.java:1027)
             at org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:572)
             at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:497)
             at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:215)
             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)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:324)
             at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)


            • 3. Re: Create my own Webapp including jBPM Core
              Ronald van Kuijk Master

              This library is struts.jar. Include it in your web-inf/lib

              • 4. Re: Create my own Webapp including jBPM Core
                Gerhard Wittwer Newbie

                I will do and test it.
                Thank you!

                Could you please explain me the relations between the service archive and the core of jbpm.
                In the jBPM 3 documentation chapter 5 there is only written about the mandatory core jar of jBPM for my own webapp. Who should I handle all the stuff included in the service archive? Or is the service-archive mandatory too?
                If I create a own WAR archive I must copy all the mandatory jars into the web-inf/lib folder. Is it also necessary to copy the jbpm.sar to this web-inf?
                What's the best way to get the database for jBPM. Should I do this with the create.db ant-task?

                And last but not least: What's the sense of the jbpm.sar?

                Many thanks!
                Gerhard

                • 5. Re: Create my own Webapp including jBPM Core
                  Ronald van Kuijk Master

                  the jBPM core is in the services archive. There are some optimizations if you use that . In that case you do not need the jBPM core in your webapp. Only if the .sar cannot be used (e.g. in a standalone tomcat) you need the jbpm core jar in your webarchive or somewhere else on the classpath.

                  • 6. Re: Create my own Webapp including jBPM Core
                    Gerhard Wittwer Newbie

                    Hey Ronald

                    I have a principal question how to work with jBPM:

                    You know I'm doing my diploma stuff and have to work with jBPM 3.0.
                    Now I downloaded the jBPM 3.0 eclipse project and did some training/tests on it. I changed the identity module and some other stuff to see, how it works.
                    But now I have to do a decision: Should I create my own Eclipse project to create the AIBP Webapplication or should I work with the Eclipse project from jBPM and alter this project for my requirements.
                    What is your position for this decision?

                    The work with the jBPM project will be simple, because all configuration stuff is done by you and other developers. The creation of the own project is more complex for me, because I don't know the relations of the jBPM stuff (Service Archive a.s.o). But I don't change the jBPM project, what's the benefit of this solution.
                    What you think, how long does it take to create a own project with all libraries and configuration included? And important for me: how should I integrate the jbpm.sar (just copy the directory to the serverconf?)?

                    Thank you for the patience with a newbie...

                    Gerhard