Error in resteasy war deployment.....
by subhransu sekhar
Hi,
first i have integrated my resteasy ws to jbpm workflow project and added all the necessay jars to it.it is succesfully excuted in command prompt and created the wars in repository.
but whenever i am trying to deploy that war file in tomcat(6) it shows the following errors:
java.lang.NoClassDefFoundError: org/drools/rule/CompositeClassLoader
at org.drools.builder.impl.KnowledgeBuilderProviderImpl.newKnowledgeBuil
der(KnowledgeBuilderProviderImpl.java:29)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(Knowle
dgeBuilderFactory.java:29)
at com.ocqc.flow.OCQCWorkflowManager.readKnowledgeBase(OCQCWorkflowManag
er.java:59)
at com.ocqc.flow.OCQCWorkflowManager.operate(OCQCWorkflowManager.java:40
)
at com.ocqc.flow.OCQCWorkflowManager.initProcess(OCQCWorkflowManager.jav
a:31)
at com.restfully.shop.services.JobResource.getAvailableReport(JobResourc
e.java:72)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
java:140)
at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
java:255)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220
)
at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209
)
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(Synchronous
Dispatcher.java:519)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
tcher.java:496)
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
tcher.java:119)
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.
service(ServletContainerDispatcher.java:208)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
ce(HttpServletDispatcher.java:55)
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
ce(HttpServletDispatcher.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.drools.rule.CompositeClassLoade
r
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1493)
... 33 more
plaese help .....
Thanks & Regards
subhransu sekhar
14 years, 3 months
Calling drools into the Web Application.
by srinivasasanda
this piece of application is working using drools project, but its not
working in (webapplication)
i had a text box age and income that values i am trying passing this data to
rule and run the rules.
i created one jsp , jsp call servlet, In servelt i called the below piece of
code in servlet but not executing
I am trying to include it this piece of code into webapplication (in servlet
or jsp) it is showing error.
public static final void runMain() {
try {
RuleAgent agent = RuleAgent.newRuleAgent("/guvnor.properties");
RuleBase ruleBase = agent.getRuleBase();
WorkingMemory workingMemory = ruleBase.newStatefulSession();
FactType ft= ruleBase.getFactType("sample.person"); //created
declarative model in guvnor
Object obj=ft.newInstance();
ft.set(obj,"age", 67);
//setting data into into person
ft.set(obj, "income", 1000);
workingMemory.insert(obj);
workingMemory.fireAllRules();
System.out.print(ft.get(obj, "age"));
System.out.print(ft.get(obj, "income"));
} catch (Throwable t) {
t.printStackTrace();
}
}
12:46:44,409 ERROR [STDERR] RuleAgent(default) INFO (Mon Dec 05 12:46:44 GMT
2011): Configuring with
newInstance=false, secondsToRefresh=-1
12:46:44,419 ERROR [STDERR] RuleAgent(default) INFO (Mon Dec 05 12:46:44 GMT
2011): Configuring pack
age provider : URLScanner monitoring URLs:
http://localhost:8082/guvnor-5.2.0.Final-jboss-as-5.1/or
g.drools.guvnor.Guvnor/package/sample/LATEST
12:46:44,669 INFO [STDOUT] INFO 05-12 12:46:44,669
(NilAuthenticator.java:authenticate:35) All
users are guests.
12:46:44,359 ERROR [STDERR] java.lang.IllegalArgumentException: Could not
parse knowledge.
12:46:44,359 ERROR [STDERR] at
com.sample.DroolsTest.readKnowledgeBase(DroolsTest.java:115)
12:46:44,359 ERROR [STDERR] at
com.sample.DroolsTest.FireRools(DroolsTest.java:62)
12:46:44,359 ERROR [STDERR] at p1.Login.doGet(Login.java:37)
12:46:44,359 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
12:46:44,359 ERROR [STDERR] at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
12:46:44,699 ERROR [STDERR] RuleAgent(default) EXCEPTION (Mon Dec 05
12:46:44 GMT 2011): org.drools.
rule.Package; local class incompatible: stream classdesc serialVersionUID =
510, local class serialV
ersionUID = 400. Stack trace should follow.
12:46:44,699 ERROR [STDERR] java.io.InvalidClassException:
org.drools.rule.Package; local class inco
mpatible: stream classdesc serialVersionUID = 510, local class
serialVersionUID = 400
12:46:44,699 ERROR [STDERR] at
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562
)
--
View this message in context: http://drools.46999.n3.nabble.com/Calling-drools-into-the-Web-Application...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months
Web client-side rule testing - best practices
by Ronald Albury
I have always thought of Drools-like systems being server-side engines -
and we have many server-side-only uses for rules. However, for a good user
experience you should do checking as close to data entry as possible, and
there is a subset of our server rules that are redundant with the rules
governing client data entry (currently embedded in the Web interface as
Javascript).
Has anyone established a good pattern for using Drools for client-side
testing? I'm guessing that we would need some sort of per-field Ajax
communication back to the server ... but this means per-field communication
(not good for our agents on dial-up or with slow links), and it also means
structuring our rules such that we can easily access only the appropriate
rules.
Would I, for instance, need a separate Fact object type for each field?
This seems like it would really complicate the rules - we have about a
dozen basic data structures for our server-side Facts, and each data
structure will have multiple attributes. I don't look forward to dealing
with a couple hundred Fact types.
Would I need some sort of flag on our data structures to include in the
Fact which restricts the testing to only the field that was just entered?
This would seem to complicate the understanding of our rules. Some rules
(even UI rules) depend on a combination of facts - so would it be a 'set'
of flags? This seems to be moving close to the first idea (separate Fact
object types ... which seems more efficient).
So ... as you can see, I am thrashing about a bit trying to find the
correct pattern. Can someone save me a bunch of time and bad code by
sharing their best practice with me?
Thanks,
Ron
14 years, 3 months
Re: [rules-users] Guvnor Versioning - eclipse plug-in
by Ronald Albury
I found a way to get Guvnor to make Version 3 the active version. I
shut-down and restart Tomcat.
Surely this can't be the 'standard' way ... and it makes me think that I've
tripped over a bug hiding in there somewhere.
Thoughts?
14 years, 3 months
Guvnor Functions --how to make available jboss & other util & collection
by srinivasasanda
Hi All
Thank's In Advance, U have clarified many dou't to me , Please try
to give me solution for this also.
I am wring a function in guvnor, --(Guvnor function code contains --> util
package, jboss manager package, and other system defined functions) when i
write code in function and validate i got an error that specified packages
are not able to find. where can i include the packages to make available to
functions.)
Actual need for me...
When the rule satisfy, i want to call a function which
store some data into Hashmap,
i want to call directly the jboss cache data into drools functions. (we can
write some pojo and call it is working, but to increase the performance
issue ) i am going for it.
please any one give me some solution, ... Any way Thank's in Advance...
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-Functions-how-to-make-available-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years, 3 months