[rules-users] Drools Java and .Net

Swindells, Thomas TSwindells at nds.com
Wed Feb 2 04:13:59 EST 2011


This appears to be a missing jar from your dll I've not looked at IKVM but I presume it does some magic to work out what classes need to be include - magic which probably fails if the classes are referenced indirectly via reflection or some other means (eg if there is a pluggable service architecture dynamically picking which implementation to use. You may be able to get round this by explicitly specifying the jars/classes that you need.

You may also run into further issues when it tries to compile your rules as they may reference other jars and classes (if it is able to compile them at all!

Thomas

> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org [mailto:rules-users-
> bounces at lists.jboss.org] On Behalf Of FrankVhh
> Sent: 02 February 2011 08:41
> To: rules-users at lists.jboss.org
> Subject: Re: [rules-users] Drools Java and .Net
>
>
> Hi all,
>
> Thanks for your inputs. As you suggested, this week I tried to use IKVM
> to
> make Drools and .NET work together.
>
> Converting the Java implementation of drools to dll, importing dll into
> .NET
> and calling the java functions isn't that hard, once you are a little
> bit
> familiar with ikvm. No syntax errors in Visual Studio when I do this.
>
> However, there seems to be going something wrong on execution. It
> appears to
> me that the execution environment does not recognize the "drools-
> language".
>
> The execution crashes on the first call of Drools code
> (knowledgebuilderfactory.new KnowledgeBuilder()) with the errors:
>     - IllegalArgumentException : Unable to instantiate service for
> Class
> 'org.drools.builder.KnowledgeBuilderFactoryService"
>     - ClassNotFoundException:
> org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl
>
> This means there are some dependancies missing, right? But should I be
> looking to add some jars to the IKVM-JVM? Or is this definitely a
> problem of
> wrong jar to dll conversion?
>
> Corneil, could you tell me whether you ran into dependancy problems as
> well?
>
> fyi I also tried to import the drools library as dll into .NET and then
> rewrite the entire wrapping code in .NET. This didn't return any syntax
> errors either, but got stuck in execution as well. (With same errors).
>
> Regards,
> Frank
>
>
> Corneil du Plessis wrote:
> >
> > We have successfully used IKVM to create a dlls for our Drools
> > application.
> >
> > The performance was a bit slower on IKVM/.Net as in Sun Java 5.
> > We dynamically load a large number of rules and found the largest
> impact
> > is to the 'load time'
> >
> > The performance impact was not such that it would make a network call
> > viable; especially with 1000s of clients.
> >
> > Apart from the performance impact the behaviour is exactly the same.
> >
> > On 25/01/2011 17:04, FrankVhh wrote:
> >> Hi all,
> >>
> >> Suppose that you have a rule engine that needs to be embedded on the
> >> machine
> >> and that there is no way to call the rules as a service from a
> >> centralized
> >> server, what approach would one have to choose to make Drools and
> .NET
> >> work?
> >>
> >> The rulke engine will have to be cached to improve performance, so
> that
> >> part, until there is an up-to-date version of Drools.NET, has to be
> in
> >> Java
> >> anyway. Then you expose your JAVA code as a (local) service and let
> .NET
> >> call it? Or am I seeing things wrong here?
> >>
> >> I must stipulate that I am not an expert in .NET at all, and I know
> only
> >> barely enough Java to get Drools working :-).
> >>
> >> Thanks for your help.
> >>
> >> Kind regards,
> >> Frank
> >>
> >>
> >> salaboy wrote:
> >>> Yes, and if you want to use the rule engine from .NET you can use
> the
> >>> Drools
> >>> Server that expose the Drools Runtime in REST and SOAP interfaces
> :)
> >>> Greetings.
> >>>
> >>> 2011/1/19 Michael Anstis<michael.anstis at gmail.com>
> >>>
> >>>> Hi,
> >>>>
> >>>> I believe the .NET implementation of Drools is somewhat out dated.
> >>>>
> >>>> However Drools ticks all your other requirements.
> >>>>
> >>>> With kind regards,
> >>>>
> >>>> Mike
> >>>>
> >>>> 2011/1/19 Gorantla, Bhaskar (GE Capital)<bhaskar.gorantla at ge.com>
> >>>>
> >>>>> We are looking for a rules engine that has the following
> >>>>> characteristics.
> >>>>>
> >>>>>
> >>>>>
> >>>>> 1.       Supports both Java and .net
> >>>>>
> >>>>> 2.       Provides a business user friendly UI for
> creating/editing
> >>>>> rules
> >>>>>
> >>>>> 3.       Supports versioning
> >>>>>
> >>>>> 4.       The rues in the rules repository are accessible to both
> Java
> >>>>> and
> >>>>> .net applications – Nice to have
> >>>>>
> >>>>>
> >>>>>
> >>>>> Do you know whether Drools supports all the above?
> >>>>>
> >>>>>
> >>>>>
> >>>>> Thanks
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> rules-users mailing list
> >>>>> rules-users at lists.jboss.org
> >>>>> https://lists.jboss.org/mailman/listinfo/rules-users
> >>>>>
> >>>>>
> >>>> _______________________________________________
> >>>> rules-users mailing list
> >>>> rules-users at lists.jboss.org
> >>>> https://lists.jboss.org/mailman/listinfo/rules-users
> >>>>
> >>>>
> >>>
> >>> --
> >>>   - CTO @ http://www.plugtree.com
> >>>   - MyJourney @ http://salaboy.wordpress.com
> >>>   - Co-Founder @ http://www.jbug.com.ar
> >>>
> >>>   - Salatino "Salaboy" Mauricio -
> >>>
> >>> _______________________________________________
> >>> rules-users mailing list
> >>> rules-users at lists.jboss.org
> >>> https://lists.jboss.org/mailman/listinfo/rules-users
> >>>
> >>>
> >
> > --
> >
> > Corneil du Plessis - Software Architect
> >
> > TSC Technologies (Pty) Ltd
> > (o) +27 11 431 1666
> > (f) +27 86 674 2962
> > (c) +27 82 530 9259
> > Email: corneil at tsctech.com <mailto:corneil at tsctech.com>
> > www.tsctech.com <http://www.tsctech.com>
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
> >
>
> --
> View this message in context: http://drools-java-rules-
> engine.46999.n3.nabble.com/Drools-Java-and-Net-tp2290536p2403895.html
> Sent from the Drools - User mailing list archive at Nabble.com.
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users


**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster at nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************




More information about the rules-users mailing list