Thanx for your hints but you might have missunderstood something.
All the classes needed from Drools plugin are found and I can initialize the
ruleBase unless I try to add
an import statement for a java class into the DRL file. When the DRL file
gets parsed by Drools I
get this strange exception. Don't know why the class cannot be found. I
assume the class is
loaded by means of reflections in Drools. This means when the class is on
class path it should
also be found or do I forget something important???
Gaurav2007 wrote:
i am also working in same technology i am not able to use service of one
plug-in from another in following cases :
1) export the required package of dependent plug-in,
2) add all the required jars in classpath from runtime tab of mainfest.mf
file of your plugin.
3) in run time configuration of application required plug-in is not
selected.
gurks wrote:
>
> I'm working on a RCP project and now want to integrate Drools. There are
> two plugins: CORE and UI.
> The initialization of Drools is done in a Manager class in the core
> plugin. The same plugin also has a class named Service. This class should
> be imported in a DRL-file. The Manager is first called in the UI plugin
> but don't think that's the problem. The Drools jars are placed in its own
> plugin and the other two plugins are augemnted with the dependency
> needed.
>
> When I try to initialize the ruleBase I get the following exception:
>
> org.drools.rule.InvalidRulePackage: Unable to resolve ObjectType
> 'Service' : [Rule name=Your First Rule, agendaGroup=MAIN, salience=0,
> no-loop=false]
> Rule Compilation error : [Rule name=Your First Rule, agendaGroup=MAIN,
> salience=0, no-loop=false]
> at/mcw/jdent/services/core/persistent/Rule_Your_First_Rule_0.java (2:55)
> : Only a type can be imported. test.core.persistent.Service resolves to a
> package
> at/mcw/jdent/services/core/persistent/Rule_Your_First_Rule_0.java
> (7:342) : $serviceName cannot be resolved
> org.drools.compiler.ImportError@17a99
> at org.drools.rule.Package.checkValidity(Package.java:408)
> at
> org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:288)
> ...
>
> I don't know why Drools does not find my Service class. It's in the same
> plugin as the manager and should be visible to it.
>
> Could anybody give me an advice how I can integrate Drools into my RCP
> project correctly.
>
> Thanx, gurks
>
--
View this message in context:
http://www.nabble.com/Usage-of-Drools-in-a-RCP-project-tf4383352.html#a12...
Sent from the drools - user mailing list archive at
Nabble.com.