It is able to find file if I do not use package name and keep routing.drl in 
resource folder with any package. But it is throwing 
org.drools.CheckedDroolsException: There were errors in the rule
 source: Rule Compilation error
Rule Compilation error The type java.lang.Object cannot be resolved. It
 is indirectly referenced from required .class files
   
  My Xbean and Drools File 
  ---------------
  <beans xmlns:http="http://servicemix.apache.org/http/1.0";
xmlns:drools="http://servicemix.apache.org/drools/1.0";
xmlns:testMe="http://servicemix.apache.org/testme";>
 <drools:endpoint service="testMe:DroolFinalService"
   endpoint="DroolsEndPoint"
 ruleBaseResource="classpath:routing.drl" 
  /> 
 </beans>
  
My Drools File is:
  --------------------------------
  package org.apache.servicemix.drools
import org.apache.servicemix.drools.model.Exchange;
global org.apache.servicemix.drools.model.JbiHelper jbi;
  rule "Route to myservice"
 when
  me : Exchange( status == Exchange.ACTIVE, in : in != null )
  eval( in.xpath("/Record/eid = 100") )
 then
  jbi.route( "test2:myservice" );
end
  rule "Route to bean2service"
 when
  me : Exchange( status == Exchange.ACTIVE, in : in != null )
  eval( in.xpath("/Record/eid = 101") )
 then
  jbi.route( "test5:bean2service" );
end
-----------------------------------------------------------------------------------------------------------------------
   
  <loc-message>org.drools.CheckedDroolsException: There were errors in
 the rule source: Rule Compilation error
Rule Compilation error The type java.lang.Object cannot be resolved. It
 is indirectly referenced from required .class files
</loc-message>
     <stack-trace><![CDATA[javax.jbi.JBIException:
 org.drools.CheckedDroolsException: There were errors in the rule
 source: Rule Compilation
 error
Rule Compilation error The type java.lang.Object cannot be resolved. It
 is indirectly referenced from required .class files
   at

 org.apache.servicemix.drools.DroolsEndpoint.start(DroolsEndpoint.java:128)
 at

 
org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(SimpleEndpoint.java:55)
 at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:55)
 at

 
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
 at

 
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
 at

 
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:130)
 at

 
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:374)
 at

 
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:337)
 at

 
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateExternalArchive(AutoDeploymentService.java:201)
 at

 
org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:473)
 at

 
org.apache.servicemix.jbi.container.JBIContainer.updateExternalArchive(JBIContainer.java:483)
 at

 
org.apache.servicemix.jbi.framework.AdminCommandsService.deployServiceAssembly(AdminCommandsService.java:229)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at

 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at

 org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
 at

 
org.apache.servicemix.jbi.management.BaseStandardMBean.invoke(BaseStandardMBean.java:318)
 at

 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
 at
 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
 at

 
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1426)
 at

 
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
 at

 
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1264)
 at java.security.AccessController.doPrivileged(Native Method)
 at

 
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1366)
 at

 
javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at

 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at

 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305)
 at sun.rmi.transport.Transport$1.run(Transport.java:159)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
 at

 sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
 at

 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
 at

 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
 at

 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
 at

 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
 at java.lang.Thread.run(Thread.java:619)
Caused by: org.drools.CheckedDroolsException: There were errors in the
 rule source: Rule Compilation error
Rule Compilation error The type java.lang.Object cannot be resolved. It
 is indirectly referenced from required .class files
   at org.drools.compiler.RuleBaseLoader.makeRuleBase(Unknown Source)
 at org.drools.compiler.RuleBaseLoader.loadFromReader(Unknown Source)
 at

 org.apache.servicemix.drools.DroolsEndpoint.start(DroolsEndpoint.java:126)
 ... 39 more
]]></stack-trace>
    </msg-loc-info>
   </exception-info>
  </task-result-details>
 </component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>


Gordon Dickens <[EMAIL PROTECTED]> wrote:
  kumar k wrote:
> I am getting file not found exception for drools component. It is not able to 
> find drl file. How classpath needs to be defined and where should I place drl 
> file. My drl file is located at
> src\org\apache\servicemix\drools and My xbean is like
>
> > xmlns:drools="http://servicemix.apache.org/drools/1.0";
> xmlns:testMe="http://servicemix.apache.org/testme";>
> > endpoint="DroolsEndPoint"
> ruleBaseResource="classpath:org.apache.servicemix.drools.routing.drl" />
> 
>
> Thanks
>
>
>
> ---------------------------------
> Need a vacation? Get great deals to amazing places on Yahoo! Travel.
>
>
> 
I have not used Drools yet, but have you tried putting

..

after your 
Regards,
Gordon


       
---------------------------------
Got a little couch potato? 
Check out fun summer activities for kids.

Reply via email to