[rules-users] Need Drools 5.1 in .NET

yashgt yashgt at gmail.com
Tue Jun 7 08:41:15 EDT 2011


Hi,

We are trying to use the Drools 5.1 engine in a .NET application and hence
have been trying to convert the JAR files to DLLs. We use IKVM 0.46.* for
the conversion.

We have added all the JARs from the drools 5.1 package to the CLASSPATH. We
run the command:

ikvmc -target:library drools-api-5.1.1.jar

The output we get is similar to:
Note IKVMC0002: output file is "drools-api-5.1.1.dll"
Warning IKVMC0100: class "org.quartz.Calendar" not found
Warning IKVMC0111: emitted java.lang.NoClassDefFoundError in
"org.drools.runtime
.help.QuartzHelper$QuartzCalendarAdapter.isTimeIncluded(J)Z"
Warning IKVMC0100: class "com.sun.tools.xjc.Options" not found
Warning IKVMC0105: unable to compile class
"org.drools.osgi.api.Activator$Drools
("org.quartz.Calendar")
Warning IKVMC0100: class "com.thoughtworks.xstream.XStream" not found
ServiceTracker"
(missing class "org.osgi.util.tracker.ServiceTrackerCustomizer")
Warning IKVMC0105: unable to compile class "org.drools.osgi.api.Activator"
(missing class "org.osgi.framework.BundleActivator")
Warning IKVMC0100: class "org.osgi.framework.BundleContext" not found
Warning IKVMC0100: class "org.osgi.framework.ServiceReference" not found
Warning IKVMC0100: class "org.drools.osgi.api.Activator" not found
Warning IKVMC0111: emitted java.lang.NoClassDefFoundError in
"org.drools.osgi.ap
i.Activator$BundleContextInstantiator.call()Ljava.lang.Object;"
("org.osgi.framework.BundleContext")

We have done the above process for all the JAR files in the drools folder.

The DLLs do get created and we are able to compile our .NET application to
use the classes. But during execution at:
 KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();

We get the exception that says:
    - IllegalArgumentException : Unable to instantiate service for Class
'org.drools.builder.KnowledgeBuilderFactoryService" 
    - ClassNotFoundException:
org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl
	
The jar files are already in the CLASSPATH when we run the .NET app	.

I am not sure whether these errors are due to the Warnings we see during
conversion.	

If anyone has been successful in obtaining a DLL from drools 5.1, kindly let
me know the steps.

Thanks and regards,
Yash

--
View this message in context: http://drools.46999.n3.nabble.com/Need-Drools-5-1-in-NET-tp3034264p3034264.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list