Failure to load module 'org.drools.guvnor.Guvnor'
by Ashish Soni
Hi All ,
When i try to debug the Guvnor using eclipse and GWT shell i am getting
below error can some one please let me know what is the issue
[ERROR] Failure to load module 'org.drools.guvnor.Guvnor'
java.lang.NoSuchMethodError:
org.eclipse.jdt.internal.compiler.lookup.ProblemReferenceBinding.closestMatch()Lorg/eclipse/jdt/internal/compiler/lookup/ReferenceBinding;
at
com.google.gwt.dev.javac.LongFromJSNIChecker$CheckingVisitor.findClass(LongFromJSNIChecker.java:195)
at
com.google.gwt.dev.javac.LongFromJSNIChecker$CheckingVisitor.getMethod(LongFromJSNIChecker.java:223)
at
com.google.gwt.dev.javac.LongFromJSNIChecker$CheckingVisitor.checkMethodRef(LongFromJSNIChecker.java:100)
at
com.google.gwt.dev.javac.LongFromJSNIChecker$CheckingVisitor.checkRefs(LongFromJSNIChecker.java:140)
at
com.google.gwt.dev.javac.LongFromJSNIChecker$CheckingVisitor.endVisit(LongFromJSNIChecker.java:63)
at
org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:242)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1239)
at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:687)
at
com.google.gwt.dev.javac.LongFromJSNIChecker.check(LongFromJSNIChecker.java:307)
at
com.google.gwt.dev.javac.LongFromJSNIChecker.check(LongFromJSNIChecker.java:297)
at
com.google.gwt.dev.javac.CompilationUnitInvalidator.validateCompilationUnits(CompilationUnitInvalidator.java:138)
at
com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:123)
at com.google.gwt.dev.cfg.ModuleDef.updateTypeOracle(ModuleDef.java:477)
at com.google.gwt.dev.cfg.ModuleDef.getTypeOracle(ModuleDef.java:324)
at
com.google.gwt.dev.GWTShell$BrowserWidgetHostImpl.createModuleSpaceHost(GWTShell.java:252)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:72)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:139)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at
org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
15 years, 4 months
Backport Drools 5 (with Fusion) to Java 1.4
by Thomas Frenken
Hello,
I am interested in running Drools 5 (and especially Drools Fusion) on a
>>somehow<< resource-constrained device for which only a J2SE 1.4 VM ist
available.
Since Drools meanwhile requires J2SE 1.5 I thought about backporting it.
But before I invest so much effort, I got two questions:
1) I have downloaded the sourcecode. At a first glance the only reason for
requiering J2SE 1.5 is the extensive use of generics. In case I would
remove all generics from the code, would it be possible to compile drools
for a J2SE 1.4 VM runtime in general or are there other more hidden
reasons for requiering J2SE 1.5?
2) I already meantioned I am planning to run drools on a >>somehow<<
resourcen-constrained device. I explicitly used the term >>somehow<<
because I am talking of a device with a 400 Mhz CPU and 256 MB RAM (some
people might laugh about calling this resource-constrained). How about
resource-consumption of drools? Has anyone run drools on a device with
similar resources?
Thanks in advance!
Best Regards
Thomas Frenken
15 years, 4 months
Exception with Drools-XLS and Maven: "An error occured opening the workbook."
by Bernd Rücker
Hi all.
I recently had the same exception as reported in
<https://jira.jboss.org/jira/browse/GUVNOR-286>
https://jira.jboss.org/jira/browse/GUVNOR-286, but didnt find anything on
the web. We currently have the same error with Maven and Drools 5.0.1,
very strange:
Testcode
public static void main(String[] args) {
final DecisionTableConfiguration dtableconfiguration =
KnowledgeBuilderFactory.newDecisionTableConfiguration();
dtableconfiguration.setInputType( DecisionTableInputType.XLS
);
final KnowledgeBuilder kbuilder =
KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(
ResourceFactory.newClassPathResource("Sample.xls", Test.class ),
ResourceType.DTABLE,
dtableconfiguration );
final KnowledgeBase kbase =
KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages( kbuilder.getKnowledgePackages() );
// typical decision tables are used statelessly
StatefulKnowledgeSession ksession =
kbase.newStatefulKnowledgeSession();
}
Stacktrace:
org.drools.template.parser.DecisionTableParseException: An error occured
opening the workbook. It is possible that the encoding of the document did
not match the encoding of the reader.
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java
:89)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.j
ava:90)
at
org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.j
ava:69)
at
org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionT
ableProviderImpl.java:29)
at
org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(Dec
isionTableProviderImpl.java:19)
at
org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTable
Factory.java:16)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.jav
a:508)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java
:31)
at Test.main(Test.java:21)
Caused by: jxl.read.biff.BiffException: Unable to recognize OLE stream
at jxl.read.biff.CompoundFile.<init>(CompoundFile.java:111)
at jxl.read.biff.File.<init>(File.java:113)
at jxl.Workbook.getWorkbook(Workbook.java:250)
at jxl.Workbook.getWorkbook(Workbook.java:235)
at
org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java
:74)
... 8 more
The strange thing: When we tried it with Eclipse (3.4.2) and created a
Drools project, everything worked. When we created a maven project and
added exactly the same libraries, the exception was caused.
We tracked it down to the .project file:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>iks_drools</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<!-- buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand -->
<buildCommand>
<name>org.drools.eclipse.droolsbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<!-- nature>org.maven.ide.eclipse.maven2Nature</nature -->
</natures>
</projectDescription>
With the comments it works, without the comments and the maven2Builder and
natures it causes the exception. We are puzzled.
Any ideas?
Hopefully it is OK to post that to the dev lists, seems a pretty deep
thing
Thanks a lot and Cheers
Bernd
15 years, 4 months
Accumulate are slow issues + how to benchmark accumulate yourself
by Geoffrey De Smet
I've talked with edson and later mark a bit on IRC and they identified 3
issues which I created in JIRA:
https://jira.jboss.org/jira/browse/JBRULES-2238
Accumulate should be implemented with left-input incremental so they
don't start from scratch on every left-input retraction/assertion
https://jira.jboss.org/jira/browse/JBRULES-2239
Batching accumulate to avoid wasteful re-propagations
https://jira.jboss.org/jira/browse/JBRULES-2240
True modify
You can easily benchmark any before and after your changes with this
"run configuration":
- Project: drools-solver-examples
- Run configuration name: ExaminationBenchmarkApp short
- Main class:
org.drools.solver.examples.itc2007.examination.app.ExaminationBenchmarkApp
- VM parameters: -Xms256m -Xmx512m -server
- Program parameters: short
- Working directory: .../drools/drools-solver/drools-solver-examples
If you run this, it will do a 100 steps of the examination problem (on
my pc this takes 71s). The last line of output will be like this:
2009-08-08 10:10:55,499 [main] INFO Solved at step index (99) with time
spend (71524) for best score (0hard/-7545soft).
The "time spend (71524)" tells you how many milliseconds it took.
The "best score (0hard/-7545soft)" should never change in any changes
you make.
You'll want to make changes in the examinationScoreRules.drl file:
drools/drools-solver/drools-solver-examples/src/main/resources/org/drools/solver/examples/itc2007/examination/solver/examinationScoreRules.drl
There are 3 rules of interest in there that use accumulate:
rule "roomCapacityTooSmall" // TODO improve performance, as it takes 50%
of the performance
rule "hardConstraintsBroken"
rule "softConstraintsBroken"
PS: Note that drools-solver on trunk is fixed on drools-core 5.0.1 in
the drools-solver pom.xml (you can easily change this).
--
With kind regards,
Geoffrey De Smet
15 years, 4 months
Why is this DRL twice as slow?
by Geoffrey De Smet
Hi guys,
I've run some experiments on the DRL's used in the drools solver
examination example to see how the DRL affects performance.
In one experiment, I merged 2 rules into 1 rule:
I changed this DRL part of examinationScoreRules.drl:
rule "hardConstraintsBroken"
salience -1
when
$hardTotal : Number() from accumulate(
IntConstraintOccurrence(constraintType ==
ConstraintType.NEGATIVE_HARD, $weight : weight),
sum($weight)
);
then
scoreCalculator.setHardConstraintsBroken($hardTotal.intValue());
end
rule "softConstraintsBroken"
salience -1
when
$softTotal : Number() from accumulate(
IntConstraintOccurrence(constraintType ==
ConstraintType.NEGATIVE_SOFT, $weight : weight),
sum($weight)
);
then
scoreCalculator.setSoftConstraintsBroken($softTotal.intValue());
end
into this DRL part:
rule "constraintsBroken"
salience -1
when
$hardTotal : Number() from accumulate(
IntConstraintOccurrence(constraintType ==
ConstraintType.NEGATIVE_HARD, $weight : weight),
sum($weight)
);
$softTotal : Number() from accumulate(
IntConstraintOccurrence(constraintType ==
ConstraintType.NEGATIVE_SOFT, $weight : weight),
sum($weight)
);
then
scoreCalculator.setHardConstraintsBroken($hardTotal.intValue());
scoreCalculator.setSoftConstraintsBroken($softTotal.intValue());
end
Now the performance for a 100 steps when from 71s to 172s, so it more
then doubled.
All other code stayed the same and the output (except for the times) is
exactly the same.
What can explain this loss in performance?
--
With kind regards,
Geoffrey De Smet
15 years, 4 months
Do you love to play Magic The Gathering? (Renton, WA) (Job Posting)
by Mark Proctor
http://blog.athico.com/2009/08/do-you-love-to-play-magic-gathering.html
This came up in my google alerts today, and applying Drools to computer
games is something I've always wanted to see happen :) If anyone gets
the contract, you can be sure the Drools team will be available to you
for direct free mentoring - actually I insist on it :)
Do you love to play Magic The Gathering? (Renton, WA)
<http://seattle.craigslist.org/est/sof/1309824161.html>
http://seattle.craigslist.org/est/sof/1309824161.html
------------------------------------------------------------------------
Date: 2009-08-06, 4:44PM PDT
Reply to: job-vtfwu-1309824161(a)craigslist.org
<mailto:job-vtfwu-1309824161@craigslist.org?subject=Do%20you%20love%20to%20play%20Magic%20The%20Gathering%3F%20%28Renton%2C%20WA%29&body=%0A%0Ahttp%3A%2F%2Fseattle.craigslist.org%2Fest%2Fsof%2F1309824161.html%0A>
^[Errors when replying to ads?
<http://www.craigslist.org/about/help/replying_to_posts>]
------------------------------------------------------------------------
Do you love to play Magic The Gathering and have experience with technology?
We are looking for a consultant to provide an initial assessment of the
applicability of rules and constraint based programming to the on-line
version of the game Magic: The Gathering.
The initial engagement is for one to two weeks and the bulk of the work
can be done remotely with flexible hours.
Mandatory qualifications are as follows:
1. At least 3 years of Magic: The Gathering play experience.
2. Active user of Magic: The Gathering Online
3. A Pro Tour Level Player or certified Magic Judge
4. At least 3 years of rule based programming experience in at least two
of the following tools:
a)Eclipse Rules/ Oracle Policy Automation
b)Clips
c)Jess
d)Corticon Rules
e)BizTalk Rules
f)JBoss Rules
g)Art Enterprise
h)OPS 83
i)ILog/IBM Rules
5. A theoretical understanding of the Rete algorithm and other rule
processing optimizations
6. Experience with all of the following:
a)Natural or domain language rule expression
b)Programming language rule expression
c)Visual rule editing and diagramming
Most of the work can be done remotely, however some on-site meetings
will be required. Estimate of 20-80 hours of total work over two weeks,
could be an on-going need if you like the work
If you are interested in applying, please send me your current word.doc
resume and let me know a good time to give you a call.
* Location: Renton, WA
* Compensation: Competitive
* Telecommuting is ok.
* This is a part-time job.
* This is a contract job.
* Principals only. Recruiters, please don't contact this job poster.
* Please, no phone calls about this job!
* Please do not contact job poster about other services, products or
commercial interests.
15 years, 4 months
Re: [rules-dev] [rules-users] MVEL parsing / keyword conflict
by Edson Tirelli
The DRL parser requires that the argument expression to a "from" CE be a
function call or a chained call to methods. The work around to that is to
call the MVEL "function" "return":
$items: LinkedList (size > 1) from collect ( Model ( ) from return(
object.getOriginal(null) in spatialIndex.query(...) ) )
This way, the parser will passthrough whatever he finds inside the
return( ... ) to MVEL. Let us know if it works for you. I never tested that.
[]s
Edson
2009/8/5 Simon Thum <simon.thum(a)gmx.de>
> Edson Tirelli wrote:
> > Simon,
> >
> > Can you show us what syntax are you trying?
> Sure, I was just speculating it's known or trivial.
>
> Works:
> $items: LinkedList (size > 1) from collect ( Model ( ) from
> spatialIndex.query(...) )
>
> Fails:
>
> $items: LinkedList (size > 1) from collect ( Model ( ) from
> >object.getOriginal(null) in spatialIndex.query(...)< )
>
> The angle brackets aren't typed, they just mark what's intended as mvel.
>
> >
> > []s
> > Edson
> >
> > 2009/8/5 Simon Thum <simon.thum(a)gmx.de>
> >
> >> Hi all,
> >>
> >> I've stumbled on some mvel integration issues in 5.0.1. I'm using drools
> >> to do, among others, spatial reasoning. At insertion time I maintain a
> >> specialized index, which can be queried later using [collect] from. This
> >> works fine in general.
> >>
> >> However, as soon as I use the mvel 2 projections a.k.a. 'in' keyword,
> >> hell breaks loose. 'in' is described here:
> >> http://mvel.codehaus.org/MVEL+2.0+Projections+and+Folds
> >>
> >> But I only seem to get syntax errors. If it is possible, to somehow
> >> escape keywords or explicitly pipe through the mvel part, please let me
> >> know!
> >>
> >> Needless to say, this feature would be great to have since my object
> >> model is mainly fixed and 'is' allows me to compensate that. Worse, I'd
> >> need to assert objects I don't want to assert to work around.
> >>
> >> I tried parenthesizing, only to discover that
> >> ... from valid_stmt
> >>
> >> is fine, but
> >>
> >> ... from (valid_stmt)
> >>
> >> won't work either. Error 101, reason unknown, but it doesn't even make
> >> it through the parser.
> >>
> >> I'd really appreciate to be given an idea why what I did went wrong.
> >> Googling around didn't get me too far.
> >>
> >> Cheers,
> >>
> >> Simon
> >> _______________________________________________
> >> 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
>
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
15 years, 4 months
Returned mail: Data format error
by Mail Delivery Subsystem
The original message was received at Mon, 3 Aug 2009 17:07:59 +0800
from lists.jboss.org [180.117.154.84]
----- The following addresses had permanent fatal errors -----
rules-dev(a)lists.jboss.org
----- Transcript of session follows -----
... while talking to lists.jboss.org.:
>>> DATA
<<< 400-aturner; -RMS-E-CRE, ACP file create failed
<<< 400
15 years, 4 months