execution using "java -jar x.jar ..." fails
by Wolfgang Laun
The application works fine in Eclipse.
In Eclipse, I created a jar file x.jar from the .class and a few .drl files,
and copied x.jar to /tmp/x/
Now, in /tmp/x
CP="droos/*:drools/lib/*"
java -cp "$CP" -jar dpvt.jar par...
This fails on the first attempt to access any class from a drools jar file.
In /tmp/x, I unpack x.jar and call
CP="droos/*:drools/lib/*:."
java -cp "$CP" rss.aws.init.Main par...
AND THIS WORKS!
So, what is different when starting a Java program with java -jar as opposed
to java x.y.Main?
The stack dump is not very informative:
java.lang.NoClassDefFoundError: org/drools/KnowledgeBaseFactory
at rss.aws.engine.impl.DroolsEngine.setup(DroolsEngine.java:30)
at rss.aws.init.Core.init(Core.java:51)
at rss.aws.init.Core.getInstance(Core.java:16)
at rss.aws.init.Main.<init>(Main.java:35)
at rss.aws.init.Main.main(Main.java:191)
Caused by: java.lang.ClassNotFoundException: org.drools.KnowledgeBaseFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
... 5 more
Any ideas?
-W
15 years, 6 months
How to manage roles and generate web-forms using Drools Flow?
by Aman Aggarwal
Hi all
I am creating a workflow(integrated into a Java web application) for a leave
application approval. The workflow is as follows:
Leave request is raised for an employee.
Case 1: If employee's role is not team lead.
The request is sent to employee's team lead.
If team lead rejects, workflow ends.
If team lead approves, request is forwarded to manager.
Case 2: If employee's role is team lead.
The request is directly sent to Manager.
Workflow ends when manager approves/rejects the application. At the time of
approval/rejection the user needs to enter a comment.
I need to generate web-form for user input. The options can be dynamic and
should be defined in workflow itself. How can I achieve this? What is the
right way to manage different directions of a workflow based on different
roles?
Any thoughts/suggestions are welcome. It will be helpful if someone can
direct me to example/sample code to achieve this.
--
Regards
Aman
http://www.IntelliGrape.com
15 years, 6 months
Couple of questions about Timers
by nanic23
Hi all,
I'm working with timers and I have a couple of questions.
1) If I have more than one timer in a ruleflow definition, will
ksession.fireUntilHalt()/ksession.fireAllRules() take care of
starting/initializing all timers? Is one thread enough for multiple timers
or I need to handle timers individually?
2) If my flow terminates (normally or abnormally) do I need to clean/restart
the timers?
Any help is appreciated.
Thanks,
Nick.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Couple-of-questions-a...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
Timer Date definition for Timer nodes
by nanic23
Hi Drools community :)
As per the BPMN standard: "In Normal Flow the Timer Intermediate Event acts
as a delay mechanism based on a specific time-date or a specific cycle
(e.g., every Monday at 9am) can be set that will trigger the Event."
So, my question is: Does Drools supports something like this? Can we set,
for example, a timer to run once every Monday at 9am? I am familiar with
Timer Delay and Timer Period but I am not looking for this behavior. I am
rather looking to schedule a specific date and time (e.g. Monday's at 9am).
Is this possible? If so, How is it configured?
Thanks,
Nick.
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Timer-Date-definition...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months
drools-compiler 5.1.0.SNAPSHOT: transitive deps not set up right?
by ljnelson
I have a Maven project that depends on drools-compiler 5.1.0.SNAPSHOT.
When I run mvn dependency:tree on it, I notice that the compile scope
dependencies used by drools-compiler are not listed in the output (actually,
same for drools-core):
[INFO] mystuff:myproject:jar:1.0-SNAPSHOT
[INFO] +- org.drools:drools-api:jar:5.1.0.20100619.203626-283:compile
[INFO] +- org.drools:drools-core:jar:5.1.0.20100619.203626-282:compile
[INFO] +- org.drools:drools-compiler:jar:5.1.0.20100619.203626-282:compile
[INFO] +- org.glassfish:javax.resource:jar:3.1-b04:provided
[INFO] | \- org.glassfish:javax.transaction:jar:3.1-b04:provided
[INFO] \- junit:junit:jar:4.8.1:test
They are listed in the output if I use version 5.0.1.M2:
[INFO] mystuff:myproject:jar:1.0-SNAPSHOT
[INFO] +- org.drools:drools-api:jar:5.1.0.M2:compile
[INFO] +- org.drools:drools-core:jar:5.1.0.M2:compile
[INFO] | +- org.mvel:mvel2:jar:2.0.18:compile (version managed from 2.0.16)
[INFO] | +- com.sun.xml.bind:jaxb-impl:jar:2.0.3:compile
[INFO] | | +- javax.xml.bind:jaxb-api:jar:2.0:compile
[INFO] | | +- javax.xml.bind:jsr173_api:jar:1.0:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | \- com.sun.xml.bind:jaxb-xjc:jar:2.0.3:runtime
[INFO] +- org.drools:drools-compiler:jar:5.1.0.M2:compile
[INFO] | +- org.antlr:antlr-runtime:jar:3.1.3:compile
[INFO] | +- org.antlr:gunit:jar:3.1.3:compile
[INFO] | | \- org.antlr:stringtemplate:jar:3.2:compile
[INFO] | | \- antlr:antlr:jar:2.7.7:compile
[INFO] | +-
org.apache.jasper.springsource:com.springsource.org.apache.jasper.org.eclipse.jdt.springsource:jar:6.0.20.S2-r5956:compile
[INFO] | \- janino:janino:jar:2.5.15:compile
[INFO] +- org.glassfish:javax.resource:jar:3.1-b04:provided
[INFO] | \- org.glassfish:javax.transaction:jar:3.1-b04:provided
[INFO] \- junit:junit:jar:4.8.1:test
One of my log messages seems to indicate that drools-compiler does not have
a POM:
[INFO] Unable to find resource
'org.drools:drools-compiler:pom:5.1.0.20100619.203626-282' in repository
jboss (https://repository.jboss.org/nexus/content/groups/public)
The Maven guys suspect a bad deployment. Is this something you folks need
to fix, or something that I've somehow messed up?
Thanks,
Laird
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-compiler-5-1-0...
Sent from the Drools - User mailing list archive at Nabble.com.
15 years, 6 months