Guvnor, Apache Tomcat, and Active directory
by Dean Whisnant
Has anyone connected Guvnor on Apache Tomcat to Active Directory? I know the components.xml file is where we setup the security, but I haven't been able to find any examples of using active directory in my config. I am using 5.1.1 of Guvnor, 7.x of Tomcat, on a windows server.
Any thoughts?
Thanks
Dean
14 years, 9 months
Agenda-group usage
by dbfree75
Hi,
I'm using Drools 5.1.
I set one agenda-goup with an auto-focus set on rule of the greatest
salience.
I'm using multithreading to launch multiple sessions in parallel.
Problem is that I'm not getting same results whether I put 1 or multiple
facts in sessions.
It is as if rules weren't evaluated for facts in case multiple facts were
inserted in sessions.
I suppose I'm not understanding well usage of agenda-group.
What I would like to to do is to :
- first evaluate set of rules for inserted facts,
- once all previous facts were updated by first set of rules, evaluate
default set of rules for other facts and previous updated facts.
Is agenda-group adapted for such a result ? How can I explain differences
found depending of number of facts inserted in sessions working in parallel
?
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Agenda-group-usage-tp3081103p3081103.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 9 months
KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
by Lisa Horton
Drools 5.1.1
I create a package from a decision table:
ObjectOutputStream out;
try {
out = new ObjectOutputStream(new FileOutputStream("venue.pkg"));
out.writeObject(knowledgeBase.getKnowledgePackages()); // knowledgeBase previously loaded from spreadsheet
out.close();
} catch (IOException ex) {
logger.debug(ex.getMessage());
}
I can load this package directly into a knowledge base and run rules with no errors:
ObjectInputStream in;
Collection<KnowledgePackage> packages = null;
try {
in = new ObjectInputStream(new FileInputStream("venue.pkg"));
packages = (Collection<KnowledgePackage>) in.readObject();
in.close();
} catch (Exception ex) {
logger.debug(ex.getMessage());
}
knowledgeBase.addKnowledgePackages(packages);
HOWEVER if I try to load the same package using a knowledge agent:
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("TheAgent");
kagent.applyChangeSet(ResourceFactory.newFileResource("ChangeSet.xml"));
The package does not load. Any idea of the cause of these exceptions?
[2011:06:165 10:06:159:info] ResourceChangeNotification created
[2011:06:165 10:06:161:info] ResourceChangeScanner reconfigured with interval=60
[2011:06:165 10:06:161:info] ResourceChangeScanner created with default interval=60
[2011:06:165 10:06:162:debug] ResourceChangeNotification monitor added monitor=org.drools.io.impl.ResourceChangeScannerImpl@5c73a7ab
[2011:06:165 10:06:163:debug] KnowledgeAgent building resource map
[2011:06:165 10:06:163:info] KnowledegAgent has started listening for ChangeSet notifications
[2011:06:165 10:06:163:info] KnowledgeAgent created, with configuration:
monitorChangeSetEvents=true scanResources=true scanDirectories=true newInstance=true
[2011:06:165 10:06:413:info] KnowledgeAgent applying ChangeSet
[2011:06:165 10:06:415:debug] KnowledgeAgent notifier subscribing to resource=[ClassPathResource path='com/abclegal/rules/resources/venue.pkg']
[2011:06:165 10:06:415:debug] ResourceChangeNotification subscribing listener=org.drools.agent.impl.KnowledgeAgentImpl@5fe0f2f6 to resource=[ClassPathResource path='com/abclegal/rules/resources/venue.pkg']
[2011:06:165 10:06:416:debug] ResourceChangeScanner subcribing notifier=org.drools.io.impl.ResourceChangeNotifierImpl@296f25a7 to resource=[ClassPathResource path='com/abclegal/rules/resources/venue.pkg']
[2011:06:165 10:06:416:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet
[2011:06:165 10:06:556:exception]
java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:664)
at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:889)
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:704)
at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:584)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:168)
at com.abclegal.rules.RulesUtilities.createKnowledgeBaseUsingAgent(RulesUtilities.java:91)
at com.abclegal.rules.RulesBenchmarks.benchmarkVenueSelection(RulesBenchmarks.java:39)
at com.abclegal.rules.RulesBenchmarks.main(RulesBenchmarks.java:33)
Caused by: java.lang.ClassCastException: [B cannot be cast to org.drools.rule.DialectRuntimeRegistry
at org.drools.rule.Package.readExternal(Package.java:197)
at org.drools.definitions.impl.KnowledgePackageImp.readExternal(KnowledgePackageImp.java:115)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1791)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at java.util.ArrayList.readObject(ArrayList.java:593)
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:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:205)
at org.drools.core.util.DroolsStreamUtils.streamIn(DroolsStreamUtils.java:174)
at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:653)
... 8 more
[2011:06:165 10:06:856:debug] KnowledgeAgent obtaining pkg resource=[ClassPathResource path='com/abclegal/rules/resources/venue.pkg']
[2011:06:165 10:06:856:exception]
java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:914)
at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:704)
at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:584)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:168)
at com.abclegal.rules.RulesUtilities.createKnowledgeBaseUsingAgent(RulesUtilities.java:91)
at com.abclegal.rules.RulesBenchmarks.benchmarkVenueSelection(RulesBenchmarks.java:39)
at com.abclegal.rules.RulesBenchmarks.main(RulesBenchmarks.java:33)
Caused by: java.lang.NullPointerException
at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:906)
... 7 more
[2011:06:165 10:06:865:info] KnowledgeAgent new KnowledgeBase now built and in use
[2011:06:165 10:06:865:debug] KnowledgeAgent finished rebuilding KnowledgeBase using ChangeSet
14 years, 9 months
Two drools that validate the same instance in one Guvnor package
by Serge Vilvovsky
I am a beginner with drools, sorry, if the question is too trivial.
I have two drl files A and B. Both they validate the instance of the same
type T, but produce the different output.
I call the drool A within one business flow and drool B within another flow.
Before now I ran them locally, creating two separate KnowledgeBases, and
everything worked fine. Now I want to use the Guvnor.
If I put them to the same package and run:
http://<server>/guvnor-webapp/org.drools.guvnor.Guvnor/package/<packageName>/LATEST
I will get the KnowledgeBase that contains them both, I believe. According
to my understanding, because they process the instance of the same type, I
cannot use such KnowledgeBase.
What should I do? Is it any API that allows to distinguish the
KnowelageBases for the different drools within the same package or I need to
put them to the different packages?
Thank you!
14 years, 9 months
Now that @author is gone...
by Wolfgang Laun
...there are still some relics around: old CVS tags. For instance, in
org/drools/conflict/FifoConflictResolver.java we find:
* @version $Id: RandomConflictResolver.java,v 1.1 2004/06/25 01:55:16
mproctor
* Exp $
For the drools repository:
drools[FIX-INF]$ grep -l '@version' $j
./drools-compiler/src/test/java/org/drools/IndexedNumber.java
./drools-core/src/test/java/org/drools/factmodel/InstancesHashcodedTest.java
./drools-core/src/test/java/org/drools/spi/MockObjectType.java
./drools-core/src/main/java/org/drools/RuleIntegrationException.java
./drools-core/src/main/java/org/drools/base/ClassObjectType.java
./drools-core/src/main/java/org/drools/spi/ConflictResolver.java
./drools-core/src/main/java/org/drools/spi/Accumulator.java
./drools-core/src/main/java/org/drools/spi/RuleComponent.java
./drools-core/src/main/java/org/drools/ProcessIntegrationException.java
./drools-core/src/main/java/org/drools/rule/Package.java
./drools-core/src/main/java/org/drools/rule/FixedDuration.java
./drools-core/src/main/java/org/drools/core/util/StringUtils.java
./drools-core/src/main/java/org/drools/core/util/CompositeCollection.java
./drools-core/src/main/java/org/drools/core/util/IteratorChain.java
./drools-core/src/main/java/org/drools/core/util/ArrayUtils.java
./drools-core/src/main/java/org/drools/core/util/ArrayIterator.java
./drools-core/src/main/java/org/drools/common/AbstractRuleBase.java
./drools-core/src/main/java/org/drools/common/InstanceEqualsConstraint.java
./drools-core/src/main/java/org/drools/conflict/AbstractConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/TotalRecencyConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/FifoConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/ComplexityConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/SimplicityConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/SalienceConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/LifoConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/RandomConflictResolver.java
./drools-core/src/main/java/org/drools/conflict/LoadOrderConflictResolver.java
./drools-core/src/main/java/org/drools/util/codec/StringUtils.java
./drools-core/src/main/java/org/drools/util/codec/Base64.java
./drools-core/src/main/java/org/drools/util/codec/CharEncoding.java
./drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java
./drools-core/src/main/java/org/drools/reteoo/ReteooRuleBase.java
./drools-jsr94/src/test/java/org/drools/jsr94/rules/repository/RuleExecutionSetRepositoryLoaderTest.java
./drools-jsr94/src/test/java/org/drools/jsr94/rules/repository/TestRuleExecutionSetRepository.java
./drools-jsr94/src/main/java/org/drools/jsr94/rules/repository/RuleExecutionSetRepositoryLoader.java
./drools-jsr94/src/main/java/org/drools/jsr94/rules/repository/RuleExecutionSetRepositoryException.java
14 years, 9 months
FW: Drools in non-eclipse environment
by Abhay B. Chaware
I am have now managed to get past all the compiler errors for Drools on android .. ( I think ) :) .
My app is failing ( crashing ) when run on android device. Looking at the log, appears to be a heap memory problem, can anyone see anything suspicious here in the android log, that may point to the drools code as suspect ?
I/DEBUG ( 1280): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 1280): Build fingerprint: 'samsung/GT-I9003/GT-I9003/GT-I9003:2.2.1/FROYO/XXKB3:user/release-keys'
I/DEBUG ( 1280): pid: 11341, tid: 11341 >>> com.first <<<
I/DEBUG ( 1280): signal 11 (SIGSEGV), fault addr 0000004c
I/DEBUG ( 1280): r0 00000000 r1 4831de40 r2 00000000 r3 00000000
I/DEBUG ( 1280): r4 809a2400 r5 00240d00 r6 00000000 r7 0000cd28
I/DEBUG ( 1280): r8 80917040 r9 0000cd28 10 430cb970 fp bea15728
I/DEBUG ( 1280): ip 00000000 sp bea153a8 lr 809681f7 pc 8096809c cpsr 80000070
I/DEBUG ( 1280): d0 65643a64696f7262 d1 0065006400610075
I/DEBUG ( 1280): d2 4ba11af200000567 d3 000000004b815b67
I/DEBUG ( 1280): d4 0065007400730079 d5 00610050002e006d
I/DEBUG ( 1280): d6 006c004300680074 d7 3eaaaaab3f800000
I/DEBUG ( 1280): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 1280): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 1280): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 1280): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 1280): d16 ade4622100000000 d17 0064002f005b0072
I/DEBUG ( 1280): d18 002f006100740061 d19 002f007000700061
I/DEBUG ( 1280): d20 0073002e006b0069 d21 0065007400730079
I/DEBUG ( 1280): d22 00610050002e006d d23 006c004300680074
I/DEBUG ( 1280): d24 3ff0000000000000 d25 0000000000000000
I/DEBUG ( 1280): d26 0000000000000000 d27 0000000000000000
I/DEBUG ( 1280): d28 0000000000000000 d29 0000000000000000
I/DEBUG ( 1280): d30 0000000000000000 d31 0000000000000000
I/DEBUG ( 1280): scr 80000012
I/DEBUG ( 1280):
I/DEBUG ( 1280): #00 pc 0006809c /system/lib/libdvm.so
I/DEBUG ( 1280): #01 pc 000681f2 /system/lib/libdvm.so
I/DEBUG ( 1280): #02 pc 00068238 /system/lib/libdvm.so
I/DEBUG ( 1280): #03 pc 000690a6 /system/lib/libdvm.so
I/DEBUG ( 1280): #04 pc 00061a0c /system/lib/libdvm.so
I/DEBUG ( 1280): #05 pc 00063f1a /system/lib/libdvm.so
I/DEBUG ( 1280): #06 pc 0001bdd8 /system/lib/libdvm.so
I/DEBUG ( 1280): #07 pc 000227d4 /system/lib/libdvm.so
I/DEBUG ( 1280): #08 pc 00021674 /system/lib/libdvm.so
I/DEBUG ( 1280): #09 pc 0005c7d6 /system/lib/libdvm.so
I/DEBUG ( 1280): #10 pc 00064ef8 /system/lib/libdvm.so
I/DEBUG ( 1280): #11 pc 0001bdd8 /system/lib/libdvm.so
I/DEBUG ( 1280): #12 pc 000227d4 /system/lib/libdvm.so
I/DEBUG ( 1280): #13 pc 00021674 /system/lib/libdvm.so
I/DEBUG ( 1280): #14 pc 0005c614 /system/lib/libdvm.so
I/DEBUG ( 1280): #15 pc 00047cd6 /system/lib/libdvm.so
I/DEBUG ( 1280): #16 pc 000364b4 /system/lib/libandroid_runtime.so
I/DEBUG ( 1280): #17 pc 0003808c /system/lib/libandroid_runtime.so
I/DEBUG ( 1280): #18 pc 00008ca8 /system/bin/app_process
I/DEBUG ( 1280): #19 pc 0000d404 /system/lib/libc.so
I/DEBUG ( 1280):
I/DEBUG ( 1280): code around pc:
I/DEBUG ( 1280): 8096807c 0f02f1be 2500bfd8 b0054628 bf00bdf0
I/DEBUG ( 1280): 8096808c 0003a3c8 000003a0 fffc3f91 41f0e92d
I/DEBUG ( 1280): 8096809c 4d216cc3 4606a200 18ad460f d0384299
I/DEBUG ( 1280): 809680ac e078f8df 400ef855 208cf8d4 0014f112
I/DEBUG ( 1280): 809680bc eb0cf7ae c094f8d4 f1bc6a73 bf180100
I/DEBUG ( 1280):
I/DEBUG ( 1280): code around lr:
I/DEBUG ( 1280): 809681d4 461a9905 633e1820 fb12f7d9 46089902
I/DEBUG ( 1280): 809681e4 f7e84639 e004faa7 99044610 f7ff4616
I/DEBUG ( 1280): 809681f4 9803ff51 f7e82100 4628fa9d ed6af7ae
I/DEBUG ( 1280): 80968204 b0094630 bf00bdf0 0003a2c8 fffe46a4
I/DEBUG ( 1280): 80968214 ffff026e ffff1926 fffe2288 ffff194c
I/DEBUG ( 1280):
I/DEBUG ( 1280): stack:
I/DEBUG ( 1280): bea15368 430faf80 /dev/ashmem/dalvik-LinearAlloc (deleted)
I/DEBUG ( 1280): bea1536c 0000cd28 [heap]
I/DEBUG ( 1280): bea15370 bea153c4 [stack]
I/DEBUG ( 1280): bea15374 8095c61d /system/lib/libdvm.so
I/DEBUG ( 1280): bea15378 8099266e /system/lib/libdvm.so
I/DEBUG ( 1280): bea1537c 4831de40 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 1280): bea15380 439121ed /system/framework/core.odex
I/DEBUG ( 1280): bea15384 00000000
I/DEBUG ( 1280): bea15388 bea15340 [stack]
I/DEBUG ( 1280): bea1538c 0000001f
I/DEBUG ( 1280): bea15390 80993d3a /system/lib/libdvm.so
I/DEBUG ( 1280): bea15394 809a2400 /system/lib/libdvm.so
I/DEBUG ( 1280): bea15398 00240d00 [heap]
I/DEBUG ( 1280): bea1539c 00000000
I/DEBUG ( 1280): bea153a0 df002777
I/DEBUG ( 1280): bea153a4 e3a070ad
I/DEBUG ( 1280): #00 bea153a8 809a2400 /system/lib/libdvm.so
I/DEBUG ( 1280): bea153ac 00240d00 [heap]
I/DEBUG ( 1280): bea153b0 00000000
I/DEBUG ( 1280): bea153b4 0000cd28 [heap]
I/DEBUG ( 1280): bea153b8 80917040 /system/lib/libdvm.so
I/DEBUG ( 1280): bea153bc 809681f7 /system/lib/libdvm.so
I/DEBUG ( 1280): #01 bea153c0 4867acc0 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 1280): bea153c4 400092d0 /dev/ashmem/mspace/dalvik-heap/zygote/0 (deleted)
I/DEBUG ( 1280): bea153c8 00000000
I/DEBUG ( 1280): bea153cc 4867acc0 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 1280): bea153d0 4831de40 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 1280): bea153d4 00240ce8 [heap]
I/DEBUG ( 1280): bea153d8 00000000
I/DEBUG ( 1280): bea153dc ade46221 /system/lib/libicuuc.so
I/DEBUG ( 1280): bea153e0 00000001
I/DEBUG ( 1280): bea153e4 00240ce8 [heap]
I/DEBUG ( 1280): bea153e8 4831de40 /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG ( 1280): bea153ec 809a2400 /system/lib/libdvm.so
I/DEBUG ( 1280): bea153f0 00240cd0 [heap]
I/DEBUG ( 1280): bea153f4 8096823d /system/lib/libdvm.so
-abhay
________________________________
From: Abhay B. Chaware
Sent: Monday, June 13, 2011 9:43 AM
To: 'Rules Users List'
Subject: FW: [rules-users] Drools in non-eclipse environment
Any ideas folks ?
________________________________
From: Abhay B. Chaware
Sent: Friday, June 10, 2011 12:54 PM
To: 'Rules Users List'
Subject: RE: [rules-users] Drools in non-eclipse environment
The ride's real fun :)
Got apache harmony's beans.jar to work .. now , when I am reading the serialized knowledgebase object on android, quite obvious, it is throwing this error -
java.lang.UnsupportedOperationException: can't load this type of class file
since my serialized knowledgebase object is in java format .. and not dex. Can this serialized version be converted into .dex format using the "dx" utility - pre or post serialization ? I tried the "dx" tool on the serialized object, but it doesn't seem to understand the format.
-abhay
________________________________
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Michael Anstis
Sent: Thursday, June 09, 2011 6:37 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment
http://meteatamel.wordpress.com/2010/08/25/android-api-and-java-beans-pac...
http://meteatamel.wordpress.com/2010/09/28/android-api-and-java-beans-pac...
Enjoy the ride ;)
2011/6/9 Abhay B. Chaware <Abhay.Chaware(a)kpitcummins.com<mailto:Abhay.Chaware@kpitcummins.com>>
woo hooo ! I got past that problem :) But a new one's here now.
Looks like MVEL is not liking something :)
W/dalvikvm(29977): VFY: unable to resolve static method 164: Ljava/beans/Introspector;.decapitalize (Ljava/lang/String;)Ljava/lang
/String;
W/dalvikvm(29977): threadid=1: thread exiting with uncaught exception (group=0x40020ac0)
E/AndroidRuntime(29977): FATAL EXCEPTION: main
E/AndroidRuntime(29977): java.lang.NoClassDefFoundError: java.beans.Introspector
E/AndroidRuntime(29977): at org.drools.core.util.asm.ClassFieldInspector.calcFieldName(ClassFieldInspector.java:298)
E/AndroidRuntime(29977): at org.drools.core.util.asm.ClassFieldInspector.addToMapping(ClassFieldInspector.java:216)
E/AndroidRuntime(29977): at org.drools.core.util.asm.ClassFieldInspector.processClassWithoutByteCode(ClassFieldInspector.ja
va:148)
E/AndroidRuntime(29977): at org.drools.core.util.asm.ClassFieldInspector.<init>(ClassFieldInspector.java:83)
E/AndroidRuntime(29977): at org.drools.core.util.asm.ClassFieldInspector.<init>(ClassFieldInspector.java:64)
E/AndroidRuntime(29977): at org.drools.base.ClassFieldAccessorFactory.getClassFieldReader(ClassFieldAccessorFactory.java:11
8)
E/AndroidRuntime(29977): at org.drools.base.ClassFieldAccessorCache$CacheEntry.getReadAccessor(ClassFieldAccessorCache.java
:168)
E/AndroidRuntime(29977): at org.drools.base.ClassFieldAccessorCache.getReadAcessor(ClassFieldAccessorCache.java:101)
E/AndroidRuntime(29977): at org.drools.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:404)
E/AndroidRuntime(29977): at org.drools.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:374)
E/AndroidRuntime(29977): at org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:295)
E/AndroidRuntime(29977): at org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:236)
E/AndroidRuntime(29977): at org.drools.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:108)
E/AndroidRuntime(29977): at java.io.ObjectInputStream.readNewObject(ObjectInputStream.java:2127)
E/AndroidRuntime(29977): at java.io.ObjectInputStream.readNonPrimitiveContent(ObjectInputStream.java:929)
E/AndroidRuntime(29977): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2285)
E/AndroidRuntime(29977): at java.io.ObjectInputStream.readObject(ObjectInputStream.java:2240)
E/AndroidRuntime(29977): at com.ts.DBconnector.execPackageByPath(DBconnector.java:219)
E/AndroidRuntime(29977): at com.first.FirstActivity.onCreate(FirstActivity.java:77)
E/AndroidRuntime(29977): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(29977): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
E/AndroidRuntime(29977): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime(29977): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime(29977): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime(29977): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(29977): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(29977): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(29977): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(29977): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(29977): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(29977): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(29977): at dalvik.system.NativeStart.main(Native Method)
________________________________
From: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org> [mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>] On Behalf Of Michael Anstis
Sent: Thursday, June 09, 2011 4:51 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment
Great news :)
Please do feedback... if you get it working I'll make a blog entry on your behalf as you are not the first (or last) to try Drools on Android.
With kind regards,
Mike
2011/6/9 Abhay B. Chaware <Abhay.Chaware(a)kpitcummins.com<mailto:Abhay.Chaware@kpitcummins.com>>
That's exactly what I am trying out at the moment .. option - b. Pre-compile, serialize and unserialize ...I'll share the results.
Also rule file's there at the location mentioned. So that's not a problem.
I've gone through the blog you mentioned ... and as you indicated, it's only jbpm .. no rules ...
thanks
abhay
________________________________
From: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org> [mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>] On Behalf Of Michael Anstis
Sent: Thursday, June 09, 2011 4:07 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment
Preparing to be shouted down, but isn't it impossible to compile DRL on Android and the suggestion is to load pre-serialised KnowledgeBases?
Also, as another observation, are you sure the DRL was indeed found and the NPE is not caused by "com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143)" perhaps passing a null to KnowledgeBuilder?
Have you looked at http://blog.athico.com/2011/03/jbpm5-lightweight-running-on-android.html, which might give some pointers - although it is only jBPM and not rules themselves.
With kind regards,
Mike
On 9 June 2011 11:11, Abhay B. Chaware <Abhay.Chaware(a)kpitcummins.com<mailto:Abhay.Chaware@kpitcummins.com>> wrote:
This is what I did.
Properties properties = new Properties();
properties.put("drools.dialect.java.compiler", "JANINO");
KnowledgeBuilderConfiguration kbConfig = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( properties, (ClassLoader[]) null );
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(kbConfig);
kbuilder.add(ResourceFactory.newInputStreamResource(is), ResourceType.DRL);
I am getting same error with KnowledgeBuilderConfiguration ..
W/System.err(27303): java.lang.NullPointerException
W/System.err(27303): at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
W/System.err(27303): at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
W/System.err(27303): at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
W/System.err(27303): at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:267)
W/System.err(27303): at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:459)
W/System.err(27303): at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
W/System.err(27303): at com.ts.DBconnector.readKnowledgeBase(DBconnector.java:143)
W/System.err(27303): at com.first.FirstActivity.onCreate(FirstActivity.java:64)
W/System.err(27303): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
W/System.err(27303): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
W/System.err(27303): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
W/System.err(27303): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
________________________________________
From: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org> [rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>] On Behalf Of Wolfgang Laun [wolfgang.laun(a)gmail.com<mailto:wolfgang.laun@gmail.com>]
Sent: Thursday, June 09, 2011 2:46 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment
You might try this:
Properties props = new Properties();
props.put( "drools.dialect.java.compiler", "JANINO" );
KnowledgeBuilderConfiguration kbConfig =
KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration( props, (ClassLoader[]) null );
Requires the janino jar in your classpath, which I have as
~/.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar
-W
On 9 June 2011 10:29, Abhay B. Chaware <Abhay.Chaware(a)kpitcummins.com<mailto:Abhay.Chaware@kpitcummins.com><mailto:Abhay.Chaware@kpitcummins.com<mailto:Abhay.Chaware@kpitcummins.com>>> wrote:
I am using drools 5.1.0
Let me explain what I am trying to do. I am trying to write a drools app on to android platform. In my app, I have added following jars in the application classpath -
antlr-runtime.jar
drools-api.jar
drools-compiler.jar
drools-core.jar
mvel2.jar
Do I need any other jar files ?
upon drilling down into the Null Pointer Exception, it appears that it is throwing NPE at following line inside RuleBuilder.java
RuleConditionBuilder builder = (RuleConditionBuilder)context.getDialect().getBuilder(ruleDescr.getLhs().getClass());
and on further drilling, I found that "context.getDialect()" is retuning NULL.
Then I put some debug inside PackageBuilder.java
upon drilling down for the error, found out that it is not able to set the context's dialect.
ctr.getDialect(pkgRegistry.getDialect()) gives "null" ...
DialectCompiletimeRegistry ctr = pkgRegistry.getDialectCompiletimeRegistry();
RuleBuildContext context = new RuleBuildContext(this, ruleDescr, ctr, pkg, ctr.getDialect(pkgRegistry.getDialect()));
Is there any default setting /configuration that I am obviously missing ?
what could be the problem ?
-abhay
________________________________________
From: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org><mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>> [rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org><mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>>] On Behalf Of Swindells, Thomas [TSwindells(a)nds.com<mailto:TSwindells@nds.com><mailto:TSwindells@nds.com<mailto:TSwindells@nds.com>>]
Sent: Thursday, June 09, 2011 1:40 PM
To: Rules Users List
Subject: Re: [rules-users] Drools in non-eclipse environment
Which version of drools is this?
For drools 5.0.1 we just use maven to resolve the dependencies for us and it works fine. I can't obviously see any eclipse compiler in the jars that we distribute with our application.
Thomas
> -----Original Message-----
> From: rules-users-bounces(a)lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org><mailto:rules-users-bounces@lists.jboss.org<mailto:rules-users-bounces@lists.jboss.org>> [mailto:rules-users-<mailto:rules-users-><mailto:rules-users-<mailto:rules-users->>
> bounces(a)lists.jboss.org<mailto:bounces@lists.jboss.org><mailto:bounces@lists.jboss.org<mailto:bounces@lists.jboss.org>>] On Behalf Of Abhay B. Chaware
> Sent: 09 June 2011 08:06
> To: rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org><mailto:rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>>
> Subject: [rules-users] Drools in non-eclipse environment
>
> Has anyone tried using drools in non-eclipse env ? meaning that
> org.eclipse.jdt.core_3.5.1.v_972_R35x.jar is not in the classpath ?
>
> Documentation says this :
>
> (http://docs.huihoo.com/drools/4.0.7/ch02s05.html)
>
> if you do not have Eclipse JDT Core in your classpath you must override the
> compiler setting before you instantiate this PackageBuilder, you can either
> do that with a packagebuilder properties file the ChainedProperties class will
> find, or you can do it programmatically as shown below; note this time I use
> properties to inject the value for startup.
>
> They also provide an example, but I am not able to figure out exactly how to
> use this example/info.
>
> Here is my code :
>
> KnowledgeBuilder kbuilder =
> KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add(ResourceFactory.newInputStreamResource(is),
> ResourceType.DRL);
>
> where "is" is input stream containing the rule file ( .drl)
>
> How do I override the compiler setting ?
>
> I am getting a null pointer exception ( see below ) and I suspect that
> overriding the packagebuilderconfiguration will fix it ?
>
> W/System.err(25511): java.lang.NullPointerException
> W/System.err(25511): at
> org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:47)
> W/System.err(25511): at
> org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1161)
> W/System.err(25511): at
> org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:637)
> W/System.err(25511): at
> org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java
> :267)
> W/System.err(25511): at
> org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder
> .java:459)
> W/System.err(25511): at
> org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.ja
> va:28)
> W/System.err(25511): at
> com.ts.DBconnector.readKnowledgeBase(DBconnector.java:146)
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org><mailto:rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>>
> https://lists.jboss.org/mailman/listinfo/rules-users
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com<mailto:postmaster@nds.com><mailto:postmaster@nds.com<mailto:postmaster@nds.com>> and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org><mailto:rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org><mailto:rules-users@lists.jboss.org<mailto:rules-users@lists.jboss.org>>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any liability for virus infected mails.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any liability for virus infected mails.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org<mailto:rules-users@lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 9 months
Re: [rules-users] How does Drools support Notifications?
by Greg Stasica
hi,
I've been evaluating activiti.org recently with a positive result. My
experience with the engine has been quite good so far and the whole
logic behind it seems to much better suite process engine scenarios e.g.
job executors, scheduled events etc. Drools Flow or how they call it
jbpm5 is more rule centric.
regards
On 14/06/2011 14:17, Daniel Nathanson wrote:
> Hi Greg,
>
> This reply is off-list.
>
> What do you mean by
>
> "i've already gave up with drools-flow/jbpm5 due
>> to its problems with persistence causing the whole process to be prone
>> for any kind of inconsistency"?
>
> I'm about to give up on Drools also because I've got flows that randomly stop after being reloaded from the DB. I've been unable to figure out the issue. The Drools code is an undocumented mess and the Drools developers have been unresponsive to problems in Drools Flow.
>
> What did you switch to? I am planning on writing my own state machine.
>
> Regards,
>
> Dan
> Sent from my iPad
>
> On Jun 14, 2011, at 8:15 AM, Greg Stasica<gstasica(a)pacemetrics.com> wrote:
>
>> hi,
>> i'm not sure exactly (as i've already gave up with drools-flow/jbpm5 due
>> to its problems with persistence causing the whole process to be prone
>> for any kind of inconsistency) but i don't think that there is any
>> support for out of the box notification mechanism. I'd rather suspect
>> that one should register some listener and have it called/available as a
>> part of separate running thread
>>
>>
>> On 14/06/2011 08:24, Jay wrote:
>>> ervice.TaskService) and
>>> DefaultEscalatedDeadlineHandler, I can construct the TaskService with a
>>> DefaultEscalatedDeadlineHandler to handle the notification in TaskServer.
>>>
>>> But, will it work? According to
>> --
>> Greg Stasica
>>
>> PaceMetrics Ltd.
>> T +353 1 8849921
>>
>> PaceMetrics Limited is registered in Ireland as a private company limited by shares, Registration No. 298243, Registered office: PaceMetrics House, East Point Business Park, Dublin 3. This e-mail may contain confidential, proprietary or privileged information. If you are not the intended recipient (or have received this e-mail in error) please destroy this e-mail and notify the sender immediately by telephoning +353 1 8184000. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
--
Greg Stasica
PaceMetrics Ltd.
T +353 1 8849921
PaceMetrics Limited is registered in Ireland as a private company limited by shares, Registration No. 298243, Registered office: PaceMetrics House, East Point Business Park, Dublin 3. This e-mail may contain confidential, proprietary or privileged information. If you are not the intended recipient (or have received this e-mail in error) please destroy this e-mail and notify the sender immediately by telephoning +353 1 8184000. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
14 years, 9 months
M1 Vs CR1
by Saleem Lakhani
Hi guys,
Just wanted to know what is the difference b/w Drools 5.2 M1 and Drools
5.2 CR1?
Thanks,
saleem
14 years, 9 months