Drools Execution Server指向Guvnor存储库

我正在尝试调用在tomcat6上运行的drools执行服务器(5.4.0),它指向以前在Guvnor存储库(.pkg文件)中创建的快照.

根据教程,我只需要编辑knowledge-service.xml文件,该文件位于我的执行服务器的/ webapps / drools-webapp / WEB-INF / classes中.因此,应添加指向Guvnor存储库的新资源(见下文):

<drools:kbase id="kbase1" node="node1">
      <drools:resources>
         <!--   <drools:resource  type="DRL" source="classpath:test.drl"/> -->
         <drools:resource  type="PKG" source="http://localhost:9080/guvnor-webapp/org.drools.guvnor.Guvnor/package/bonita/LATEST" basic-authentication="enabled"  />
    </drools:resources>
  </drools:kbase>

URL指向使用Guvnor创建的快照,并提供.pkg文件.

这里的问题是:

在我调用drools执行服务器之后,我收到一条如下所示的错误消息:

Tomcat日志:

INFO: Server startup in 4358 ms
31.10.2012 14:21:07 org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
WARNUNG: WebApplicationException has been caught : bonita.BonitaPerson : bonita.BonitaPerson
---- Debugging information ----
message             : bonita.BonitaPerson
cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message       : bonita.BonitaPerson
class               : org.drools.command.runtime.rule.InsertObjectCommand
required-type       : org.drools.command.runtime.rule.InsertObjectCommand
converter-type      : org.drools.runtime.help.impl.XStreamXML$InsertConverter
path                : /batch-execution/insert/bonita.BonitaPerson
line number         : 3
class[1]            : org.drools.command.runtime.BatchExecutionCommandImpl
converter-type[1]   : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version             : null
-------------------------------

我认为从drools执行服务器到guvnor存储库的重定向不起作用,并且找不到必要的类.即使我关闭我的Guvnor服务器,我也会收到相同的错误消息.对我来说,drools执行服务器永远不会调用Guvnor服务器……

任何人都可以帮我弄清楚从drools到guvnor的正确重定向是怎么样的?

谢谢

最佳答案 我有类似的问题.请看这篇文章..

drools-rest-cannotresolveclassexeption

基本上你的元素不正确.它应该看起来像这样:

<drools:resource  type="PKG" source="http://localhost:9080/guvnor-webapp/rest/package/bonita/LATEST" basic-authentication="enabled" username="admin" password="admin" />

>我没有评论的声誉点,所以这就是我创建答案而不是评论的原因.

点赞