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.
15 years, 8 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.
15 years, 8 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.
15 years, 8 months
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.
15 years, 8 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
15 years, 8 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.
15 years, 8 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.
15 years, 8 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
15 years, 8 months