Re: [rules-users] Drools 5.5 : Problems with big rules file (~1.5Meg)
by Nicolas Héron
Hi,
In your rule, in the then part do you create java objects ?
THe best thing would be to have a test case that reproduce this so we can
help to find out.
You should add some listeners to see what is happening, maybe some rules do
an infinite loops or stuff like this ? You have to find out which rule, set
of rules do your effect.
I do not think it comes from drools. I did project with 200k rules, it is
slow to build the package but once this is done, the rest works perfectly.
Have you tried to cut your drl file in smaller files ?
Cheers
Nicolas
2013/9/16 peter.kutzner [via Drools] <
ml-node+s46999n4025981h44(a)n3.nabble.com>
> Hi Nicolas
>
> Thx for your quick answer.
>
> Ok, i forgot some informations:
> Using : Java6.0.45 X64 (same problems using Java 7 X64)
>
> No, i don't use listeners.
> I tried with up to 10Gig without success.
>
> My (reduced) workflow is :
>
> 1) <code>
> kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add(ResourceFactory.newClassPathResource(RULES_PATH, getClass()),
> ResourceType.DRL);
> kbase = KnowledgeBaseFactory.newKnowledgeBase();
> kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
> </code>
> 2) <code>
> StatefulKnowledgeSession ruleSession =
> kbase.newStatefulKnowledgeSession();
> </code> so far so good
> 3) insert two supporter objects in session
> 4) add two more worker objects in session
> 5) fire all rules
> 6) read and retract all expected objects
> 7) dispose session
>
> Processing Steps 2)-7) (in a loop with different worker objects, to
> produce load, so there is always only
> one session active) work fine for a view times (3-9) then the mentioned
> exception occurs.
> I also tried it with 10gig for the jvm but in either test the memoryload
> does not exceed 3gig.
>
> With a reduced rules file size (to < 500k; removed some rules, to test
> this) i can handle 300000(!)
> loops without any exceptions.
>
> Hope this infos will help.
>
> Regards
> Peter
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
> To start a new topic under Drools: User forum, email
> ml-node+s46999n47000h33(a)n3.nabble.com
> To unsubscribe from Drools, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscr...>
> .
> NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_vi...>
>
-----
Nicolas Héron
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Re: [rules-users] Drools 5.5 : Problems with big rules file (~1.5Meg)
by Nicolas Héron
Hi,
Are you using listeners ? if yes you should unregister them from the
working memory and apply the dispose method to be sure all memory is
..disposed !
Your file may be big but as binary, you package may not be so big and it
depends also of how many objects you inserted in the working memory
(StatefullKnowledgeSessions).
Also, I guess your are using jdk 64 bits ? Then you can use more memory
then just 1.5 GB.
Your error message is strange. Does it work if you keep all rules but
reduce the number of // sessions ?
You should give us more info.
Cheers
Nicolas
2013/9/16 peter.kutzner [via Drools] <
ml-node+s46999n4025974h27(a)n3.nabble.com>
> Hi community
>
> I have actually some problems to work with my rules file (.drl).
> It is about 1.5Meg (~2500 rules)
>
> After creating multiple sessions (3 to 9; StatefulKnowledgeSessions) i get
> an exception.
>
> Usually '... java.lang.RuntimeException: cannot invoke method: update ...'
> or directly and '....evaluate(Unknown Source) ...) is thrown.
>
> After reducing the rules file size to less than 500k it works without any
> exceptions.
>
> Using:
> Drools 5.5
> Win7 X64 / 16G Ram
>
> Does anyone have similar problems ?
> Are there any known memory problems within Drools 5.5 ?
> Or is my rules file unusually big ?
>
> T.i.a.
> Peter
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
> To start a new topic under Drools: User forum, email
> ml-node+s46999n47000h33(a)n3.nabble.com
> To unsubscribe from Drools, click here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscr...>
> .
> NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_vi...>
>
-----
Nicolas Héron
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-Problems-with-big-rules-file...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Exception in thread "main" org.drools.ProviderInitializationException
by poonam.ligade@wipro.com
Hi,
I have included following jars:
drools-api-5.0.1.BRMS
drools-compiler-5.1.1
drools-api-5.1.1
drools-core-5.1.1
I am getting below error:
Exception in thread "main" org.drools.ProviderInitializationException: Provider org.drools.builder.impl.KnowledgeBuilderProviderImpl could not be set.
at org.drools.builder.KnowledgeBuilderFactory.loadProvider(KnowledgeBuilderFactory.java:111)
at org.drools.builder.KnowledgeBuilderFactory.getKnowledgeBuilderProvider(KnowledgeBuilderFactory.java:101)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:29)
at com.comp.drools.SimpleRule.createKnowledgeBase(SimpleRule.java:84)
at com.comp.drools.SimpleRule.main(SimpleRule.java:32)
Caused by: java.lang.ClassNotFoundException: org.drools.builder.impl.KnowledgeBuilderProviderImpl
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.drools.builder.KnowledgeBuilderFactory.loadProvider(KnowledgeBuilderFactory.java:108)
... 4 more
I have configured eclipse JBPM plugin
using java 7 and apache tomcat 7
Please help me finding solution ASAP.
Thanks,
Poonam.
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
12 years, 9 months
help
by poonam.ligade@wipro.com
Hi,
I want to post a query.
Could you please let me know the process.
I am getting error As 'You are not allowed to post on this link'.
Thanks,
Poonam
Please do not print this email unless it is absolutely necessary.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
12 years, 9 months
Need help is escalation event
by Zahid Ahmed
Hi,
I want to use Escalation intermediate event in JBPM5.4. For this I placed an "escalation intermediate event" as a boundary event of an human task. Escalation event has an attribute of expression. I need to know what shall I write to escalate this task to some other user if its not being processed by the current owner.
12 years, 9 months
Guvnor5.5 : Rest Api Package Based Authentication
by Zahid Ahmed
Hi,
I have a centralized Guvnor5.5 environment where multiple applications access the Guvnor through rest api for their respective assets.
Each application is assigned a change-set that points to the Package containing assets for that application only. In each change-set the authentication provided is "basic-authentication".
Problem Case:
If the application developer knows the names of other packages he can point the application to run processes of other applications. This causes security issue for us. Applications should access assets assigned to them in their change-set only.
I need to setup user and permissions for access through REST interface on the basis of packages. Applications accessing Guvnor should be allowed only to access their respective package/assets/categories only.
Thanks and Best Regards,
Zahid Ahmed
12 years, 9 months
Firing Rule with in a process definition
by Zahid Ahmed
Hi,
I need to know how can I fire a rule within a process definition. I want this to control the flow of my Business Process.
Thanks and Best Regards,
Zahid Ahmed
12 years, 9 months
Can calendars be defined within .drl ?
by Alexander Wolf
Hey,
I use a lot of quartz calendars in my rules like this:
rule "my rule"
calendars "myCalendar"
when
But defining them in java is quite verbose. Also I often use the same calendar for only one rule. I believe the calendar is part of the logic and therefore don't like to initialize it elsewhere but with the logic code in the rule.
DailyCalendar myCalendar = new DailyCalendar( 7, 0, 0, 0, 8, 0, 0, 0 );
myCalendar.setInvertTimeRange( true );
ksession.getCalendars().set( "myCalendar", QuartzHelper.quartzCalendarAdapter( myCalendar ) );
I would rather define calendars directly in the rule files or even exactly where I use them, e.g.
rule "my super rule"
calendars DailyCalendar( 7, 0, 0, 0, 8, 0, 0, 0, true );
when
or defining them in the rule file like this: (example)
declare "myCalendar"
@role(calendar)
@type( daily )
@from (7,0,0)
@until (8, 0, 0)
@invert(true)
end
and the use them as ever.
I couldnt find anything like this in the documentation, but would not be surprised if it is actually already possible somehow.
If not I would like to suggest this as a new feature ;) (I think I'd prefer the second example with declare)
- Alex
12 years, 10 months
using after in calendar rule
by Alexander Wolf
Following rule does not work for me (see exception) - I got the impression that having a calendar for a rule that uses "after" leads to this. Any ideas? (Version 5.5.0 Final)
The point of time I get the exception is NOT within the defined calendar time (the rule should actually be ignored at that time...)
rule "myrule"
calendars "myCalendar"
when
//an event
$event: Event() from entry-point "EventStream"
//no more events after
not (Event(this after[0 , 30m] $event)from entry-point "EventStream" )
then
//actions
end
Exception in thread "main" org.drools.RuntimeDroolsException: Unexpected exception executing action org.drools.reteoo.PropagationQueuingNode$PropagateAction@56a75737
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:995)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:362)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:311)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:127)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:55)
at Application.runSimulation(Test.java:173)
at Application.main(Test.java:68)
Caused by: java.lang.NullPointerException
at org.drools.time.impl.PseudoClockScheduler.removeJob(PseudoClockScheduler.java:147)
at org.drools.common.Scheduler.removeAgendaItem(Scheduler.java:75)
at org.drools.common.DefaultAgenda.removeScheduleItem(DefaultAgenda.java:475)
at org.drools.common.DefaultAgenda.removeActivation(DefaultAgenda.java:352)
at org.drools.common.DefaultAgenda.cancelActivation(DefaultAgenda.java:688)
at org.drools.reteoo.RuleTerminalNode.retractLeftTuple(RuleTerminalNode.java:322)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:224)
at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:98)
at org.drools.reteoo.NotNode.retractLeftTuple(NotNode.java:216)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:250)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.propagateRetractLeftTuple(CompositeLeftTupleSinkAdapter.java:131)
at org.drools.reteoo.NotNode.propagateRetractLeftTuple(NotNode.java:444)
at org.drools.reteoo.NotNode.assertObject(NotNode.java:140)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
at org.drools.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:426)
at org.drools.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:280)
at org.drools.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:588)
at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:993)
... 6 more
- Alex
12 years, 10 months