我正在尝试使用 drools 服务器,但我似乎无法将其部署到任何应用程序服务器。我安装了 AS 7 和 Tomcat 7 的全新副本,并下载了 drools jbpm 集成发行版。在发行版中,我正在部署 war 文件“binarys/drools-camel-server-5.4.0-SNAPSHOT.war”。我有点假设这应该开箱即用,但我得到了如下所示的错误。 (我还尝试安装到 Tomcat 6、AS 5.1 和 AS 6.1,认为它还没有更新,但我有类似的错误)。看来我缺少一些非常基本的东西。
Jboss AS 7.0.2 上的一般错误是:
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 ...
这是否意味着 drools server 已经安装在 AS 7.0.2 或者 我缺少一些未记录的持久性连接器 任何地方?
对于 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
我一直在阅读的内容似乎表明在 cxf 2.4+ 中你不需要 cxf xml 文件,但似乎出于某种原因它试图找到它们。
我更愿意让它在 AS 7 上运行,但此时任何应用服务器都可以。
最佳答案
嗯.. 我在 JBoss AS 7 中看到了这个错误,它与那些项目中的 persistence.xml 文件有关。看起来 JBoss AS 7 将查看应用程序内的所有 JAR 文件以查找 persistence.xml 文件,并将尝试为每个文件创建一个持久性单元。这是我只在 AS7 中看到的一种行为,基本上,如果您 grep 所有库并找到重复的 persistence.xml 所在的位置,您可以删除一个,它就会起作用。我们应该专门为 AS7 提供一个 war 文件,我不确定它是否会很快创建。 希望能帮助到你 干杯
关于tomcat - 如何从在 Jboss 7 或 Tomcat 7 上运行的 drools jbpm 获取 "Drools Server"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8191408/