RE: [rules-users] Rule compilation errors under heavy load
by Hehl, Thomas
Couldn't you use yield() to generate a context-switch? It would only happen
in that spot, but should produce some good testing.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Dean Jones
Sent: Monday, July 16, 2007 5:48 AM
To: Rules Users List
Subject: Re: [rules-users] Rule compilation errors under heavy load
On 7/14/07, Mark Proctor <mproctor(a)codehaus.org> wrote:
> We are going to need an integration test, to reproduce this, can you
> supply one?
>
Okay, I've just converted the simple test that I added earlier to a
Junit test. The test is not guaranteed to fail if there are thread
safety errors, just very likely to fail (don't know if this is
acceptable for you). Initially, I wrote a test which guaranteed that
calls to the addPackage() and getPackage() methods were interleaved by
different threads, but, annoyingly, this test passed. It seems that a
context-switch halfway through one of these methods is necessary to
provoke the problem (which is difficult to guarantee :-)
Dean.
18 years, 6 months
How to know the number of rules fired?
by Diouf Mouhamed
Hi all,
I have a little problem: I'm using the JSR94 and I want to know, at the
end of an execution, the number of the rules fired?
My second question is using only JBoss rules how can I know this number
(without using JSR94).
Thanks,
Mouhamed Diouf
18 years, 6 months
Problem with Drools IDE (Eclipse)
by Eric Miles
I attempted to send this last night, but didn't see it show up to the
user list so I'm going to try again, I apologize if this was sent more
than once.
When I attempt to open several views (Working Memory, Agenda, Global,
etc) within an JBoss Rules enabled Eclipse, I receive the following
error:
java.lang.NoClassDefFoundError:
org/eclipse/debug/internal/ui/contexts/provisional/IDebugContextListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:235)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:69)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:327)
at
org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2077)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1018)
at org.eclipse.ui.internal.WorkbenchPage.access
$18(WorkbenchPage.java:999)
at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3666)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at
org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3663)
at
org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3639)
at
org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:165)
at
org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:109)
at
org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:239)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:475)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:429)
at
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:165)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java:128)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access
$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem
$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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:585)
Anyone know what's going on? I'm running the IDE feature version
4.0.0.12865MR3, Eclipse 3.3, Sun JDK 1.5.0_12 on Fedora 7.
Thanks,
Eric
18 years, 6 months
Complex validation logic for hierarchies with Drools
by Oleg Yavorsky
Hi.
I've got a lot of domain objects represented as instances of classes generated from XSD using Castor. My goal is to implement validation framework for whole tree which contains complex "when" conditions (see bellow). Furthermore, rules definitions should be very easy for unexperienced user to change so I need DSL.
Now I use reflection to assert whole tree of objects to working memory along with additional context information (like stack of parents associated with particular object). Then I use eval() in LHS to call boolean functions which performs checks in plain Java to see if object in particular context. But I think that this is ugly approach and it doesn't solve other cases. I'm new to Drools but something tells me that it can give me more elegant solution for such problems.
Here is an example of possible hierarchy (used XSD to better represent it). Make note that in production case similar hierarchy is more complex and has a lot of objects. Sorry, but I don't know how to format it in email.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.example.org/ClientService"
xmlns:tns="http://www.example.org/ClientService"
elementFormDefault="qualified">
<complexType name="ClientService">
<sequence minOccurs="0" maxOccurs="1">
<element name="ClientInfo">
<complexType>
<sequence>
<element name="Name" type="string"/>
<element name="AccountID" type="string" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
</element>
<element name="ServiceDescription" minOccurs="0">
<complexType>
<sequence>
<element name="Name" type="string"/>
<element name="Status">
<simpleType>
<restriction base="string">
<enumeration value="VERIFIED"/>
<enumeration value="ACCEPTED"/>
<enumeration value="DENIED"/>
</restriction>
</simpleType>
</element>
</sequence>
</complexType>
</element>
</sequence>
<attribute name="Type">
<simpleType>
<restriction base="string">
<enumeration value="BRONZE" />
<enumeration value="SILVER"/>
<enumeration value="GOLD"/>
</restriction>
</simpleType>
</attribute>
</complexType>
</schema>
And here are possible validation cases:
1. "ClientInfo" contained inside "ClientService" with type "GOLD" should have "AccountID" assigned.
2. "ClientService" with type "BRONZE" could have up to 3 "ServiceDescription"
3. "ServiceDescription" contained inside "ClientService" with type "BRONZE" should has status "ACCEPTED"
4. "ClientInfo" should have "AccountID" assigned if there is "ServiceDescription" with name "SUBSCRIPTION"
I'd like to come up with rules definition that looks like this (for 3-d example):
rule "Validate status for BRONZE"
when
Validating ServiceDescription
Contained in ClientService having
type equals to "BRONZE"
then
# Validate status
end
In this rule ServiceDescription, ClientService and type literals could be anything else (so I don't need to create DSL for each object in domain). But this could be easily done through reflection.
Any help with possible approach will be highly appreciated.
Oleg.
---------------------------------
Вы уже с Yahoo!? Испытайте обновленную и улучшенную. Yahoo! Почту!
18 years, 6 months
Can't execute rules twice with a second classloader
by Aaron Dixon
I am trying to sequentially perform two rules executions using two
different classloaders in the same VM. I create completely new state
for each execution, yet I still fail on the second execution. I
believe this has to do with some internal static cached state that
JBossRules is maintaining. A snippet of the code and exeception are
shown in this email.
public void demo() throws Exception {
// Save original classloader
ClassLoader original = Thread.currentThread().getContextClassLoader();
// Create Classloader 1 with parent of original
FooClassLoader loader1 = new FooClassLoader(original);
Thread.currentThread().setContextClassLoader(loader1);
testRules();
// Success so far...
// Create Classloader 2 with parent of original
FooClassLoader loader2 = new FooClassLoader(original);
Thread.currentThread().setContextClassLoader(loader2);
testRules();
// Never make it to here.
// Restore
Thread.currentThread().setContextClassLoader(original);
}
private void testRules() throws Exception {
PackageBuilder builder = new PackageBuilder();
Package pkg = buildPackage(new String[] { "Foo.drl" }, builder);
RuleBase base = RuleBaseFactory.newRuleBase();
base.addPackage(pkg);
StatelessSession session = base.newStatelessSession();
final ClassLoader loader =
Thread.currentThread().getContextClassLoader();
Object inst = loader.loadClass("com.foo.Foo").newInstance();
session.execute(new Object[] { inst });
}
Exception in thread "main" java.lang.ClassCastException:
adixon.prototype.rules.classloader.demo.copy.FooShadowProxy
at org.drools.base.adixon.prototype.rules.classloader.demo.copy.Foo$getName.getValue(Unknown
Source)
at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:94)
at org.drools.base.evaluators.StringFactory$StringEqualEvaluator.evaluate(StringFactory.java:85)
at org.drools.rule.LiteralRestriction.isAllowed(LiteralRestriction.java:61)
at org.drools.rule.LiteralConstraint.isAllowed(LiteralConstraint.java:82)
at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:121)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:20)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:159)
at org.drools.reteoo.Rete.assertObject(Rete.java:175)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:772)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:584)
at org.drools.reteoo.ReteooStatelessSession.execute(ReteooStatelessSession.java:63)
at adixon.prototype.rules.classloader.demo.copy.Driver.testRules(Driver.java:47)
at adixon.prototype.rules.classloader.demo.copy.Driver.go(Driver.java:33)
at adixon.prototype.rules.classloader.demo.copy.Driver.main(Driver.java:17)
18 years, 6 months
Adding attributes to RUles in decision tree
by Saurabh Shukla
Hi Everyone,
Can any one please suggest in which cell the XOR-GROUP can be entered while creating a rules using decision table (excel sheet) ?
I have been looking at the documentation and it states that XOR-GROUP is is keyword and can be added. However it doesn't really tells in what cell (row,column) can attributes pertaining to a rule(like agenda, activation groups, xor-group, name) can be entered. Logically it should be some where at the row level but I can not figure out where it should be put.
Any help or directions will be appreciated.
TIA,
Saurabh
18 years, 6 months
Problem opening several views in 4.0 MR3 Eclipse
by Eric Miles
When I attempt to open several views (Working Memory, Agenda, Global,
etc) within an JBoss Rules enabled Eclipse, I receive the following
error:
java.lang.NoClassDefFoundError:
org/eclipse/debug/internal/ui/contexts/provisional/IDebugContextListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:161)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:501)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:471)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:235)
at
org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:69)
at
org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:327)
at
org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2077)
at
org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1018)
at org.eclipse.ui.internal.WorkbenchPage.access
$18(WorkbenchPage.java:999)
at org.eclipse.ui.internal.WorkbenchPage
$19.run(WorkbenchPage.java:3666)
at
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at
org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3663)
at
org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3639)
at
org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:165)
at
org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:109)
at
org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:239)
at
org.eclipse.core.commands.Command.executeWithChecks(Command.java:475)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:429)
at
org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:165)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java:128)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
at org.eclipse.jface.action.ActionContributionItem.access
$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem
$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
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:585)
Anyone know what's going on? I'm running the IDE feature version
4.0.0.12865MR3, Eclipse 3.3, Sun JDK 1.5.0_12 on Fedora 7.
Thanks,
Eric
18 years, 6 months
Compilation Error in Drools
by McShiv
Hi All,
I used the following code in the dsl file.
DSL:
[when] Check whether the name is present as "{studName}" = $stud :
Student(name = "{studName}");
[then] Set the Error Code {errorCode} = String string = $stud.getName();
Error(errorCode, string);
DRL:
package com.policy;
expander StudendProgram.dsl;
import java.util.Iterator;
import com.class.Student;
import com.class.Error;
rule "StudendProgram_1"
when
Check whether the name is present as "Stephen"
then
Set the Error Code 88
end
When I try to run this program I got the following error.
Caused by: org.drools.rule.InvalidRulePackage: Rule Compilation error
File com/policy/Rule_SpeCodeSpeValProdPlan12_0.java, Line 12, Column 176:
Unexpected token "." in primary
When I remove the Line "$stud.getName();" in the then part and set the error
code alone its working fine. The "." inbetween $stud and getName() may be
the problem. But I don't know the solution for this.
Any suggessions on this.
Thanks,
McShiv....
--
View this message in context: http://www.nabble.com/Compilation-Error-in-Drools-tf4071029.html#a11569413
Sent from the drools - user mailing list archive at Nabble.com.
18 years, 6 months
Examples moving
by Fernando Meyer
Hi peeps,
Just to be consistence, the drools-example directory now contains
examples projects and not an eclipse project anymore:
trunk
-drools-examples
-drools-examples-drl
-drools-examples-brms
-drools-examples-*
Im about to add a xml test project and improve brms examples.
Let me know if something isn't working fine.
Regards
Fernando Meyer
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3124-6000
Mobile: +55 11 8524-1298
JBoss, a division of Red Hat @ www.jboss.com
GPG: 47C0 F16E 0387 F4DF 7EBC 8E3C 7AF1 8D55 AB29 DA3A
18 years, 6 months