4 Replies Latest reply on Apr 26, 2006 9:08 AM by Koen Aers

    Sample web app on jboss-4.0.3SP1

    Raja Mohan Newbie

      I am trying to deploy the jbpm.war on a plain jboss-4.0.3SP1 server ( not in the starters kit). I copied all the jars from the sar(service archive) and included it as part of /WEB-INF/lib in the war file.

      But during startup the server throws the following error

      14:22:49,086 INFO [STDOUT] java.lang.NoClassDefFoundError: net/sf/ehcache/Cache
      Exception
      14:22:49,086 INFO [STDOUT] at java.lang.Class.getDeclaredConstructors0(Nati
      ve Method)
      14:22:49,086 INFO [STDOUT] at java.lang.Class.privateGetDeclaredConstructor
      s(Class.java:1618)
      14:22:49,086 INFO [STDOUT] at java.lang.Class.getConstructor0(Class.java:19
      30)
      14:22:49,096 INFO [STDOUT] at java.lang.Class.newInstance0(Class.java:278)
      14:22:49,096 INFO [STDOUT] at java.lang.Class.newInstance(Class.java:261)
      14:22:49,096 INFO [STDOUT] at org.hibernate.cfg.SettingsFactory.createCache
      Provider(SettingsFactory.java:327)
      14:22:49,096 INFO [STDOUT] at org.hibernate.cfg.SettingsFactory.buildSettin
      gs(SettingsFactory.java:219)
      14:22:49,096 INFO [STDOUT] at org.hibernate.cfg.Configuration.buildSettings
      (Configuration.java:1823)
      14:22:49,096 INFO [STDOUT] at org.hibernate.cfg.Configuration.buildSessionF
      actory(Configuration.java:1143)
      14:22:49,096 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceServiceF
      actory.getSessionFactory(DbPersistenceServiceFactory.java:90)
      14:22:49,096 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.
      getSessionFactory(DbPersistenceService.java:74)
      14:22:49,096 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.
      getSession(DbPersistenceService.java:78)
      14:22:49,096 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.
      getSchedulerSession(DbPersistenceService.java:243)
      14:22:49,096 INFO [STDOUT] at org.jbpm.JbpmContext.getSchedulerSession(Jbpm
      Context.java:419)
      14:22:49,096 INFO [STDOUT] at org.jbpm.scheduler.impl.SchedulerThread.execu
      teTimers(SchedulerThread.java:103)
      14:22:49,096 INFO [STDOUT] at org.jbpm.scheduler.impl.SchedulerThread.run(S
      chedulerThread.java:70)


      And also I am not able to view the first page of the sample application

      Am i missing something here, or is there any additional configuration which needs to be performed

        • 1. Re: Sample web app on jboss-4.0.3SP1
          Raja Mohan Newbie

          I even wrote a InitializationServlet which binds the "JbpmConfiguration" object to "java:/jbpm/JbpmConfiguration" jndi name.
          (The readme file in starters kit, specifies that the jbpm service archive binds the JbpmSessionFactory onto a jndi name. But the Mbean binds the JbpmConfiguration object. )

          After this step I get the following error

          javax.faces.FacesException: Cannot get value for expression '#{userBean.userSelectItems}'
           org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
           org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
           org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
           org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
           org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
           org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:46)
           org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
           org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
           org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
           org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
           org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


          Am I missing some obvious point here ?? Or is there a problem with running the sample jbpm web app on jboss 4.0.3Sp1

          Thanks in advance
          Jbpm Beginner

          • 2. Re: Sample web app on jboss-4.0.3SP1
            Alejandro Guizar Master

            Try adding ehcache-1.1.jar from lib/hibernate. You should probably move the entire jbpm.sar directory to your JBoss installation rather than adding the classes to every web application that uses jBPM.

            The stack trace you posted seems incomplete - is there a cause printed below?

            • 3. Re: Sample web app on jboss-4.0.3SP1
              Raja Mohan Newbie

              Alex, Thanks for your quick reply

              My ultimate aim is to run the jbpm sample webapp on Websphere. I thot it would be better if I am able to make a war in plain vanilla jboss and then drop it onto Websphere.

              But still I am not able to get rid of all dependencies. The root cause of the exception which I am getting is pasted below.

              10:40:49,320 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
              javax.faces.FacesException: Cannot get value for expression '#{userBean.userSele
              ctItems}'
               at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
              h(ServletExternalContextImpl.java:421)
               at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspV
              iewHandlerImpl.java:234)
               at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:
              300)
               at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
              icationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
              ilterChain.java:173)
               at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
              atcher.java:672)
               at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
              tionDispatcher.java:463)
               at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
              ispatcher.java:398)
               at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
              patcher.java:301)
               at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.j
              ava:693)
               at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
              a:660)
               at org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:46)
               at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
               at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
              .java:322)
               at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
              14)
               at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
              icationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
              ilterChain.java:173)
               at org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFi
              lter.java:55)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
              icationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
              ilterChain.java:173)
               at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
              icationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
              ilterChain.java:173)
               at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
              icationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
              ilterChain.java:173)
               at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
              lter.java:81)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
              icationFilterChain.java:202)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
              ilterChain.java:173)
               at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
              alve.java:213)
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
              alve.java:178)
               at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrinc
              ipalValve.java:39)
               at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
              yAssociationValve.java:159)
               at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
              e.java:59)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
              ava:126)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
              ava:105)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
              ve.java:107)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
              a:148)
               at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
              :856)
               at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
              ssConnection(Http11Protocol.java:744)
               at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
              int.java:527)
               at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
              kerThread.java:112)
               at java.lang.Thread.run(Thread.java:534)
              Caused by: org.apache.jasper.JasperException: Cannot get value for expression '#
              {userBean.userSelectItems}'
               at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
              .java:370)
               at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
              14)
               at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
               at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
              icationFilterChain.java:252)
               at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
              ilterChain.java:173)
               at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
              atcher.java:672)
               at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
              tionDispatcher.java:463)
               at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
              ispatcher.java:398)
               at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
              patcher.java:301)
               at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
              h(ServletExternalContextImpl.java:415)
               ... 46 more


              The CacheException persists even after i include the ehcache1.1.jar from the lib/hibernate folder

              • 4. Re: Sample web app on jboss-4.0.3SP1
                Koen Aers Master

                I think this could be a binary incompatibility between the JSF jars against which the jBPM webapp was build and the ones shipped in 4.0.3SP1. Try to build the jBPM webapp with the dependencies you find in 4.0.3SP1. You will have to do the same thing anyway if you want to deploy on Websphere...

                Regards,
                Koen