我正在尝试调用在 tomcat6 上运行的 drools 执行服务器(5.4.0),它指向之前在 Guvnor 存储库(.pkg 文件)中创建的快照。
根据教程,我只需编辑位于我的执行服务器的 /webapps/drools-webapp/WEB-INF/classes 中的 Knowledge-service.xml 文件。因此应该添加一个指向 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 服务器,我也会收到相同的错误消息。对我来说,Guvnor 服务器永远不会被 drools 执行服务器调用......
谁能帮我弄清楚从drools到guvnor的正确重定向是什么样的?
谢谢