Security Exception while deploying Drools5.0 - ClassLoader issue
by Kamal Kumar
Hi Everyone,
We have a secured system, and JVMs are restricted to create ClassLoaders.
When I am deploying a drools project, I see ComposteClassLoader calls
constructor of ClassLoader even though I pass System ClassLoader which is
causing a security exception. I am not sure how to resolve this issue. Is
there any way to create knowledgebase without calling create ClassLoader.
Please suggest something at the earliest possible. We are still trying to
find alternatives other than just giving "Create ClassLoader" permission to
JVMs.
Thanks in advance.
Kamal Konduru.
15 years, 2 months
Better way to run each rule once?
by Dave Schweisguth
Greetings fellow Droolers,
Each of our rules modifies the fact it matches. We'd like to run each of
those rules exactly once, not reactivating them when a fact changes. I see
from the archives that I'm not the first person to discover that no-loop is
too weak and lock-on-activate too strong for my purposes.
I implemented our requirement with an AgendaListener that remembers hashes
of rules + facts. This works but requires each fact to implement an
interface with a method that returns the hash, and means TWO casts each time
I examine a FactHandle. The whole AgendaFilter is below so you can see what
I mean.
Can anyone suggest a better way? I'm looking more for a better approach
altogether than I am for critique of the implementation of my current
approach, although the latter would not be unwelcome.
private static class Once
implements AgendaFilter {
private final Set<Integer> alreadyActivatedRules = new HashSet<Integer>();
public boolean accept(Activation activation) {
int hash = activation.getRule().getName().hashCode();
for (FactHandle handle: activation.getFactHandles()) {
Object object = ((DefaultFactHandle) handle).getObject();
hash *= 31;
if (object instanceof Identifiable) {
hash += ((Identifiable) object).getIdentity();
} else if (object instanceof String) {
// We get here when a rule uses from on a string collection
hash += object.hashCode();
} else {
throw new IllegalStateException(
"Don't know what to do with fact class "
+ object.getClass() + ", value " + object);
}
}
boolean accept = !alreadyActivatedRules.contains(hash);
alreadyActivatedRules.add(hash);
return accept;
}
}
Thanks & cheers,
--
| Dave Schweisguth http://schweisguth.org/~dave/ |
| Home: dave at schweisguth.org Work: http://www.nileguide.com/ |
| For compliance with the NJ Right to Know Act: Contents partially unknown |
15 years, 2 months
Returned mail: Data format error
by Automatic Email Delivery Software
The original message was received at Sat, 10 Oct 2009 12:15:26 +0800
from lists.jboss.org [214.133.66.186]
----- The following addresses had permanent fatal errors -----
<rules-users(a)lists.jboss.org>
----- Transcript of session follows -----
... while talking to 184.199.212.240:
550 5.1.2 <rules-users(a)lists.jboss.org>... Host unknown (Name server: host not found)
15 years, 2 months
Re: [rules-users] Drools Flow Persistence Doubt
by Pardeep.Ruhil@lntinfotech.com
Hi Mauricio,
Ya actually previously when it was uncommented, the flow was not going
ahead of the first human task in Workflow file '
VariablePersistenceStrategyProcess.rf' because in the test case file '
VariablePersistenceStrategiesTest.java' query was written is of
VariableInstancesInfoByProcessI in orm.xml file. So when I uncommented
the same I got that exception. So please tell me so that I am able to
execute the full flow of the demo project.
Jasper,
Thanks for replying. I tried your suggestion, but it was not working. Can
you try that demo project and let me know you are also facing the same
problem or not.
Thanks & Regards
Pardeep Ruhil
>yes... the problem is that you don't need that query.
>I don't know why I include it.. Do you need it for some reason?
>I will test it asap and get back to you..
>On Thu, Oct 8, 2009 at 11:46 AM, Jesper S. Knudsen <jsk(a)orwtech.dk>
wrote:
> Hi Pardeep
>
> I think you are using the wrong syntax in your QL
> Should it not be:
>
> select object(v) from VariableInstanceInfo as v where
> v.processInstanceInfo.id = :processId
>
> like in ejbql?
>
> Best regards
>
> Jesper
>
>
> Pardeep.Ruhil(a)lntinfotech.com skrev:
> >
> > Hi Mauricio,
> > Thanks for your reply.
> > When I try to run the demo project with configuration to work with
> Mysql, I got this exception when I uncommented the the named-query in
> orm.xml
> > </query>
> > select
> > v
> > from
> > VariableInstanceInfo v
> > where
> > v.processInstanceInfo.id = :processId
> > </query>
> >
> > SEVERE: Error in named query: VariableInstancesInfoByProcessId
> > org.hibernate.QueryException: could not resolve property:
> processInstanceInfo of:
>
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
> [select v from
______________________________________________________________________
15 years, 2 months
Drools Flow Persistence throws stack overflow error
by PremKumar s
Hi,
I am evaluating the drools expert with drool flow using TimeManagement
System. I am inserting the process instance into working memory of drools
[session.insert(workflowProcessInstance)] So that the rules can use the
process instance as part of Rule constraints to enable the rules to make
more sophisticated decisions based on the state of the current process
instance.
Rule snippet
rule "Submit Time" ruleflow-group "Submit Time"
dialect "java"
when
processInstance:WorkflowProcessInstance()
tkRequest:TKRequest ()
tkRequestDAO:TKRequestDAO()
then
// check the current processInstance state as Active
then do that
//Do custom operation, status change, persistence
update
end
The approach is works fine with using
KnowledgeBuilder.newStatefulKnowledgeSession() that is no persistence. But
once i have enabled the Persistence using
JPAKnowledgeService.newStatefulKnowledgeSession(know, null,
getEnvironment()) it throws stack over flow error due the
workflowProcessInstance is not serialized while trying to persist the newly
added workflowProcessInstance to working memory.
Once i have commented the session.insert(workflowProcessInstance)
the stack overflow error is gone but none of my rules are not executed.
Can some one provide guidance on how to pass this workflowProcessInstance to
rule constriant with persistence JPAKnowledgeSession enabled.
Thanks
Prem
15 years, 2 months
Implementaion of Rule Flow in Guvnor
by Ambika Goel
Hi All,
I have a requirement to create a rule flow in Guvnor and trigger it through eclipse web project.
The decision tables that are used by rule flow reside in Guvnor.
I could successfully trigger individual decision tables made in guvnor through my eclipse web project.
But when I try to run a ruleflow having decision tables made in guvnor through eclipse web project, I don't receive desired results.
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
15 years, 2 months
Jboss Drools 4.0.7 OutOfMemory issue , code cache reaching it's maximum size
by subrahmanyam
After integrating our application with Drools 4.0.7 tomcat running 3,4 days
well with 75 users, suddenly we are facing InvocationTargetException caused
by OutOfMemoryError for 3,4 users some times. The JAVA_OPTS options are well
configured as observed no heap error issue. Heap utilization is only 60% but
Foud that CodeCache is reaching maximum always. But codecache is non heap.
Currently everyday out of production time we are restarting server to avoid
sudden exception in production. The following is the exception we received
as suggestion of finding the root cause.
In exception logs there is no permgen space erorr or heap error. Observed by
probe after 2/3days codecache is becoming full only results in OutOfMemory
as given below. For workaround we increased codecache size to 200 MB. As per
the http://www.nabble.com/OutOfMemory-Error---3500-Rules-td17019001.html
this type of issue is fixed. But in 4.0.7 itself we are facing this issue.
Any suggestions?
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor2049.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.orbeon.oxf.processor.SimpleProcessor$1.readImpl(SimpleProcessor.java:70)
at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
at org.orbeon.oxf.processor.JavaProcessor$1.readImpl(JavaProcessor.java:66)
at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
at
org.orbeon.oxf.processor.ProcessorImpl$ProcessorOutputImpl.read(ProcessorImpl.java:1178)
at
org.orbeon.oxf.processor.ProcessorImpl.readInputAsSAX(ProcessorImpl.java:350)
at
org.orbeon.oxf.processor.pipeline.AggregatorProcessor.access$100(AggregatorProcessor.java:38)
at
org.orbeon.oxf.processor.pipeline.AggregatorProcessor$1.readImpl(AggregatorProcessor.java:93)
at org.orbeon.oxf.processor.ProcessorImpl$6.read(ProcessorImpl.java:995)
.................................
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.OutOfMemoryError
at java.lang.Class.getDeclaredMethods0(Native Method) at
java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at
org.codehaus.janino.ReflectionIClass.getDeclaredIMethods2(ReflectionIClass.java)
at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
at org.codehaus.janino.IClass.getDeclaredIMethods(IClass.java)
at org.codehaus.janino.UnitCompiler.getIMethods(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java) at
org.codehaus.janino.UnitCompiler.findIMethod(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compileGet2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$51(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$9.visitMethodInvocation(UnitCompiler.java)
at org.codehaus.janino.Java$MethodInvocation.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compileGet(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compileGetValue(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$25(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$6.visitMethodInvocation(UnitCompiler.java)
at org.codehaus.janino.Java$MethodInvocation.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$8(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$4.visitExpressionStatement(UnitCompiler.java)
at org.codehaus.janino.Java$ExpressionStatement.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.access$7(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler$4.visitBlock(UnitCompiler.java)
at org.codehaus.janino.Java$Block.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java)
at
org.codehaus.janino.UnitCompiler$3.visitPackageMemberClassDeclaration(UnitCompiler.java)
at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java)
at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java)
at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java)
at org.codehaus.janino.Compiler.compile(Compiler.java)
at
org.drools.commons.jci.compilers.JaninoJavaCompiler.compile(JaninoJavaCompiler.java:174)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:51)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:342)
at org.drools.compiler.DialectRegistry.compileAll(DialectRegistry.java:60)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:308)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:208)
........
at
com.expeditor.utilities.WorkflowUtility.readRule(WorkflowUtility.java:124)
at
com.expeditor.workallocation.ExpeditorActionHandler.execute(ExpeditorActionHandler.java:48)
at org.jbpm.graph.def.Action.execute(Action.java:122)
at sun.reflect.GeneratedMethodAccessor722.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at
org.jbpm.graph.def.Action$$EnhancerByCGLIB$$4193ea21.execute(<generated>)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
at org.jbpm.graph.def.Node.execute(Node.java:338)
at org.jbpm.graph.def.Node.enter(Node.java:318)
at sun.reflect.GeneratedMethodAccessor679.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$c5b9aeed.enter(<generated>)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:393)
at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:209)
at sun.reflect.GeneratedMethodAccessor733.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at
org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$ffffa537.leave(<generated>)
at org.jbpm.graph.exe.Token.signal(Token.java:194)
at org.jbpm.graph.exe.Token.signal(Token.java:165)
at sun.reflect.GeneratedMethodAccessor732.invoke(Unknown Source) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$72485581.signal(<generated>)
--
View this message in context: http://www.nabble.com/Jboss-Drools-4.0.7-OutOfMemory-issue-%2C-code-cache...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 2 months
State management in Guvnor
by Ambika Goel
Hi All,
What is the significance of Status in Guvnor. I have added multiple statuses like Production, Testing etc.
How can I use it to differentiate between rules. I want to run only the rules under production status. How to do it
15 years, 2 months
Re: [rules-users] Drools Flow Persistence Doubt
by Jesper S. Knudsen
Hi Pardeep
I think you are using the wrong syntax in your QL
Should it not be:
select object(v) from VariableInstanceInfo as v where
v.processInstanceInfo.id = :processId
like in ejbql?
Best regards
Jesper
Pardeep.Ruhil(a)lntinfotech.com skrev:
>
> Hi Mauricio,
> Thanks for your reply.
> When I try to run the demo project with configuration to work with
Mysql, I got this exception when I uncommented the the named-query in
orm.xml
> </query>
> select
> v
> from
> VariableInstanceInfo v
> where
> v.processInstanceInfo.id = :processId
> </query>
>
> SEVERE: Error in named query: VariableInstancesInfoByProcessId
> org.hibernate.QueryException: could not resolve property:
processInstanceInfo of:
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
[select v from
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
v where v.processInstanceInfo.id = :processId]
> at
org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:67)
> at
org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:61)
> at
org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1385)
> at
org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:302)
>
> Please help me resolve to this exception.
> Am i doing something wrong?
>
> Thanks & Regards
>
> Pardeep Ruhil
>
>
>
> if you take a look at this post:
> http://blog.athico.com/2009/09/drools-flow-variable-persistence.html
>
> you will see that there is a demo project with the configuration to work
> with MySQL.
> Greetings.
>
> 2009/10/7 <Pardeep.Ruhil(a)lntinfotech.com>
>
> >
> > Hi,
> > I have doubt regarding persistence in Drools.
> > I read the documentation of persistence in Drools Flow and got to know
that
> > it uses hibernate with H2 database as default.
> > My doubt is if I want to use Mysql database, then I want to know which
are
> > the tables that I need to create in the database or
> > Is their any code written which automatically creates the tables in the
> > schema in Mysql database.
> >
> > Also is their any document present for configuring Mysql database.
> > Please help me to get through the situation.
> >
> > Thanks & Regards
> >
> > Pardeep Ruhil
> > _________________
>
>
>
> ______________________________________________________________________
>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 2 months
Re: [rules-users] Drools Flow Persistence Doubt
by Pardeep.Ruhil@lntinfotech.com
Hi Mauricio,
Thanks for your reply.
When I try to run the demo project with configuration to work with Mysql,
I got this exception when I uncommented the the named-query in orm.xml
</query>
select
v
from
VariableInstanceInfo v
where
v.processInstanceInfo.id = :processId
</query>
SEVERE: Error in named query: VariableInstancesInfoByProcessId
org.hibernate.QueryException: could not resolve property:
processInstanceInfo of:
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
[select v from
org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo
v where v.processInstanceInfo.id = :processId]
at
org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(
AbstractPropertyMapping.java:67)
at org.hibernate.persister.entity.AbstractPropertyMapping.toType(
AbstractPropertyMapping.java:61)
at org.hibernate.persister.entity.AbstractEntityPersister.toType(
AbstractEntityPersister.java:1385)
at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(
FromElementType.java:302)
Please help me resolve to this exception.
Am i doing something wrong?
Thanks & Regards
Pardeep Ruhil
if you take a look at this post:
http://blog.athico.com/2009/09/drools-flow-variable-persistence.html
you will see that there is a demo project with the configuration to work
with MySQL.
Greetings.
2009/10/7 <Pardeep.Ruhil(a)lntinfotech.com>
>
> Hi,
> I have doubt regarding persistence in Drools.
> I read the documentation of persistence in Drools Flow and got to know
that
> it uses hibernate with H2 database as default.
> My doubt is if I want to use Mysql database, then I want to know which
are
> the tables that I need to create in the database or
> Is their any code written which automatically creates the tables in the
> schema in Mysql database.
>
> Also is their any document present for configuring Mysql database.
> Please help me to get through the situation.
>
> Thanks & Regards
>
> Pardeep Ruhil
> _________________
______________________________________________________________________
15 years, 2 months