13 Replies Latest reply on Apr 23, 2010 7:15 AM by Alexei none

    Remote, without hibernate

    koen hermans Newbie

      Hi,

       

      I have a question about Remote access to jBPM data.

       

      Is it possible to have remote access to jBPM without hibernate?

      For example:

      We have a system x and we want to start a workflow from jBPM by using the services (RepositoryService, TaskService, .....). Is this possible? If so, how is this possible?

       

      I'm using jBPM 4.3.

       

      grtz

        • 2. Re: Remote, without hibernate
          koen hermans Newbie

          Hi Alexei,

           

          I like the idea, but when I try your example which is given in a zip-file, "jbpm-rest.zip", I get an error when I try to acces the localhost.

           

          this is the error:

          HTTP Status 500 -


          type Exception report

          message

          description The  server encountered an internal error () that prevented it from  fulfilling this request.

          exception

          javax.servlet.ServletException: Servlet.init() for servlet Jersey REST Service threw exception
               org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
               org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
               org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
               org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
               org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
               java.lang.Thread.run(Thread.java:613)

          root cause

          java.lang.NoClassDefFoundError: org/jbpm/api/Execution
               java.lang.Class.getDeclaredConstructors0(Native Method)
               java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
               java.lang.Class.getConstructors(Class.java:1446)
               com.sun.jersey.server.impl.modelapi.annotation.IntrospectionModeller.createResource(IntrospectionModeller.java:104)
               com.sun.jersey.server.impl.application.WebApplicationImpl.getAbstractResource(WebApplicationImpl.java:430)
               com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:867)
               com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:718)
               com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:449)
               com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:404)
               com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:253)
               com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:521)
               com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:199)
               com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:308)
               com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:471)
               javax.servlet.GenericServlet.init(GenericServlet.java:212)
               org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
               org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
               org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
               org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
               org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
               java.lang.Thread.run(Thread.java:613)

          note The full stack trace of the root cause is  available in the Apache Tomcat/6.0.26 logs.


          Apache Tomcat/6.0.26

           

          Do you have any idea what I did wrong?

           

          Thanks...

           

          Grtz

          • 3. Re: Remote, without hibernate
            Alexei none Apprentice

            but removed jbpm.jar & jdbc driver from lib directory (to reduce archive size to 15M)

            Better checkout from bazaar repository to obtain last version

            • 4. Re: Remote, without hibernate
              koen hermans Newbie

              Still the same error ....

               

              grtz

              • 5. Re: Remote, without hibernate
                Alexei none Apprentice

                How did you deployed it?

                 

                Check if there jbpm.jar in your WEB-INF/lib/ directory and jdbc driver *.jar in apache-tomcat-*/lib

                • 6. Re: Remote, without hibernate
                  koen hermans Newbie

                  with the 'build.xml'-file in Eclipse, in the 'Ant-view'.

                   

                  grtz

                  • 7. Re: Remote, without hibernate
                    Alexei none Apprentice

                    Check property

                    <property name="tomcat.home" value="/home/jump/apache-tomcat-6.0.20"/>

                    in build.xml

                    • 8. Re: Remote, without hibernate
                      koen hermans Newbie

                      I'v allready changed this to my own directory.

                       

                      When I deploy it, it says 'BUILD SUCCESFULL'....

                      • 9. Re: Remote, without hibernate
                        Alexei none Apprentice

                        If this version from repository or from ZIP?

                        • 11. Re: Remote, without hibernate
                          Alexei none Apprentice

                          Dam! Sorry, I should remove it. That's an old zipped version. Do not use it, and by the way,

                           

                          I've removed jbpm.jar & jdbc driver from lib directory (to reduce archive size to 15M)

                          You should get your working copy of this project from bazaar repository. Check this article http://doc.bazaar.canonical.com/latest/en/mini-tutorial/

                          And then set tomcat.home & call ant deploy

                           

                          I'm sure, we cam force it to work

                          • 12. Re: Remote, without hibernate
                            koen hermans Newbie

                            Hi,

                             

                            I'v solved my problem, but now I have another problem . I hope you can help me with this one too.

                             

                            Here is my error:

                             

                            HTTP Status 500 -


                            type Exception report

                            message

                            description The  server encountered an internal error () that prevented it from  fulfilling this request.

                            exception

                            javax.servlet.ServletException: Servlet.init() for servlet Jersey REST Service threw exception
                                 org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                                 org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                                 org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                                 org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                                 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                                 org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                                 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                                 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
                                 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
                                 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                                 java.lang.Thread.run(Thread.java:637)

                            root cause

                            com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
                                 com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:849)
                                 com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:718)
                                 com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:449)
                                 com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:404)
                                 com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:253)
                                 com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:521)
                                 com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:199)
                                 com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:308)
                                 com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:471)
                                 javax.servlet.GenericServlet.init(GenericServlet.java:212)
                                 org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
                                 org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
                                 org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
                                 org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
                                 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
                                 org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
                                 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
                                 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
                                 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
                                 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
                                 java.lang.Thread.run(Thread.java:637)

                            note The full stack trace of the root cause is  available in the JBoss Web/2.1.1.GA logs.


                            JBoss Web/2.1.1.GA

                             

                            I've searched the internet, but I couldn't find a solution. Do you know what's wrong?

                             

                            grtz

                            • 13. Re: Remote, without hibernate
                              Alexei none Apprentice

                              Would you plz deploy it on tomcat. Cause I didnt tested it on jboss. And, actually, I'm not sure, that you deployed WAR on Jboss correctly.