1 2 Previous Next 24 Replies Latest reply on Jul 22, 2009 2:35 AM by contactnagesh

    Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA

    mrhightech

      I am trying to deploy jbpm-3.1.3 to jboss as 4.0.5ga.
      Thus far, i have only managed to deploy the sar. The war gives the following exception :

      18:51:20,421 INFO [SchedulerThread] runtime exception while executing timers
      org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1418)
      at org.hibernate.cfg.Configuration.configure(Configuration.java:1352)
      at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:90)
      at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:68)
      at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
      at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
      at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
      at org.jbpm.persistence.db.DbPersistenceService.getSchedulerSession(DbPersistenceService.java:254)
      at org.jbpm.JbpmContext.getSchedulerSession(JbpmContext.java:529)
      at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread.java:104)
      at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:71)
      Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory
      at org.dom4j.io.SAXReader.read(SAXReader.java:484)
      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1408)
      ... 10 more


      The contents of the hibernate.cfg.xml are as per the distribution, I have not changed anything.

      Thanks!

      Daniel

        • 1. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
          zauberlehrling

          Hi Daniel,

          I have the same problem with jboss-4.0.5.GA and jbpm-3.1.2.
          In contrast to this I was able to deploy the war- and the sar-file to jboss-4.0.3.SP1 .

          Thanks and regards,

          Frank

          • 2. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
            mrhightech

            has the dtd changed between versions? Cause it does seem like a parsing error raised by sax itself...

            Suggestions anyone ?

            • 3. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA

              So, I was having the same problems with 3.1.3 and 5.0.4.GA but wasn't entirely convinced it was not my fault for not copying all the right stuff. So I copied the jbpm folder/directory from the starter kit and placed it alongside my "default" folder/directory in my 5.0.4.GA installation and did a run -c jbpm, and got a different error:

              07:58:45,274 DEBUG [JbpmService] binding 'org.jbpm.JbpmConfiguration@157b39f' to 'java:/jbpm/JbpmConfiguration'
              07:58:45,289 DEBUG [JbpmService] Started jboss.jbpm:name=DefaultJbpm,service=JbpmService
              07:58:45,399 WARN [ServiceController] Problem starting service jboss.mq:service=StateManager
              java.lang.NoSuchMethodError: org.jboss.util.timeout.Timeout.cancel()V
               at org.jboss.tm.TransactionImpl.cancelTimeout(TransactionImpl.java:1359)
               at org.jboss.tm.TransactionImpl.completeTransaction(TransactionImpl.java:1179)
               at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:359)
               at org.jboss.tm.TxManager.commit(TxManager.java:224)
               at org.jboss.mq.sm.jdbc.JDBCStateManager$JDBCSession.close(JDBCStateManager.java:630)
              ....
              




              07:59:10,805 INFO [STDOUT] Exception in thread "JbpmCommandExecutor"
              07:59:10,821 INFO [STDOUT] java.lang.NoClassDefFoundError: org/dom4j/DocumentException
              07:59:10,821 INFO [STDOUT] at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:84)
              07:59:10,821 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:68)
              07:59:10,821 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
              07:59:10,836 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
              ...
              


              07:59:11,211 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
              
              --- MBeans waiting for other MBeans ---
              ObjectName: jboss.mq:service=StateManager
               State: FAILED
               Reason: java.lang.NoSuchMethodError: org.jboss.util.timeout.Timeout.cancel()V
               I Depend On:
               jboss.jca:service=DataSourceBinding,name=DefaultDS
               Depends On Me:
               jboss.mq:service=DestinationManager
              
              ObjectName: jboss.mq:service=PersistenceManager
               State: FAILED
               Reason: java.lang.NoSuchMethodError: org.jboss.util.timeout.Timeout.cancel()V
               I Depend On:
               jboss.jca:service=DataSourceBinding,name=DefaultDS
               Depends On Me:
               jboss.mq:service=DestinationManager
              
              --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
              ObjectName: jboss.mq:service=StateManager
               State: FAILED
               Reason: java.lang.NoSuchMethodError: org.jboss.util.timeout.Timeout.cancel()V
               I Depend On:
               jboss.jca:service=DataSourceBinding,name=DefaultDS
               Depends On Me:
               jboss.mq:service=DestinationManager
              
              ObjectName: jboss.mq:service=PersistenceManager
               State: FAILED
               Reason: java.lang.NoSuchMethodError: org.jboss.util.timeout.Timeout.cancel()V
               I Depend On:
               jboss.jca:service=DataSourceBinding,name=DefaultDS
               Depends On Me:
               jboss.mq:service=DestinationManager
              ...
              


              07:59:12,321 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 59s:797ms
              07:59:15,789 INFO [STDOUT] Exception in thread "JbpmScheduler"
              07:59:15,805 INFO [STDOUT] java.lang.NoClassDefFoundError: org/dom4j/DocumentException
              07:59:15,805 INFO [STDOUT] at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:84)
              07:59:15,805 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:68)
              07:59:15,821 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
              07:59:15,821 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
              07:59:15,821 INFO [STDOUT] at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
              ...
              


              Not sure this is a valid test, but I think it show's there is something fundamentally different between the starter-kit and 4.0.5.GA

              • 4. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA

                Okay, ignore my last post, I don't think that's a valid test. So here's what I think the problem is. 5.0.4.GA uses

                [org.hibernate.cfg.Environment] Hibernate 3.2.0.ga

                while the starter kit is using
                [Environment] Hibernate 3.1


                So the hibernate.cfg.xml must be changed to work for 3.2.

                How to do that? Not sure yet, but I am looking into it.

                Dave

                • 5. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                  zauberlehrling

                  As I understand a ClasscastException is raised at line 435 in the class SAXReader,
                  this exception is caught at line 468 and again a DocumentException is thrown at line 484:

                  433 public Document read(InputSource in) throws DocumentException {
                  434 try {
                  435 XMLReader reader = getXMLReader();
                  436
                  437 reader = installXMLFilter(reader);
                  438
                  439 EntityResolver thatEntityResolver = this.entityResolver;
                  440
                  441 if (thatEntityResolver == null) {
                  442 thatEntityResolver = createDefaultEntityResolver(in
                  443 .getSystemId());
                  444 this.entityResolver = thatEntityResolver;
                  445 }
                  446
                  447 reader.setEntityResolver(thatEntityResolver);
                  448
                  449 SAXContentHandler contentHandler = createContentHandler(reader);
                  450 contentHandler.setEntityResolver(thatEntityResolver);
                  451 contentHandler.setInputSource(in);
                  452
                  453 boolean internal = isIncludeInternalDTDDeclarations();
                  454 boolean external = isIncludeExternalDTDDeclarations();
                  455
                  456 contentHandler.setIncludeInternalDTDDeclarations(internal);
                  457 contentHandler.setIncludeExternalDTDDeclarations(external);
                  458 contentHandler.setMergeAdjacentText(isMergeAdjacentText());
                  459 contentHandler.setStripWhitespaceText(isStripWhitespaceText());
                  460 contentHandler.setIgnoreComments(isIgnoreComments());
                  461 reader.setContentHandler(contentHandler);
                  462
                  463 configureReader(reader, contentHandler);
                  464
                  465 reader.parse(in);
                  466
                  467 return contentHandler.getDocument();
                  468 } catch (Exception e) {
                  469 if (e instanceof SAXParseException) {
                  470 // e.printStackTrace();
                  471 SAXParseException parseException = (SAXParseException) e;
                  472 String systemId = parseException.getSystemId();
                  473
                  474 if (systemId == null) {
                  475 systemId = "";
                  476 }
                  477
                  478 String message = "Error on line "
                  479 + parseException.getLineNumber() + " of document "
                  480 + systemId + " : " + parseException.getMessage();
                  481
                  482 throw new DocumentException(message, e);
                  483 } else {
                  484 throw new DocumentException(e.getMessage(), e);
                  485 }
                  486 }
                  487 }


                  The method getXMLReader() returns an object of type SAXParserImpl$JAXPSAXParser (Why?), which is not a subclass of XMLReader . I can find the class SAXParserImpl$JAXPSAXParser in the file $JBOSS_HOME/lib/endorsed/xercesImpl.jar.

                  • 6. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA

                     

                    As I understand a ClasscastException is raised at line 435 in the class SAXReader,
                    this exception is caught at line 468 and again a DocumentException is thrown at line 484:


                    I think you are right, that is what I am finding also. Is there any way to get the details of the stack trace/class cast exception?

                    I thought it might be that jbpm is packaged with a different dom4j jar than jboss 4.0.5, but looking at the manifests of server\default\lib\dom4j.jar and jbpm.war\WEB-INF\lib\dom4j-1.6.1.jar, they look to both be
                    Implementation-Version: 1.6.1


                    Of course it could be a class loading issue, one was loaded from the container and the other from the war... still looking into it, but thought I would "think out loud" to see if we can get this figured out faster.

                    Dave

                    • 7. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA

                      AH HA! I think that's it.

                      The problem is the dom4j-1.6.1.jar inside jbpm.war. Once that is removed from the war, you get past the hibernate.cfg.xml problem.

                      07:17:16,115 INFO [Environment] Hibernate 3.2.0.ga
                      07:17:16,505 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
                      07:17:17,021 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
                      07:17:17,052 INFO [JkMain] Jk running ID=0 time=0/62 config=null
                      07:17:18,021 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 51s:922ms
                      07:17:18,036 INFO [Environment] hibernate.properties not found
                      07:17:18,052 INFO [Environment] Bytecode provider name : javassist
                      07:17:18,083 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
                      07:17:18,318 INFO [Configuration] configuring from resource: hibernate.cfg.xml
                      07:17:18,333 INFO [Configuration] Configuration resource: hibernate.cfg.xml
                      07:17:18,599 INFO [Configuration] Reading mappings from resource: org/jbpm/graph/action/Script.hbm.xml
                      ...


                      Cool. I will see if there is an existing bug for this, otherwise I will add one.

                      Dave


                      • 8. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                        mrhightech

                        Excellent job! Thanks a lot

                        Now deployment works flawlessly.

                        Cheers,

                        Daniel

                        • 9. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                          zauberlehrling

                          Great work! Thank you very much.

                          Frank

                          • 10. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                            burrsutter

                            I'm attempting to get a jBPM.war based on 3.1.2 working on 4.0.5.GA. I also found that DOM4J and Jaxen now ship with the AS 4.0.5.GA so I removed them from the WEB-INF\lib so that helps.

                            However, I'm still stuck on
                            Could not instantiate cache implementation

                            The WAR is to simply allow for upload's from the IDE's graphical process designer (GPD) and I've been trying to tweak the Starter's kit's WAR to make it work.

                            This was working very well in 4.0.4 with EJB3.

                            Burr

                            • 11. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                              burrsutter

                              Answering my own question about the cache issue.

                              This in my hibernate.cfg.xml helped out:

                              org.hibernate.cache.HashtableCacheProvider

                              So simply the removal of Dom4j from the web-inf/lib and adding ehcache1.2 to my EAR seemed to sort this out.

                              If anyone else is interested in making jBPM work in an EAR along side EJB3 feel free to contact me. I'm trying to use jBPM to "orchestrate" some MDBs on 4.0.4 and 4.0.5.

                              Burr.Sutter@jboss.com

                              • 12. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                                theejbpope

                                Hello Burr,

                                That's what I'm trying to do for the last days. Having JTA problems though. Maybe it's related ...

                                Are you by any chance familiar with this issue ?
                                http://www.jboss.com/index.html?module=bb&op=viewtopic&t=94319

                                Jan

                                • 13. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                                  theejbpope

                                  The approach of deploying the service- and web archive included into the starters kit, with the fixes of this thread seems to work. At least I can monitor the processes now.

                                  Many thanks !

                                  • 14. Re: Deploying jbpm.war(3.1.3) to jboss as 4.0.5GA
                                    jglan

                                    Regarding the hibernate 3.2 cache problem,

                                    these lines in hibernate.cfg.xml helped in my case:

                                    <property name="hibernate.cache.use_second_level_cache">false</property>
                                    <property name="hibernate.cache.use_query_cache">false</property>


                                    1 2 Previous Next