1 2 Previous Next 24 Replies Latest reply on May 15, 2006 4:14 AM by kukeltje Go to original post
      • 15. Re: Finding ActionHandlers from within a JbpmService
        hosierdm

        Come on now...I'm not that stupid. The ehcache jar file IS one of the 4 jar files in the jbpm sar, and that class is in that jar file. I put that jar file, along with jbpm-3.1.1.jar, jbpm.sar.cfg.jar, and jbpm-identity-3.1.1.jar in the jbpm war's WEB-INF/lib directory. I tested it again, just to make sure I wasn't crazy, and I got the same problem.

        • 16. Re: Finding ActionHandlers from within a JbpmService
          kukeltje

          Sorry, but you did not write that....

          I now see (it was late last night when I responded) that it is a 'no class def found' error. Could it be that there is another version somewhere that is not expected. (just guessing now)

          Ronald

          • 17. Re: Finding ActionHandlers from within a JbpmService
            hosierdm

            I just checked for another version of that jar file and did not find any. I had my server setup to use the sar, and that all worked just fine. All I've done is move those 4 jar files from the sar to the war and removed the sar. And these were both exploded, so there was no rebuilding going on that might have introduced some errors. I'm trying to go with this deployment method because I have action handlers that call some classes from my web application. In order to get the processes to run and interact with my web application, we had to move all of our jar files out of the war and into the server lib directory (which is not desirable). I explain this in order to preempt anyone that might try to tell me to stick with the sar since it was "working". ;)

            • 18. Re: Finding ActionHandlers from within a JbpmService
              hosierdm

              Ok, so I guess I'll never understand how the classloaders work in JBoss. I got the server to stop saying ClassNotFound by moving ehcache.jar from the war to the server lib directory. Then it complained:

              01:55:06,062 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/java/work/sas-server/server/sas/lib/ehcache-1.1.jar!/ehcache-failsafe.xml

              So I moved the jbpm.sar.cfg.jar file that contains the configuration xml files out of the war and into the lib directory. Now everything seems to start up and work just like it did when I was using the sar.

              So I understand why the ehcache stuff could not see the config files in the jbpm.sar.cfg.jar from outside the war, but I have no idea why the server was not able to correctly load the class that it was complaining about when I had everything in the war. Anyway...it's 2AM here in California...I think it's time for bed. Thanks for all the input.

              • 19. Re: Finding ActionHandlers from within a JbpmService
                kukeltje

                Good that it works and thanks for reporting back.

                Still kind of strange that it was a no class def found exception.

                btw, you now mention a class not found exception. I'm still curious what could be the reason of that.

                • 20. Re: Finding ActionHandlers from within a JbpmService
                  hosierdm

                  I didn't mean to say ClassNotFound, I meant NoClassDefFound. But yeah, I don't get it. Although, an idea just popped into my head. If you look at the stack trace, the error originates from a Hibernate class. I had the hibernate jar files in my server lib directory (because that's just how it was when I installed JBoss). So as I understand it, classes inside a war are isolated in that war. So if the Hibernate classes that reside outside the war are trying to setup the 2nd level cache stuff, and I put the jar that supports that (ehcache.jar) in the war, Hibernate won't be able to see that, and thus the error. Which means that instead of moving my jars out of the war, I could probably move the hibernate jars inside the war. I'll test that out.

                  • 21. Re: Finding ActionHandlers from within a JbpmService
                    hosierdm

                    Yup, that worked. So I'm guessing my assessment of the situation was correct. Are we even still on topic for this thread......or have I totally hijacked it!? Sorry about that if I did. ;-)

                    • 22. Re: Finding ActionHandlers from within a JbpmService
                      kukeltje

                      It's hijacked, but from some people I don't mind hijacking :-)

                      You could move the hibernate jars inside the war, but still, a not class def found is different from a class not found exeception. Could it be there is annoter ehcache on the classpath somewhere? maybe an older version?

                      • 23. Re: Finding ActionHandlers from within a JbpmService
                        wasperen

                        I don't mind this hijack at all. These are very helpful discussions.

                        Just a thought (back to the original topic of action handlers): what if I would build an action handler that pulled another (defined through a parameter) classloader, load the class and pass on the execute method?

                        • 24. Re: Finding ActionHandlers from within a JbpmService
                          kukeltje

                          that is exactely what happens when you create an 'ejb' actionhandler which you pass a jndi name, or even a webservice actionhandler or whatever. So your suggestion is a valid one (imo)

                          1 2 Previous Next