Dynamic Loading of Rules from BRMS
by jillika iyer
hi guys,
I am trying to upload my rules from jboss-brms to my eclipse in order to run
it against the working memory.
The following is my code and change-set.xml file and I am getting the
following error stack ( which is a java error but just attaching it for
giving more info).
I have started the jboss-server and it is connected correctly.
I am getting a java based error which says that it is unable to parse
change-set.xml and unable to connect to the server.
I just want to know if I am not the right path for creating the required
change-set.xml file due to which I am getting the java connection error.
I have just specified the url path in my change-set file and the types of
files it should be looking out for.
What else do I need to incorporate for it to connect to the server???
Please help me. I am relatively new to Drools.
Code in my Runner class:
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
ResourceFactory.getResourceChangeScannerService().start();
ResourceFactory.getResourceChangeNotifierService().start();
// creating a knowledge agent
KnowledgeAgentConfiguration aconf =
KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(
"MyAgent", kbase,aconf );
kagent.applyChangeSet( ResourceFactory.newUrlResource("
http://localhost:8280/jboss-brms/org.drools.guvnor.Guvnor/Guvnor.html"));
StatefulKnowledgeSession ksession =
kagent.getKnowledgeBase().newStatefulKnowledgeSession();
// StatelessSession workingMemory = ruleBase.newStatelessSession();
ArrayList<Ip> ipList = new ArrayList<Ip>();
ksession.setGlobal("ipList", ipList);
ksession.insert(al);
ksession.fireAllRules();
ksession.dispose();
my change-set.xml file:
<change-set xmlns='http://drools.org/drools-5.0/change-set'
xmlns:xs='http://www.w3.org/2001/XMLSchema-instance'
xs:schemaLocation='http://drools.org/drools-5.0/change-set.xsd'
>
<add>
<!-- Add for specifying URLs-->
<resource source='http://localhost:8280/jboss-brms' type='DRL' />
<resource source='http://localhost:8280/jboss-brms' type='DSLR' />
<resource source='http://localhost:8280/jboss-brmss/sample-dsl.dsl'
type='DSL' />";
<resource source='http://localhost:8280/jboss-brms' type='BRL' />
</add>
</change-set>
error stack:
java.lang.RuntimeException: Unable to parse ChangeSet
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:223)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:109)
at com.org.RuleRunner.runStatelessRules(RuleRunner.java:156)
at com.org.RulesTest.main(RulesTest.java:38)
Caused by: java.net.SocketException: Network is unreachable: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:524)
at java.net.Socket.connect(Socket.java:474)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:523)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
at sun.net.www.http.HttpClient.New(HttpClient.java:304)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:839)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:791)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:716)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:960)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:905)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:872)
at
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:282)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1021)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:255)
at org.drools.xml.ExtensibleXmlParser.read(ExtensibleXmlParser.java:170)
at org.drools.xml.XmlChangeSetReader.read(XmlChangeSetReader.java:48)
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:221)
... 3 more
Please help me.
Thank you
Jill
14 years, 5 months
Working with DSL files
by jillika iyer
hi,
I am creating dsl files using jboss-brms and importing them to my eclipse
and adding them to the knowledge agent.
Now ideally we need to change a dsl or a brl file to a dslr file inorder for
it to be processed by the knowledgebase.
So when we use the knowledge agent how does it parse the data and create
these files???
Please help me out. I just am trying to add everything directly to my
knowledge base which is obviously wrong.
Thank you
Jill
14 years, 5 months
Object Referencing in Test Scenarios
by Fnu Mahalakshmi
Hi
How can we create test cases in BRMS by giving value of an object??
Example:
Fire{
Room room;
String something;
}
Room{
String value;
}
Test case:
Room [R]
Value 'some_value'
Fire[F]
Room ?????
We cannot give [R] here as it is not recognized.
Is there any way to test this kind of conditions in the test scenarios we create???
Thank you.
M
Please consider the environment before printing this email.
Visit our website at http://www.nyse.com
****************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.
14 years, 5 months
Using mvel in RHS with Java code
by wilsonywx
I am trying to use mvel for RHS but Drools gives me BuildError : Unable to
build expression for 'consequence' : null 'i = Util.test();'
The error goes away when I remove the "dialect 'mvel'" line, so the error
must have something to do with using mvel. I think I am missing something
here, but the documentation on MVEL in Drools is really scanty.
Code:
import java.util.*;
import a.b.Util;
rule "Test"
dialect "mvel"
when
eval(true)
then
Util.test();
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Using-mvel-in-RHS-wit...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Minimum jar set in 5.1.0.M2 contains lib/mvel2.jar - a show stopper for us
by Wolfgang Laun
I've read somewhere that the minimum jar set for execution with a
precompiled .pkg is just
drools-api-5.1.0.M2.jar
drools-core-5.1.0.M2.jar
However, trying to run an application with just a .pkg file, this jar set
results in the stack
dump shown below, due to a missing "org.mvel2..." class. Adding
lib/mvel2-2.0.16.jar to the
CLASSPATH fixes this, but (for reasons I don't care to elaborate here) be we
can't have this
in our application.
Can this .jar be avoided?
Note: I'm not using mvel, and the .drl file begins with "package movie;
dialect "java".
-W
Exception in thread "main" java.lang.NoClassDefFoundError:
org/mvel2/integration/impl/MapVariableResolverFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:632)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
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)
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2308)
at java.lang.Class.getDeclaredField(Class.java:1897)
at
java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1627)
at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:69)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:442)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:430)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:327)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:564)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1600)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1513)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1749)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at java.util.HashMap.readObject(HashMap.java:1047)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1865)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at
org.drools.rule.DialectRuntimeRegistry.readExternal(DialectRuntimeRegistry.java:41)
at
java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1809)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1768)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at org.drools.rule.Package.readExternal(Package.java:198)
at
org.drools.definitions.impl.KnowledgePackageImp.readExternal(KnowledgePackageImp.java:99)
at
java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1809)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1768)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at java.util.ArrayList.readObject(ArrayList.java:696)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1865)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1770)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1346)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at movie.Main.init(Main.java:40)
at movie.Main.main(Main.java:89)
Caused by: java.lang.ClassNotFoundException:
org.mvel2.integration.impl.MapVariableResolverFactory
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)
... 60 more
14 years, 5 months
Looking up values in WHEN block
by Dobedani
Dear All,
I'm trying to develop rules which will help to analyse incoming reports of
disease related symptoms. I have found a way to fill a HashMap with maximum
allowable values specific for various symptoms. I would like to lookup the
relevant value any time a symptom comes in. In the first place, I'm trying
to check whether (1) the HashMap's keySet contains the found symptom i.e. in
the WHEN block - but it does not work as expected. Let alone (2) that I can
lookup the maximum allowable value and check whether it has been exceeded!
It is strange to me that the result of both "actions" can however be printed
out in the THEN block. How to do this? Any help will be appreciated.
Kind regards, Dobedani
Here's some of my Java code:
public class Symptom {
private String name;
private String location;
private int period;
private int numCases;
// getters and setters ...
}
And:
KnowledgeBase kbase = readKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
java.util.Map maxSymptoms = new java.util.HashMap<String, Integer>();
ksession.setGlobal("maxSymptoms", maxSymptoms);
Now, some of the code from my DRL file:
import Symptom;
global java.util.Map maxSymptoms;
function void prepareMap(java.util.Map map) {
if (map.size() == 0) {
map.put("fever", 20);
map.put("diarrhoea", 30);
}
}
rule "Initialisation"
salience 100
when
eval(true); // always!
then
prepareMap(maxSymptoms);
end
rule "Number of cases with particular symptom observed"
dialect "mvel"
when
#conditions
Symptom( symptomName : name );
eval(maxSymptoms.keySet() contains symptomName);
#Symptom( numCases > maxSymptoms[symptomName] );
then
#actions
System.out.println(maxSymptoms.keySet() contains symptomName);
System.out.println( maxSymptoms[symptomName] );
#System.out.println("Number of cases with " + symptomName + "
exceeds maximum ")
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Looking-up-values-in-...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
Automatic updating of Guvnor Rules appears to be not working.
by Stephen Mcgruer
Hi there. I'm trying to get automatic update of rules working in my
project, and seem to
have run into a problem. As far as I can tell, automatic polling and
updating is turned
on, and claims to update the knowledgebase, but changes to the rules
don't seem to have
any effect. A simple example - if I add the rule:
rule "TestRule"
dialect "mvel"
when
then
System.out.println("Hello, world!");
end
And start my application, I get:
Firing all rules...
Hello, world!
All rules fired.
As expected. If I then change the rule as follows:
rule "TestRule"
dialect "mvel"
when
then
System.out.println("I have changed!");
end
I get this output (timestamps trimmed for readability):
ResourceChangeScanner attempt to scan 1 resources
ResourceChangeScanner modified resource=[UrlResource
path='http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/ERMI...']
:
1277371031000 : 1277371254000
ResourceChangeNotification received ChangeSet notification
ResourceChangeScanner thread is waiting for 60
ResourceChangeNotification processing ChangeSet
ResourceChangeNotification ChangeSet modified resource=[UrlResource
path='http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/ERMI...']
for listener=org.drools.agent.impl.KnowledgeAgentImpl@e2d0b2
KnowledgeAgent received ChangeSet changed notification
ResourceChangeNotification thread is waiting for queue update
KnowledgAgent applying ChangeSet
KnowledgeAgent ChangeSet requires KnowledgeBuilderKnowledgeAgent
rebuilding KnowledgeBase
using ChangeSet
KnowledgeAgent building resource=[UrlResource
path='http://localhost:1337/drools-guvnor/org.drools.guvnor.Guvnor/package/ERMI...']
KnowledgeAgent adding KnowledgeDefinitionsPackage ERMIE
KnowledgeAgent new KnowledgeBase now built and in use
So, this makes it seem like everything has worked. However, if I
insert a new fact and
fire all rules...
Inserting new fact...
Hello, World!
So, it hasn't worked. What might I have done wrong?
-Stephen
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
14 years, 5 months
Jumbled with Drools-M2 Transactions
by KiranP
hello everybody,
i am implementing Drools in our project(using Spring3.0 + JPA2.0), initially
i was working with Drools 5.1.M1 and now newely started with M2,
the problem is i dont understand how M2 tracsactions work
what i have done is i used the spring based jpaSessionServiceFactory for
transactions in my project and created the following methods
@Transactional
public void startProcess(String processName,Map<String,WorkItemHandler>
handlers,Map<String,Object> parameters)
@Transactional
public void resumeProcess(long workItemId,Map<String, Object>
results,Map<String,WorkItemHandler> handlers)
As you can see both methods i made them as transactional
i have one more Service DAOService which deals with DB(CRUD operations)
now i have simple flow as Start --> Action --> End
in the Action node i call one of the CRUD method (as DAOService is made
Global ) what i observed is the method fails giving exception(given at the
end of this message)
this exception occurs only in delete case of CRUD
know why this happens..................
Exception :
java.lang.RuntimeException: unable to execute Action
at
org.drools.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:56)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:179)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at
org.drools.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at
org.drools.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:16)
at
org.drools.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:192)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309)
at
org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1591)
at
org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:291)
at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:83)
at
org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:1)
at
org.drools.container.spring.beans.persistence.SpringSingleSessionCommandService$3$1.doInJpa(SpringSingleSessionCommandService.java:182)
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183)
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:146)
at
org.drools.container.spring.beans.persistence.SpringSingleSessionCommandService$3.doInTransaction(SpringSingleSessionCommandService.java:173)
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at
org.drools.container.spring.beans.persistence.SpringSingleSessionCommandService.execute(SpringSingleSessionCommandService.java:171)
at
org.mkcl.insync.services.impl.ProcessServiceImpl.startProcess(ProcessServiceImpl.java:87)
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
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy62.startProcess(Unknown Source)
at
org.mkcl.insync.web.controller.ProcessController.start(ProcessController.java:79)
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
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:710)
at
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:167)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:414)
at
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:402)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:71)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:129)
at
com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:77)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:344)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:110)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:98)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:95)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:79)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:120)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:55)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:36)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:80)
at
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:356)
at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:150)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.dao.InvalidDataAccessApiUsageException:
Unknown node instance type:
org.drools.workflow.instance.node.ActionNodeInstance@ee49f; nested exception
is java.lang.IllegalArgumentException: Unknown node instance type:
org.drools.workflow.instance.node.ActionNodeInstance@ee49f
at
org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:287)
at
org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:103)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:349)
at
org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
at
org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:145)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy57.removeById(Unknown Source)
at
org.mkcl.insync.services.impl.UserProfileServiceImpl.replaceWith(UserProfileServiceImpl.java:704)
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
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy61.replaceWith(Unknown Source)
at
org.mkcl.insync.process.Process_org_mkcl_insync_process_0.action10(Process_org_mkcl_insync_process_0.java:85)
at
org.mkcl.insync.process.Process_org_mkcl_insync_process_0Action10Invoker.execute(Process_org_mkcl_insync_process_0Action10Invoker.java:23)
at
org.drools.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:54)
... 97 more
Caused by: java.lang.IllegalArgumentException: Unknown node instance type:
org.drools.workflow.instance.node.ActionNodeInstance@ee49f
at
org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeNodeInstanceContent(AbstractProcessInstanceMarshaller.java:287)
at
org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeNodeInstance(AbstractProcessInstanceMarshaller.java:138)
at
org.drools.marshalling.impl.AbstractProcessInstanceMarshaller.writeProcessInstance(AbstractProcessInstanceMarshaller.java:111)
at
org.drools.persistence.processinstance.ProcessInstanceInfo.update(ProcessInstanceInfo.java:252)
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 org.hibernate.ejb.event.BeanCallback.invoke(BeanCallback.java:23)
at
org.hibernate.ejb.event.EntityCallbackHandler.callback(EntityCallbackHandler.java:80)
at
org.hibernate.ejb.event.EntityCallbackHandler.preUpdate(EntityCallbackHandler.java:65)
at
org.hibernate.ejb.event.EJB3FlushEntityEventListener.invokeInterceptor(EJB3FlushEntityEventListener.java:41)
at
org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:330)
at
org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:270)
at
org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:151)
at
org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
at
org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at
org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
at com.trg.dao.jpa.JPABaseDAO._removeById(JPABaseDAO.java:113)
at com.trg.dao.jpa.GeneralDAOImpl.removeById(GeneralDAOImpl.java:79)
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
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at
org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
... 115 more
-----
Keep Working >>
KiranP
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Jumbled-with-Drools-M...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
JVM launcher error in drools-solver-examples
by reddy80
Hi All,
Finally I have finished setting up the drools solver examples into the
Eclipse ID using m2eclipse plug-in.
But now I am facing another problem - the JVM Launcher error.
When I am trying to run one of the examples its throwing this error.
"Could not find the main
class:net.sf.cglib.transform.hook.AsmClassLoaderPreProcessor. Program will
exist."
This is what I have done to import the drools-solver-examples into the
Eclipse ID.
Imported the folder and solved the dependencies using m2eclipse. Though it
has no errors but many warnings are shown.
What should I do to run the examples? Kindly suggest.
Thanks & Regards
REDDY
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/JVM-launcher-error-in...
Sent from the Drools - User mailing list archive at Nabble.com.
14 years, 5 months
OutOfMemoryError: GC overhead limit exceeded
by Jeffrey Schneller
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