1

I am trying to work with drools server and I can't seem to get it deployed to any application servers. I installed a fresh copy of both AS 7 and Tomcat 7 and downloaded the drools jbpm integration distribution. Within the distribution I am deploying the war file "binarys/drools-camel-server-5.4.0-SNAPSHOT.war". I kind of assumed that this should work out of the box, but instead I get the errors shown below. (I have also tried to install into Tomcat 6, AS 5.1 and AS 6.1 thinking it just hadn't been updated yet, but I have similar errors). It seems like I am missing something really basic.

The general error on Jboss AS 7.0.2 is :


17:30:12,201 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-16) MSC00001: Failed to start service jboss.deployment.unit."drools-camel-server-5.4.0-SNAPSHOT.war".INSTALL:

org.jboss.msc.service.StartException in service jboss.deployment.unit."drools-camel-server-5.4.0-SNAPSHOT.war".INSTALL: Failed to process phase INSTALL of deployment "drools-camel-server-5.4.0-SNAPSHOT.war" at ...

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to add persistence unit service for org.drools.grid ...

Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.persistenceunit."drools-camel-server-5.4.0-SNAPSHOT.war#org.drools.grid" is already registered at ...


does this mean that drools server already is installed in AS 7.0.2 or that I am missing some persistence connector that isn't documented anywhere?

For tomcat 7:


SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:camel-server.xml] Offending resource: class path resource [beans.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem:

Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml] Offending resource: class path resource [camel-server.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it does not exist ...

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml] Offending resource: class path resource [camel-server.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it does not exist ...

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it does not exist ...

Caused by: java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-extension-jaxrs-binding.xml] cannot be opened because it does not exist


The stuff I have been reading seems to indicate that in cxf 2.4+ you don't need cxf xml files, but it seems that for some reason it's trying to find them.

I would prefer to get this working on AS 7, but at this point any app server would do.

  • this seems to address the tomcat issue, but I have no idea how to proceed with the information: http://stackoverflow.com/questions/6349424/apache-cxf-rs-extensions-issue-in-2-4-0 – Robb Lovell Nov 21 '11 at 19:49

1 Answers1

0

Hmm.. I saw this error in JBoss AS 7, it's something related with the persistence.xml file inside those projects. It looks like the JBoss AS 7 will look at all the JAR files that are inside the application for a persistence.xml file and it will try to create a persistence unit for each of them. This is a behavior that I've only see in AS7, basically if you grep all the libs and find where the duplicated persistence.xml are you can remove one and it will work. We should provide a war file specifically for AS7, I'm not sure if that will be created soon.. Hope it helps Cheers

salaboy
  • 4,123
  • 1
  • 14
  • 15
  • There seems to be only one persistence.xml file in all the jars, in drools-grid-impl-5.4.0-SNAPSHOT.jar. Removing that for grins yields Failed to start service jboss.persistenceunit."drools-camel-server-5.4.0-SNAPSHOT.war#org.drools.grid"... Caused by: org.hibernate.MappingException: Error while parsing file: orm.xml...Caused by: org.hibernate.InvalidMappingException: Unable to read XML.. probably the missing persistence.xml! – Robb Lovell Nov 21 '11 at 18:19
  • removing orm.xml results in a failure with no stack trace: org.jboss.msc.service.StartException in service jboss.persistenceunit: Failed to start service" – Robb Lovell Nov 21 '11 at 18:37
  • I had this happen in weblogic too with the drools camel server, and in Tomcat6 if you just drop drools-camel-server 5.3 in – Nicholas DiPiazza Jul 10 '12 at 23:00