Hello,
I want to deploy a Drools project as a web service. I am using Drools 5.0,
tomcat-5.5.28 and Netbeans 6.9 to deploy the project as an Axis2 web
service. The project just uses a simple decision table and works locally. If
I try to run the service on the tomcat server I get the Runtime Exception
java.lang.ClassNotFoundException:
org.drools.rule.builder.dialect.clips.ClipsDialectConfiguration.
I added all Drools libraries to the .aar file. Especially the
drools-clips-5.0.1.jar is deployed, that should contain the missing class.
I also tried to use the JANINO compiler as described here:
http://community.jboss.org/wiki/RulesTomcat/diff?secondVersionNumber=8, but
that didn't solve the problem.
Are there any known conflicts between drools libraries and tomcat libraries
that could cause the error?
Thanks and Regards
Hans Dampf
The code that causes the error:
public BREService(){
KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
final DecisionTableConfiguration dtableconfiguration =
KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtableconfiguration.setInputType( DecisionTableInputType.XLS );
kbuilder.add( ResourceFactory.newClassPathResource("Sample.xls",
Laborwert.class ), ResourceType.DTABLE, dtableconfiguration);
kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
}
Error Message:
[ERROR] Exception occurred while trying to invoke service method null
org.apache.axis2.AxisFault: Unable to load dialect
'org.drools.rule.builder.dial
ect.clips.ClipsDialectConfiguration:clips:null'
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.apache.axis2.receivers.AbstractMessageReceiver.makeNewServiceObje
ct(AbstractMessageReceiver.java:251)
at
org.apache.axis2.receivers.AbstractMessageReceiver.getTheImplementati
onObject(AbstractMessageReceiver.java:283)
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic
(RPCMessageReceiver.java:71)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusines
sLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe
ssageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
33)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:873)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools
.rule.builder.dialect.clips.ClipsDialectConfiguration:clips:null'
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBui
lderConfiguration.java:274)
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigura
tionMap(PackageBuilderConfiguration.java:259)
at
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderCo
nfiguration.java:176)
at
org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilder
Configuration.java:148)
at
org.drools.builder.impl.KnowledgeBuilderProviderImpl.newKnowledgeBuil
derConfiguration(KnowledgeBuilderProviderImpl.java:21)
at
org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfigu
ration(KnowledgeBuilderFactory.java:68)
at bre.BREService.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at
org.apache.axis2.receivers.AbstractMessageReceiver$8.run(AbstractMess
ageReceiver.java:242)
at
org.apache.axis2.java.security.AccessController.doPrivileged(AccessCo
ntroller.java:132)
at
org.apache.axis2.receivers.AbstractMessageReceiver.makeNewServiceObje
ct(AbstractMessageReceiver.java:239)
... 23 more
Caused by: java.lang.ClassNotFoundException:
org.drools.rule.builder.dialect.cli
ps.ClipsDialectConfiguration
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1386)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1232)
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBui
lderConfiguration.java:268)
... 38 more
[ERROR] Unable to load dialect
'org.drools.rule.builder.dialect.clips.ClipsDiale
ctConfiguration:clips:null'
org.apache.axis2.AxisFault: Unable to load dialect
'org.drools.rule.builder.dial
ect.clips.ClipsDialectConfiguration:clips:null'
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.apache.axis2.receivers.AbstractMessageReceiver.makeNewServiceObje
ct(AbstractMessageReceiver.java:251)
at
org.apache.axis2.receivers.AbstractMessageReceiver.getTheImplementati
onObject(AbstractMessageReceiver.java:283)
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic
(RPCMessageReceiver.java:71)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusines
sLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe
ssageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
33)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:873)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
rocessConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
int.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
lowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.drools.RuntimeDroolsException: Unable to load dialect
'org.drools
.rule.builder.dialect.clips.ClipsDialectConfiguration:clips:null'
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBui
lderConfiguration.java:274)
at
org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigura
tionMap(PackageBuilderConfiguration.java:259)
at
org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderCo
nfiguration.java:176)
at
org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilder
Configuration.java:148)
at
org.drools.builder.impl.KnowledgeBuilderProviderImpl.newKnowledgeBuil
derConfiguration(KnowledgeBuilderProviderImpl.java:21)
at
org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilderConfigu
ration(KnowledgeBuilderFactory.java:68)
at bre.BREService.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
orAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at
org.apache.axis2.receivers.AbstractMessageReceiver$8.run(AbstractMess
ageReceiver.java:242)
at
org.apache.axis2.java.security.AccessController.doPrivileged(AccessCo
ntroller.java:132)
at
org.apache.axis2.receivers.AbstractMessageReceiver.makeNewServiceObje
ct(AbstractMessageReceiver.java:239)
... 23 more
Caused by: java.lang.ClassNotFoundException:
org.drools.rule.builder.dialect.cli
ps.ClipsDialectConfiguration
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1386)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1232)
at
org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBui
lderConfiguration.java:268)
... 38 more
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Deploying-Drools-5-0-...
Sent from the Drools - User mailing list archive at
Nabble.com.