sun/misc/Unsafe - Problem with OSGi
by sariman
Hi,
I am using Drools Fusion latest version and playing around with simple rules
and events. As long as I work in java environment everything works fine. But
I have to put my drools code into a bundle since I am working with OSGi
(framework: knopflerfish). OSGi uses it's own classloader and doesn't find
my rule files when I try to load them via
ResourceFactory.newClassPathResource(MyRules.drl).
Instead I am referencing the files with an absolute path like
ResourceFactor.newFileResource("C:\\path\\rules\\file.drl").
In this case the file is being found but I am getting the following
exception:
java.lang.NoClassDefFoundError: sun/misc/Unsafe
at
org.mvel2.optimizers.dynamic.DynamicClassLoader.(DynamicClassLoader.java:39)
...
exactly there where I load my file with the code sample above. I googled a
lot and read something about class paths for OSGi that I have to add this
file to the class path and so on. I tried to place the file somewhere else,
I tried to add it just like an external library - nothing worked.
Well, I would appreciate any ideas or suggestions if anyone has one.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/sun-misc-Unsafe-Probl...
Sent from the Drools - Dev mailing list archive at Nabble.com.
13 years, 8 months
Drools 5.2.0 head still failing tests?
by Laird Nelson
I am *not* trying to be annoying. :-) I just wanted to report that the
drools HEAD is still failing three tests (in drools-compiler):
Failed tests:
testBigDecimalWithFromAndEval(org.drools.integrationtests.MiscTest)
testFixModifyBlocks(org.drools.rule.builder.dialect.java.JavaConsequenceBuilderTest)
Tests in error:
testReturnValueException(org.drools.integrationtests.MiscTest)
I git pulled everything, cd'ed into drools, and ran mvn -U clean install.
I hope this helps. Edson, I know you're working on this; just wanted to
provide a data point. The latest git pull brought some stuff down, so I
wanted to retest.
Best,
Laird
13 years, 8 months
This Tuesday!!! - Red Hat & Accenture: BRMS & BPMS Event (London)
by Mark Proctor
http://blog.athico.com/2011/02/red-hat-accenture-brms-bpms-event.html
Reminder that this Tuesday 24th of March you can come and hear all about
Drools and jBPM5!!!!
Registration Page:
https://engage.redhat.com/forms/UK_Event_Accenture290311
Join Red Hat and Accenture on Tuesday 29th March at Accenture Old Bailey
to understand how Business Rules Management Systems (BRMS) and Business
Process Management Systems (BPMS) can help businesses leverage
technology more effectively and increase productivity. See how
Enterprise Open Source is leading the way with powerful capabilities and
industry-leading innovation.
There will be 2.5 hours of technical talks, starting at 9am. Full
timings and agenda here:
http://www.europe.redhat.com/events/rh-accenture-seminar/
Speakers:
Mark Proctor - Drools Co-Founder and Poject Lead
Kris Verlaenen - jBPM Lead
Michael Anstis
Geoffrey de Smet
Talks (from core developers, there are other talks too:
Introduction to Rule Based Systems (Mark Proctor)
Introduces Drools and explains what a rule based system is and how it
works. We will also cover event processing on a rule based system.
Why BPMN2 Matters (Kris Verlaenen)
jBPM5 has just been released as premier Open Source BPMN2
implementation. Come and hear how this changes your whole legacy
approach to BPM.
Using Guvnor for Enterprise Systems (Geoffrey de Smet)
Guvnor provides a web interface to your knowlege systems, such as rules
and bpm. This talk provides a gentle introduction into Guvnor and how to
use it.
Decision Tables in Depth (Michael Anstis)
Decision Tables is now a major focus for us, we want to show you why
we'll have the slicket decision table environment out there.
13 years, 8 months
An odd couple of patterns
by Wolfgang Laun
Has anybody ever seen a situation where a couple of patterns such as
Fact( field >= 10 )
not Fact( field > 20 )
was appropriate? This does not match Facts where field isn't between 10 and
20, and so it would seem to be the same as
Fact( field >= 10 && <= 20 )
but actually it doesn't match any such Fact whenever any *other* Fact with
field > 20 is around.
Cheers
Wolfgang
13 years, 8 months
Guvnor XSRF attack?
by Michael Anstis
Anybody else see these errors in Guvnor (5.2.0.M1)?
ERROR 03-02 16:35:38,914 (LoggingHelper.java:error:70) Blocked request
without GWT permutation header (XSRF attack?)
java.lang.SecurityException: Blocked request without GWT permutation header
(XSRF attack?)
GWT2.1 introduced support for preventing XSRF attacks; see
here<http://groups.google.com/group/google-web-toolkit/web/security-for-gwt-ap...>
.
I get these errors quite regularly (Firefox 3.6.13, Ubuntu 10.10) both in
hosted and web modes (Tomcat 6.0.30). I've looked through the GWT source and
(at least in hosted mode) the additional HTTP header to prevent these errors
are added as part of GWT's client-side serialisation before POSTing to our
RepositoryServiceServlet. I can't therefore explain why I therefore get
these errors. In my experience; once the error has occured and dismissed the
page\function\operation can be repeated without the error re-occuring (i.e.
view "Business rule assets" in the Tree Browser and it may fail the first
time; however works the next and the next... until the server is restarted,
when the cycle continues). The errors can be completely removed by
overriding GWT's
com.google.gwt.user.server.rpc.RemoteServiceServlet.checkPermutationStrongName
to not check the HTTP header and simply return; however this effectively
removes XSRF protection (although not implemented pre-GWT2.1 and hence not
in Guvnor <=5.1).
I put the email out so people are aware (we switched to GWT2.1 for 5.2.0.M1)
so our users may start to report the same error; in which case we should
perhaps be prepared for the quick fix...
With kind regards,
Mike
13 years, 8 months
Drools 5.2.0: basic grammar problems
by ljnelson
This (stupid, unit test) rule:
rule "Testing contains"
dialect "mvel"
when
Response( $answerSelections : answerSelections )
AnswerSelection( answer.ID in (2, 3) )
then
System.out.println("Testing contains activated")
end
Produces this error:
java.lang.AssertionError: KnowledgeBuilder errors:
Unable to Analyse Expression answer.ID == 2 || answer.ID == 3:
[Error: Failed to compile: 1 compilation error(s):
- (1,9) unqualified type in strict mode for: ID]
[Near : {... Unknown ....}]
^
[Line: 1, Column: 0] : [Rule name='Testing contains']
Note the implicit rewrite going on. Clearly contains() is getting rewritten
internally to a long disjunctive (x == 1 || x == 2 || x == 3 and so on).
For whatever reason, in Drools 5.2.0-SNAPSHOT, this runs afoul of MVEL's
strict mode, which if I'm understanding things properly shouldn't be visible
to the .drl developer.
I know that Drools 5.2.0-SNAPSHOT is a mess at the moment but wanted to pass
this along.
Best,
Laird
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-5-2-0-basic-gr...
Sent from the Drools - Dev mailing list archive at Nabble.com.
13 years, 8 months
DRL - Local objects
by Adhir Mehta
Hi,
I have written the rule DRL file having around 30 rules in it. Some of the
rules do intermediate calculation and those calculation result is expected
in the other rules in same DRL file. I can do this by modifying the facts
objects in one rule and get the value in other rule. However, modifying the
facts object rebuild the RETE tree and affects the performance. Is there any
way by which I can pass the data across the rules in same DRL file without
rebuilding the RETE tree. (I am more concerned about the performance)
Thanks,
Adhir
13 years, 8 months
Drools 5.2.0-SNAPSHOT: NoSuchMethodError
by ljnelson
Getting this this morning:
java.lang.NoSuchMethodError:
org.drools.spi.DeclarationScopeResolver.([Ljava/util/Map;Ljava/util/Stack;)V
at org.drools.rule.builder.RuleBuildContext.(RuleBuildContext.java:72)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1198)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:629)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
(other stack trace elements snipped for brevity)
I know I'm depending on a snapshot and I have no expectation of stability.
Just wanted to give a heads up.
Best,
Laird
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-5-2-0-SNAPSHOT...
Sent from the Drools - Dev mailing list archive at Nabble.com.
13 years, 8 months
Branch date for 5.2.0.M2 is Sunday 20-MAR-2011
by Geoffrey De Smet
Hi guys,
It's time to temporarily switch your mind from progressive mode to
conservative mode,
as the 5.2.0 release is coming closer:
We're estimating *the next branch date (for M2) on Sunday 20-MAR-2011.*
On that date the M2 release branch will copied from master and any new
commits won't make the M2 release,
unless they are manually merged to the release branch.
The release itself will follow a few days (or more) after that M2
release branch is thoroughly tested.
So try to get all your bugfixes in master before that date.
And try to get your current experimental and unstable features stable by
then.
And try to wait with adding new experimental and unstable
improvements/feature until after that date
(unless you still have the time to get them stable).
--
With kind regards,
Geoffrey De Smet
13 years, 8 months