Problem with class Variable
by Mehdi
hi,
I have a class Customer.java with class variable "allTradeAmounts" and
I have two rules as follows:
rule "rule 1"
when
$c : Customer();
then
$c.setAllTradeAmounts($c.getAllTradeAmounts().add(1000));
System.out.println("after modify: "+$c.getAllTradeAmounts());
end
rule "rule 2"
when
$c : Customer(allTradeAmounts < 200 );
then
System.out.println("AllTradeAmounts < 200 ");
end
The rule 1 works fine and changes the value of this variable.
My question is, although the rule 1 has changed the class variable and I can see the result of changed variable EACH TIME, when i insert a Customer object, why is the second rule TRUE? I have changed the value of AllTradeAmounts and I can print it in RHS and it is more than 200, but in LHS if I check with "allTradeAmounts < 200 " ,it is true.
It must be FALSE and does not fire the rule.
can someone help me? what do I do wrong in LHS.
In the same rule (rule 2) if I print the allTradeAmounts it is more than 200.
sorry it is a simple question, but I m new to drools.
Thanks and regards
---------------------------------
Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now.
17 years, 1 month
Comparing two object values
by Saleem Lakhani
Hi,
How do I compare attributes of two different objects. E.g;
Object1.getEffectiveDate() < Object2.getCompletionDate()
In drools 3.0. I am using DSL.
Thanks,
Saleem
17 years, 1 month
RE: rules-users Digest, Vol 12, Issue 67
by prateek.katiyar@wipro.com
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
17 years, 1 month
problem in removing rule from rulebase
by prateek.katiyar@wipro.com
Hello all
I am using Drools 4.0.3
I want to remove rules from a InvalidRulePackage during the run time of the java program.
For this I am using removeRule(String packageName, String ruleName) method in my program but it is giving me the following exception:
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule name=valsubmitLoanApplication_0_1195817550531, agendaGroup=EMPLoanApp_submitLoanApplication, salience=8, no-loop=false]
jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java (36:0) : File jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java, Line 36, Column 0: Line break in literal not allowed
Rule Compilation error : [Rule name=valsubmitLoanApplication_0_1195817550531, agendaGroup=EMPLoanApp_submitLoanApplication, salience=8, no-loop=false]
jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java (36:0) : File jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java, Line 36, Column 0: Line break in literal not allowed
at org.drools.rule.Package.checkValidity(Package.java:424)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:361)
at com.wipro.evalidator.validation.impl.DroolsValidator.validateXML(DroolsValidator.java:427)
at com.wipro.evalidator.validation.impl.DroolsValidator.validate(DroolsValidator.java:176)
at TestDrool.main(TestDrool.java:87)
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule name=valsubmitLoanApplication_0_1195817550531, agendaGroup=EMPLoanApp_submitLoanApplication, salience=8, no-loop=false]
jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java (36:0) : File jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java, Line 36, Column 0: Line break in literal not allowed
Rule Compilation error : [Rule name=valsubmitLoanApplication_0_1195817550531, agendaGroup=EMPLoanApp_submitLoanApplication, salience=8, no-loop=false]
jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java (36:0) : File jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java, Line 36, Column 0: Line break in literal not allowed
at org.drools.rule.Package.checkValidity(Package.java:424)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:361)
at com.wipro.evalidator.validation.impl.DroolsValidator.validateXML(DroolsValidator.java:427)
at com.wipro.evalidator.validation.impl.DroolsValidator.validate(DroolsValidator.java:176)
at TestDrool.main(TestDrool.java:87)
org.drools.rule.InvalidRulePackage: Rule Compilation error : [Rule name=valsubmitLoanApplication_0_1195817550531, agendaGroup=EMPLoanApp_submitLoanApplication, salience=8, no-loop=false]
jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java (36:0) : File jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java, Line 36, Column 0: Line break in literal not allowed
Rule Compilation error : [Rule name=valsubmitLoanApplication_0_1195817550531, agendaGroup=EMPLoanApp_submitLoanApplication, salience=8, no-loop=false]
jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java (36:0) : File jbossrules/Rule_valsubmitLoanApplication_0_1195817550531_0.java, Line 36, Column 0: Line break in literal not allowed
at org.drools.rule.Package.checkValidity(Package.java:424)
at org.drools.common.AbstractRuleBase.addPackage(AbstractRuleBase.java:361)
at com.wipro.evalidator.validation.impl.DroolsValidator.validateXML(DroolsValidator.java:427)
at com.wipro.evalidator.validation.impl.DroolsValidator.validate(DroolsValidator.java:176)
at TestDrool.main(TestDrool.java:87).
Now suggest me that how can I remove rules successfully.
Please reply because it's very important.
Thanks.
With Regards
Prateek
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
17 years, 1 month
How to link packages in rulebase
by prateek.katiyar@wipro.com
Hello all
I am using Drools 4.0.3
I have two packages in my rulebase.In one package I am keeping all the functions related to my application and in another package I am deploying some rules for a specific module using front end in my application.
Now I want to use functions from one package in another package.
Any help will be appreciated.
Thanks.
With Regards
Prateek Katiyar
ES-eEnabling
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
17 years, 1 month
Re: Eclipse tools question
by J Michael Dean
I solved this problem, though not sure the exact cause. In Eclipse, I
had created a project in which I wrapped the Drools jar files,
exported the plugin, etc. However, I left the project in my
workspace. This apparently interfered with the Drools eclipse tools.
When I deleted the wrapper project from my workspace, the eclipse
tools for drools work fine.
- Mike
On Nov 24, 2007, at 4:18 PM, rules-users-request(a)lists.jboss.org wrote:
> Send rules-users mailing list submissions to
> rules-users(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/rules-users
> or, via email, send a message with subject or body 'help' to
> rules-users-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> rules-users-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rules-users digest..."
>
>
> Today's Topics:
>
> 1. RE: Re: Drools and BRMS (60,000+ rules) (Carlsen, Len)
> 2. Re: Re: Drools and BRMS (60,000+ rules) (Mark Proctor)
> 3. Eclipse tools question (J Michael Dean)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 24 Nov 2007 11:43:22 -0800
> From: "Carlsen, Len" <len.carlsen(a)ubc.ca>
> Subject: RE: [rules-users] Re: Drools and BRMS (60,000+ rules)
> To: "Rules Users List" <rules-users(a)lists.jboss.org>
> Message-ID:
> <F00D5E1871EEE14E86E7F2864F4730F508293CB0(a)exchange11.mercury.ad.ubc.ca
> >
>
> Content-Type: text/plain; charset="us-ascii"
>
> We would probably use the existing server side code and extent the
> current BRMS client UI, to satisfy our needs. By designing our BRMS I
> mostly meant designing the structure of all our rule domains,
> rules/packages and facts (courses/learning units).
>
> Len
>
> ________________________________
>
> From: rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mark Proctor
> Sent: Saturday, November 24, 2007 1:02 AM
> To: Rules Users List
> Subject: Re: [rules-users] Re: Drools and BRMS (60,000+ rules)
>
>
> Carlsen, Len wrote:
>
> This is very cool and is exactly what we will need for our new
> open
> source SIS. Once we have designed our BRMS then we will look
> more
> closely at Drools Solver (especially after the ITC competition).
>
>
>
> Are you writting your own BRMS from scratch? Are there any particular
> issues with the BRMS at the moment that would warrant this? Maybe you
> could work on the BRMS we have now to extend it to satisfy your needs.
>
>
> Currently, we are using Ad Astra for our course timetabling and
> exam
> scheduling and it would be good if we could replace that with
> Solver.
>
> Thanks for your interest,
>
> Len
>
> -----Original Message-----
> From: rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of
> Geoffrey De
> Smet
> Sent: Friday, November 23, 2007 5:09 AM
> To: rules-users(a)lists.jboss.org
> Subject: [rules-users] Re: Drools and BRMS (60,000+ rules)
>
>
> Mark Proctor wrote:
>
>
> Carlsen, Len wrote:
>
>
> Other issues are the performance of the Drools
> Solver and having
> thousands of rules compiled, loaded and running.
> During registration
> we could have thousands of rules executing
> concurrently. The rules
> engine and the BRMS would be services as part of
> an SOA
>
>
> infrastructure
>
>
> (and an OSGi service environment). Anyone got
> any experience with
> Drools in an OSGi environment with respect to
> class loading issues
> when compiling rules and facts from other
> bundles since rules and
> facts may be in different bundles? Bundle buddy
> class loading?
>
>
>
> No but it is something that interests us, please give us
> your OSGi
> feedback. Solver is not currently a supported product,
> its very much
>
>
> R&D
>
>
> alphaware, but I'm sure geoffrey would love your
> feedback, good to see
>
>
>
>
>
> people are evaluating it.
>
>
>
> yes, feedback on solver is very welcome :)
>
> The good news is, I am now working on an example called
> Examination,
> which is an implementation for the itc2007 examination
> competition:
>
> http://www.cs.qub.ac.uk/itc2007/examtrack/exam_track_index_files/exameva
> luation.htm
> It's based on real-world data. The "starter" dataset contains
> 7883
> students, 607 exams, 54 periods and 7 rooms. There are 5 hard
> constraints and 7 soft constraints:
>
> http://www.cs.qub.ac.uk/itc2007/examtrack/exam_track_index_files/exameva
> luation.htm
>
> The bad news is, it's not performing yet, because I need to make
> a
> scalable selector implementation, which I am working on.
>
> There's an example called lesson schedule (which schedules
> courses), but
>
> that's just a toy example to learn drools-solver, at it just has
> 2 hard
> constraints.
>
> One piece of advice though: separate the solver part from the
> rest. Once
>
> the solver starts calculating, you 'll only want to have
> score-related
>
> rules in the rulebase. The solver can easily do a million
> fireAllRules
> per minute, so every performance loss is blown up.
>
> With kind regards,
> Geoffrey De Smet
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
>
17 years, 1 month
Re: Class import problems
by J Michael Dean
Sorry - This was a simple buddy registration problem. Need to
register the drools package with my rcp.
- Mike
On Nov 25, 2007, at 10:00 AM, rules-users-request(a)lists.jboss.org wrote:
> Send rules-users mailing list submissions to
> rules-users(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/rules-users
> or, via email, send a message with subject or body 'help' to
> rules-users-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> rules-users-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of rules-users digest..."
>
>
> Today's Topics:
>
> 1. Class import problems (J Michael Dean)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 24 Nov 2007 18:34:22 -0700
> From: J Michael Dean <mdean77(a)comcast.net>
> Subject: [rules-users] Class import problems
> To: rules-users(a)lists.jboss.org
> Message-ID: <579CA6A2-0048-434F-A863-10A2C4073FE8(a)comcast.net>
> Content-Type: text/plain; charset="us-ascii"
>
> I am trying to import a class, but get a message that only a type can
> be imported, and what I am trying to import resolves to a package. I
> have used the examples and they appear to do the same thing, except
> they work.
>
> The top of my drl file is shown below. GlucoseDecision is, in fact, a
> type. But this is inside a large Eclipse project. Do I have to, in
> some fashion, separately jar the classes that I want to import in
> Drools? Does not appear to be the case when I look at the examples.
>
> package edu.utah
>
> #import edu.utah.cdmcc.entities.Patient;
> import edu.utah.cdmcc.entities.GlucoseDecision;
>
> rule "First Glucose Rule First File"
>
> when
> eval(1==1)
> then
> System.out.println("First Glucose Rule First File got called");
>
> end
>
>
>
17 years, 1 month
Class import problems
by J Michael Dean
I am trying to import a class, but get a message that only a type can
be imported, and what I am trying to import resolves to a package. I
have used the examples and they appear to do the same thing, except
they work.
The top of my drl file is shown below. GlucoseDecision is, in fact, a
type. But this is inside a large Eclipse project. Do I have to, in
some fashion, separately jar the classes that I want to import in
Drools? Does not appear to be the case when I look at the examples.
package edu.utah
#import edu.utah.cdmcc.entities.Patient;
import edu.utah.cdmcc.entities.GlucoseDecision;
rule "First Glucose Rule First File"
when
eval(1==1)
then
System.out.println("First Glucose Rule First File got called");
end
17 years, 1 month
Eclipse tools question
by J Michael Dean
I have created a drools "core" plugin that allows me to incorporate
Drools into an RCP. However, since doing so, the Eclipse tools for
Drools do not work properly, and there is indication of an error in
the drl file. Nevertheless, I can edit the file, the RCP runs with
the new rules, etc.
In my plugins, I have the main eclipse drools feature and plugin; in
my workspace I have the core drools project that contains the
compiler, core, and limited dependencies. I have also exported the
latter plugin, and dragged it into my eclipse installation.
Do these three different things foul each other up? Right now I do
not use a separate target for my RCP compilation, but just the main
IDE installation.
Very sorry if this is completely stupid - I am actually ecstatic that
I finally got the drools engine incorporated successfully into my
RCP. But the IDE is sure upset. Here is the trace when I try to save
the altered drl file (which does, in fact, save successfully despite
the trace):
!ENTRY org.eclipse.ui.workbench 4 2 2007-11-24 15:08:07.096
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at
org.drools.eclipse.util.ProjectClassLoader.getRawLocationFile(Unknown
Source)
at
org.drools.eclipse.util.ProjectClassLoader.getRawLocationURL(Unknown
Source)
at
org
.drools
.eclipse.util.ProjectClassLoader.getProjectClassPathURLs(Unknown Source)
at
org
.drools
.eclipse.util.ProjectClassLoader.getProjectClassPathURLs(Unknown Source)
at
org
.drools.eclipse.util.ProjectClassLoader.getProjectClassLoader(Unknown
Source)
at
org.drools.eclipse.DroolsEclipsePlugin.generateParsedResource(Unknown
Source)
at org.drools.eclipse.DroolsEclipsePlugin.parseResource(Unknown Source)
at
org
.drools
.eclipse.editors.outline.RuleContentOutlinePage.initRules(Unknown
Source)
at
org
.drools.eclipse.editors.outline.RuleContentOutlinePage.update(Unknown
Source)
at
org
.drools
.eclipse.editors.outline.RuleContentOutlinePage.createControl(Unknown
Source)
at
org
.eclipse
.ui
.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:
135)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:399)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:
741)
at
org
.eclipse
.ui
.views
.contentoutline.ContentOutline.partBroughtToTop(ContentOutline.java:210)
at org.eclipse.ui.internal.PartListenerList
$2.run(PartListenerList.java:87)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
org
.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:
57)
at
org
.eclipse
.ui
.internal.PartListenerList.firePartBroughtToTop(PartListenerList.java:
85)
at
org
.eclipse.ui.internal.PartService.firePartBroughtToTop(PartService.java:
87)
at
org
.eclipse
.ui
.internal
.WorkbenchPagePartList.firePartBroughtToTop(WorkbenchPagePartList.java:
75)
at
org
.eclipse
.ui
.internal
.WorkbenchPagePartList
.fireActiveEditorChanged(WorkbenchPagePartList.java:51)
at org.eclipse.ui.internal.PartList.setActiveEditor(PartList.java:152)
at
org
.eclipse.ui.internal.WorkbenchPage.makeActiveEditor(WorkbenchPage.java:
1224)
at
org
.eclipse.ui.internal.WorkbenchPage.updateActivePart(WorkbenchPage.java:
1169)
at org.eclipse.ui.internal.WorkbenchPage.partAdded(WorkbenchPage.java:
1583)
at
org
.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:
210)
at
org
.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:
774)
at
org
.eclipse
.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:
673)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:634)
at
org
.eclipse
.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:
2737)
at
org
.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:
2651)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:
2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:
2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:
67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
2590)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
2574)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
2565)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
at
org
.eclipse
.jdt
.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:
286)
at
org
.eclipse
.jdt
.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:
139)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:194)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:175)
at
org
.eclipse
.jdt
.ui
.actions
.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:268)
at
org
.eclipse
.jdt
.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:
244)
at
org
.eclipse
.jdt
.internal
.ui
.packageview
.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:
316)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart
$5.open(PackageExplorerPart.java:613)
at org.eclipse.jface.viewers.StructuredViewer
$2.run(StructuredViewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
at
org
.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:
818)
at
org
.eclipse
.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
at org.eclipse.jface.viewers.StructuredViewer
$6.handleOpen(StructuredViewer.java:1183)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257)
at org.eclipse.jface.util.OpenStrategy
$1.handleEvent(OpenStrategy.java:297)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java:2734)
at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.java:
1953)
at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:367)
at org.eclipse.swt.widgets.Display.controlProc(Display.java:835)
at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native
Method)
at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2363)
at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1262)
at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2819)
at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native
Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2938)
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:169)
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)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
!ENTRY org.eclipse.ui.workbench 4 2 2007-11-24 15:08:07.523
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at
org.drools.eclipse.util.ProjectClassLoader.getRawLocationFile(Unknown
Source)
at
org.drools.eclipse.util.ProjectClassLoader.getRawLocationURL(Unknown
Source)
at
org
.drools
.eclipse.util.ProjectClassLoader.getProjectClassPathURLs(Unknown Source)
at
org
.drools
.eclipse.util.ProjectClassLoader.getProjectClassPathURLs(Unknown Source)
at
org
.drools.eclipse.util.ProjectClassLoader.getProjectClassLoader(Unknown
Source)
at
org.drools.eclipse.DroolsEclipsePlugin.generateParsedResource(Unknown
Source)
at org.drools.eclipse.DroolsEclipsePlugin.parseResource(Unknown Source)
at
org
.drools
.eclipse.editors.outline.RuleContentOutlinePage.initRules(Unknown
Source)
at
org
.drools.eclipse.editors.outline.RuleContentOutlinePage.update(Unknown
Source)
at
org
.drools
.eclipse.editors.outline.RuleContentOutlinePage.createControl(Unknown
Source)
at
org
.eclipse
.ui
.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:
135)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:399)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:
741)
at org.eclipse.ui.internal.PartListenerList
$1.run(PartListenerList.java:72)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
org
.eclipse.ui.internal.PartListenerList.fireEvent(PartListenerList.java:
57)
at
org
.eclipse
.ui.internal.PartListenerList.firePartActivated(PartListenerList.java:
70)
at
org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:
73)
at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:
171)
at
org
.eclipse
.ui
.internal
.WorkbenchPagePartList
.fireActivePartChanged(WorkbenchPagePartList.java:56)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:
3402)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:
611)
at
org
.eclipse
.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:
2748)
at
org
.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:
2651)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:
2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:
2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:
67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
2590)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
2574)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:
2565)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603)
at
org
.eclipse
.jdt
.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:
286)
at
org
.eclipse
.jdt
.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:
139)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:194)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:175)
at
org
.eclipse
.jdt
.ui
.actions
.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:268)
at
org
.eclipse
.jdt
.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:
244)
at
org
.eclipse
.jdt
.internal
.ui
.packageview
.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:
316)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart
$5.open(PackageExplorerPart.java:613)
at org.eclipse.jface.viewers.StructuredViewer
$2.run(StructuredViewer.java:820)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
at
org
.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:
818)
at
org
.eclipse
.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079)
at org.eclipse.jface.viewers.StructuredViewer
$6.handleOpen(StructuredViewer.java:1183)
at
org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257)
at org.eclipse.jface.util.OpenStrategy
$1.handleEvent(OpenStrategy.java:297)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at org.eclipse.swt.widgets.Control.sendTrackEvents(Control.java:2734)
at org.eclipse.swt.widgets.Control.kEventControlTrack(Control.java:
1953)
at org.eclipse.swt.widgets.Widget.controlProc(Widget.java:367)
at org.eclipse.swt.widgets.Display.controlProc(Display.java:835)
at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native
Method)
at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2363)
at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1262)
at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2819)
at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget(Native
Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2938)
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:169)
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)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
!ENTRY org.eclipse.ui 4 4 2007-11-24 15:08:48.763
!MESSAGE Save Failed
!ENTRY org.eclipse.ui 2 0 2007-11-24 15:08:48.764
!MESSAGE Save Failed
!STACK 0
java.lang.NullPointerException
at
org.drools.eclipse.util.ProjectClassLoader.getRawLocationFile(Unknown
Source)
at
org.drools.eclipse.util.ProjectClassLoader.getRawLocationURL(Unknown
Source)
at
org
.drools
.eclipse.util.ProjectClassLoader.getProjectClassPathURLs(Unknown Source)
at
org
.drools
.eclipse.util.ProjectClassLoader.getProjectClassPathURLs(Unknown Source)
at
org
.drools.eclipse.util.ProjectClassLoader.getProjectClassLoader(Unknown
Source)
at
org.drools.eclipse.DroolsEclipsePlugin.generateParsedResource(Unknown
Source)
at org.drools.eclipse.DroolsEclipsePlugin.parseResource(Unknown Source)
at
org
.drools
.eclipse.editors.outline.RuleContentOutlinePage.initRules(Unknown
Source)
at
org
.drools.eclipse.editors.outline.RuleContentOutlinePage.update(Unknown
Source)
at org.drools.eclipse.editors.AbstractRuleEditor.doSave(Unknown Source)
at org.drools.eclipse.editors.DRLRuleEditor.doSave(Unknown Source)
at org.drools.eclipse.editors.DRLRuleEditor2.doSave(Unknown Source)
at org.eclipse.ui.internal.SaveableHelper$1.run(SaveableHelper.java:
143)
at org.eclipse.ui.internal.SaveableHelper$4.run(SaveableHelper.java:
266)
at
org
.eclipse
.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
at org.eclipse.jface.window.ApplicationWindow
$1.run(ApplicationWindow.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:
67)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:
755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:
2451)
at
org
.eclipse
.ui
.internal
.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:274)
at
org
.eclipse
.ui
.internal
.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:253)
at
org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:148)
at org.eclipse.ui.internal.EditorManager.savePart(EditorManager.java:
1345)
at org.eclipse.ui.internal.WorkbenchPage.savePart(WorkbenchPage.java:
3202)
at
org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:
3215)
at org.eclipse.ui.internal.SaveAction.run(SaveAction.java:73)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org
.eclipse
.jface
.action
.ActionContributionItem
.handleWidgetSelection(ActionContributionItem.java:546)
at org.eclipse.jface.action.ActionContributionItem.access
$2(ActionContributionItem.java:490)
at org.eclipse.jface.action.ActionContributionItem
$6.handleEvent(ActionContributionItem.java:443)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1495)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1519)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1504)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1295)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3350)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2954)
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:169)
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)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
17 years, 1 month
How to check to rules syntax before runtime?
by Kevin Delcroix
Hi everyone,
I would like to check if the rules syntax is correct before the rule
runtime. In fact, the end-user is the one which edits the rules and
saves them into the database. At a specific moment, the rules code is
loaded and executed. But for the moment, the rules the end-user typed
are not checked before the runtime of the rules.
So I would like to check the rules syntax when the end-user validates
the rules pseudo-code and show him if there are errors in his rule code.
Don't hesitate to ask me if it's not clear enougth.
Thanks in advance for your help.
Kevin
17 years, 1 month