Can I create WS to access Guvnor?
by bbarani
Hi,
I am trying to create a WS which will invoke the rules present in Guvnor and
sends back a response.
We have multiple applications which needs to execute the Rules present in
Guvnor and hence we thought of creating a WS which can be accessed by all
the applications.
We tried to use AXIS to create a WS but we are getting the below error when
we tried to run the java program (which we have created to fire rules
present in Guvnor) as webservice.
exception: java.lang.reflect.InvocationTargetException
The program runs fine as stand alone program. Any thoughts on this error /
suggestions would be of great help!!!
Thanks,
BB
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Can-I-create-WS-to-ac...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Guvnor not seeing model in rule editor
by Mike Reynolds
I have a new package in a category . I create two models and uploaded them
to guvnor. I go to create a rule and the model objects aren't showing up.
What am I doing wrong?
thanks
14 years, 5 months
OutOfMemoryError: GC overhead limit exceeded - RESEND
by Jeffrey Schneller
This is a RESEND because of mail server issues. Not sure if the
original message went out.
I saw a similar thread about this back in March but I am now seeing a
similar exception being thrown. I am running 5.0.1. The error is
thrown in my app after the change set listener determines there was a
change with the rules package in the Guvnor. I have included the stack
trace from the most recent time the exception was thrown. Hopefully
someone can provide some additional information or a workaround. Has
this problem been fixed in 5.1? If so, has 5.1 moved out of M2 state
and into a CR state and when will it go into a full released state?
Exception in thread "Thread-44" java.lang.OutOfMemoryError: GC overhead
limit exceeded
at org.drools.rule.GroupElement.<init>(GroupElement.java:44)
at org.drools.rule.GroupElement.<init>(GroupElement.java:47)
at sun.reflect.GeneratedConstructorAccessor61.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.drools.rule.GroupElement.clone(GroupElement.java:267)
at org.drools.rule.GroupElement.clone(GroupElement.java:279)
at org.drools.rule.Rule.getExtendedLhs(Rule.java:518)
at org.drools.rule.Rule.getTransformedLhs(Rule.java:545)
at
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.ja
va:98)
at
org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:117)
at
org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:362)
at
org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:618)
at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:500
)
at
org.drools.reteoo.ReteooRuleBase.addPackage(ReteooRuleBase.java:388)
at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgent
Impl.java:416)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentIm
pl.java:120)
at
org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.r
un(KnowledgeAgentImpl.java:538)
at java.lang.Thread.run(Thread.java:619)
Thanks.
14 years, 5 months
JBOSS DROOLS Guvnor and SSO authentication
by ShanzRules
Hi
We would like to integrate guvnor with SSO(Sun access manager),
we have a portal application already integrated with sun access manager ,
and from portal we want to have a guvnor link on it and if we click on the
link , it should redirect to the guvnor home page without again displaying
the guvnor login.guvnor should automatically read the user credentials and
redirect to the home page for rules editing.
Please provide the solution if anyone has already implemented it.
Appreciate all your help
Regards,
Shantha
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/JBOSS-DROOLS-Guvnor-a...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Re: [rules-users] execution using "java -jar x.jar ..." fails
by Greg Barton
Yep, I know what you mean about building that jar. I usually use the maven jar plugin in a maven build to do that:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>foo.bar.Bas</mainClass>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
The "addClasspath" bit is keen. That along with the maven dependency plugin gathers all the jars you need for the app. (Sample pom.xml attached.)
--- On Wed, 6/23/10, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
From: Wolfgang Laun <wolfgang.laun(a)gmail.com>
Subject: Re: [rules-users] execution using "java -jar x.jar ..." fails
To: "Rules Users List" <rules-users(a)lists.jboss.org>, "Edson Tirelli" <ed.tirelli(a)gmail.com>
Date: Wednesday, June 23, 2010, 2:29 PM
OK. thanks.
Here is a sample MANIFEST, to be included in the application jar, with the jars I've found essential for running a plain Expert application (without XML rules or commands):
Manifest-Version: 1.0
Class-Path: /extra/drools-5.1.0.M2/drools-api-5.1.0.M2.jar /extra/drools-5.1.0.M2/drools-compiler-5.1.0.M2.jar /extra/drools-5.1.0.M2/drools-core-5.1.0.M2.jar /extra/drools-5.1.0.M2/lib/mvel2-2.0.16.jar /extra/drools-5.1.0.M2/lib/antlr-runtime-3.1.3.jar /usr/local/eclipse/plugins/org.eclipse.jdt.core_3.4.4.v_894_R34x.jar
Main-Class: rss.aws.init.Main
Eclipse's support for creating a jar isn't really helpful - I'd say it's confusing. I simply called
jar -fm myappl.jar MANIFEST ... # dirs where class and rules files are
Thanks for the help. (My son simply said, "Why didn't you ask me?" - That's how it goes...)
-W
2010/6/23 Greg Barton <greg_barton(a)yahoo.com>
See http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html
Key line' referring to the -jar option:
"When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored."
You can specify the path to external jars in the manifest of the standalone jar.
GreG
On Jun 23, 2010, at 9:44 AM, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
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
_______________________________________________
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
-----Inline Attachment Follows-----
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 5 months
Re: [rules-users] execution using "java -jar x.jar ..." fails
by Greg Barton
See http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html
Key line' referring to the -jar option:
"When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored."
You can specify the path to external jars in the manifest of the standalone jar.
GreG
On Jun 23, 2010, at 9:44 AM, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
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
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
14 years, 5 months
Drools 5 setGlobal
by Samuli Saarinen
Hello,
I'm new to drools and have problems with globals or with the different
behaviour of drools depending on how the globals are specified.
I have the following simple rule:
global String test
rule "Global"
when
then
System.out.println(test);
end
If i run the rule with:
KnowledgeBase kb = getKnowledgeBase("global.drl");
StatelessKnowledgeSession ses = kb.newStatelessKnowledgeSession();
ses.setGlobal("test2", "foo");
ses.execute("");
I get the expected result of null printed
but if I use commands:
KnowledgeBase kb = getKnowledgeBase("global.drl");
StatelessKnowledgeSession ses = kb.newStatelessKnowledgeSession();
List<Command<?>> cmds = new ArrayList<Command<?>>();
cmds.add(CommandFactory.newSetGlobal("test2", "bar"));
cmds.add(CommandFactory.newInsert(""));
ses.execute(CommandFactory.newBatchExecution(cmds));
I get java.lang.RuntimeException: Unexpected global [test2]
Why is the behaviour different and which one is correct?
Regards,
Samuli
--
Remion Oy Etävalvontajärjestelmät liiketoiminnan
Samuli Saarinen tehostamiseen
gsm +358 (0)50 3560075
fax +358 (0)3 2125064 www.remion.com
14 years, 5 months
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
14 years, 5 months