1 2 Previous Next 24 Replies Latest reply on May 15, 2006 4:14 AM by kukeltje

    Finding ActionHandlers from within a JbpmService

    wasperen

      I have a running JbpmService in my JBoss Application Server 4. This service is started in the AS at start-up and available through JNDI under name "java:/jbpm/JbpmConfiguration".

      A webapplication (deployed through a .war file) at some point kicks off the execution of a new process. This process uses a number of ActionHandlers. Result:

      13:38:49,651 ERROR [Delegation] couldn't load delegation class '....CreateNewItemHandler'
      java.lang.ClassNotFoundException: class '....CreateNewItemHandler' could not be found by the process classloader
      


      This does make sense because the *.class files for these ActionHandlers are only defined in the .war file. Sticking them into a .jar, placing that in the /server/default/lib folder helps. Now they can be found... But that is not fair!

      In my mind any application specific classes should be isolated into the .war file. How can I tell the JbpmService to also look into /WEB-INF/classes?

      Thanks,
      Willem

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

          afaik you should not use the .sar soultion then, but include the jbpm jar in the .war file. This is not a jBPM issue, but a j2ee classloader spec thing.

          Another solution is to 'go against the spec' and to turn on UCL in JBoss AS. (I hope this works, have not tested it)

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

            So there is no way of letting jBPM know where to look for these classes?

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

              Not yet, the classloader is not extensible, or overridable. There are some remarks in the code to make it more even more flexible than it is now.

              Soest, close by, I live in Utrecht and work in Zeist

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

                Ah, well... Too bad...

                Yeah, Zeist and Soest are only separated by the military airbase Soesterberg --

                My work base is Nieuwegein, next to Utrecht.

                Thanks anyway,
                Regards,
                Willem

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

                  Ordina?

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

                    Nope.
                    PA Consulting Group

                    Management Consultancy -- what does this SOA and BPEL mean for me as a CEO or CIO. That kind of stuff.

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

                      Interesting...

                      but http://www.pa-consulting.com/ show me

                      Advanced Server Hosting
                      Demon Internet Monitoring Site

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

                        Hmmmmm....

                        Look at http://www.paconsulting.com that'll do the trick.

                        willem

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

                          I thought that was a different company since there was no info on bpel on that site. But there is infor on soa. www.paconsulting.nl is wrong as well

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

                            I know. It's one of our many many focus areas...
                            You with a software company in Zeist?

                            • 11. Re: Finding ActionHandlers from within a JbpmService
                              tom.baeyens

                              This is because we use the classloader that loads the jbpm classes as a parent:

                              public static ClassLoader getClassLoader() {
                              return ClassLoaderUtil.class.getClassLoader();
                              }

                              In case of the default .sar packaging on JBoss, the .sar classloader will not see your .war classes.

                              One thing on our todo is make the parent classloader configurable.

                              http://jira.jboss.com/jira/browse/JBPM-653

                              If you would be able to specify the context classloader (Thread.currentThread().getContextClassLoader()), then your problem would be solved, i guess.

                              A workaround option is not to use the .sar packaging to deploy jBPM, but rather to include the jbpm libs (the ones in the .sar) into your .war file.

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

                                Willem,

                                send me a message at ronald apestaartje jbpm punt org and I'll tell you some more

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

                                   

                                  "tom.baeyens@jboss.com" wrote:
                                  A workaround option is not to use the .sar packaging to deploy jBPM, but rather to include the jbpm libs (the ones in the .sar) into your .war file.


                                  I tried this solution with the jbpm war by sticking the 4 jar files into jbpm.war/WEB-INF/lib, and it does not work. I just get a continuous loop of ClassNotFoundExceptions. The following set of log entries just keeps repeating in a loop:
                                  14:35:38,757 INFO [Configuration] processing extends queue
                                  14:35:38,757 INFO [Configuration] processing collection mappings
                                  14:35:38,757 INFO [Configuration] processing association property references
                                  14:35:38,757 INFO [Configuration] processing foreign key constraints
                                  14:35:38,773 INFO [NamingHelper] JNDI InitialContext properties:{}
                                  14:35:38,773 INFO [DatasourceConnectionProvider] Using datasource: java:/LsftSasJbpmDS
                                  14:35:38,773 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Release 10.2.0.1.0 - Production
                                  14:35:38,773 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0
                                  14:35:38,773 INFO [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
                                  14:35:38,773 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
                                  14:35:38,773 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second- level cache is not recommended)
                                  14:35:38,773 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
                                  14:35:38,773 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
                                  14:35:38,773 INFO [SettingsFactory] JDBC batch size: 15
                                  14:35:38,773 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
                                  14:35:38,773 INFO [SettingsFactory] Scrollable result sets: enabled
                                  14:35:38,773 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
                                  14:35:38,773 INFO [SettingsFactory] Connection release mode: auto
                                  14:35:38,773 INFO [SettingsFactory] Default batch fetch size: 1
                                  14:35:38,773 INFO [SettingsFactory] Generate SQL with comments: disabled
                                  14:35:38,773 INFO [SettingsFactory] Order SQL updates by primary key: disabled
                                  14:35:38,773 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
                                  14:35:38,773 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
                                  14:35:38,773 INFO [SettingsFactory] Query language substitutions: {}
                                  14:35:38,789 INFO [SettingsFactory] Second-level cache: enabled
                                  14:35:38,789 INFO [SettingsFactory] Query cache: disabled
                                  14:35:38,789 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
                                  14:35:38,789 ERROR [CommandExecutorThread] java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
                                  14:35:43,789 INFO [STDOUT] Exception in thread "JbpmScheduler"
                                  14:35:43,789 INFO [STDOUT] java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
                                  14:35:43,789 INFO [STDOUT] at java.lang.Class.getDeclaredConstructors0(Native Method)
                                  14:35:43,789 INFO [STDOUT] at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
                                  14:35:43,789 INFO [STDOUT] at java.lang.Class.getConstructor0(Class.java:2640)
                                  14:35:43,789 INFO [STDOUT] at java.lang.Class.newInstance0(Class.java:321)
                                  14:35:43,789 INFO [STDOUT] at java.lang.Class.newInstance(Class.java:303)
                                  14:35:43,789 INFO [STDOUT] at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:327)


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

                                    if you just include the four jbpm jars in the war, you still have to make sure all other ruiquired jars are on the classpath (in this example the ehcache jar)

                                    1 2 Previous Next