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, 6 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, 6 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, 6 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, 6 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, 6 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, 6 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, 6 months
Issue with Trait feature
by braveheart85
Hello,
I'm just trying trait feature with simple example.
I want trait a PersonData object with a SubjectData trait. My DLR is:
package general
import com.sample.PersonData
declare trait SubjectData
identifierCode : String
selected : boolean
end
rule "PersonToSubject"
when
$p : PersonData( )
then
SubjectData s = don( $p, SubjectData.class, true);
end
and my PersonData class is:
package com.sample;
import java.util.ArrayList;
import java.util.List;
public class PersonData {
protected String identifierCode;
protected List<String> addressList;
protected boolean isSelected;
public String getIdentifierCode() {
return identifierCode;
}
public void setIdentifierCode(String value) {
this.identifierCode = value;
}
public List<String> getAddressList() {
if (addressList == null) {
addressList = new ArrayList<String>();
}
return this.addressList;
}
public boolean isSelected() {
return isSelected;
}
public void setSelected(boolean isSelected) {
this.isSelected = isSelected;
}
}
when i run the engine i get an ugly exception:
Exception executing consequence for rule "PersonToSubject" in general:
org.drools.RuntimeDroolsException: Field/method 'addressList' not found for
class 'org.titan.registry.PersonDataWrapper'
at
org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1297)
at
org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1221)
at
org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1456)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:710)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:674)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:230)
at com.sample.DroolsTest.main(DroolsTest.java:143)
Caused by: org.drools.RuntimeDroolsException: Field/method 'addressList' not
found for class 'org.titan.registry.PersonDataWrapper'
at
org.drools.base.ClassFieldAccessorFactory.getClassFieldWriter(ClassFieldAccessorFactory.java:199)
at
org.drools.base.ClassFieldAccessorCache$CacheEntry.getWriteAccessor(ClassFieldAccessorCache.java:187)
at
org.drools.base.ClassFieldAccessorCache.getWriteAcessor(ClassFieldAccessorCache.java:116)
at
org.drools.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:439)
at
org.drools.base.ClassFieldAccessorStore.getAccessor(ClassFieldAccessorStore.java:219)
at
org.drools.factmodel.traits.TraitFactory.buildWrapperClassDefinition(TraitFactory.java:405)
at
org.drools.factmodel.traits.TraitFactory.getCoreWrapper(TraitFactory.java:367)
at
org.drools.base.DefaultKnowledgeHelper.asTraitable(DefaultKnowledgeHelper.java:560)
at
org.drools.base.DefaultKnowledgeHelper.applyTrait(DefaultKnowledgeHelper.java:542)
at
org.drools.base.DefaultKnowledgeHelper.don(DefaultKnowledgeHelper.java:521)
at
general.Rule_PersonToSubject_38ef6f901e5f401e805934fa0a2576c9.defaultConsequence(Rule_PersonToSubject_38ef6f901e5f401e805934fa0a2576c9.java:7)
at
general.Rule_PersonToSubject_38ef6f901e5f401e805934fa0a2576c9DefaultConsequenceInvokerGenerated.evaluate(Unknown
Source)
at
general.Rule_PersonToSubject_38ef6f901e5f401e805934fa0a2576c9DefaultConsequenceInvoker.evaluate(Unknown
Source)
at
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1287)
... 6 more
Seem to be an issue with java.util.List that is contained within PersonData,
even if the list (addressList) is not selected from SubjectData trait.
Thanks in advance
Best regards
Andrea
--
View this message in context: http://drools.46999.n3.nabble.com/Issue-with-Trait-feature-tp4025937.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months
KnowledgeAgent with persistence?
by dunnlow
I'm using Drools 5.5 (and guvnor)
Can anyone point me to example where a knowledge agent is used with
persistence. I am trying to understand how the knowledgeagent is used with
a persisted session. Fundamentally when my app starts, I am trying to do
one of two things:
If a persisted session does not exist, start a new one and update it
whenever my knowledgebase (in guvnor) changes
ELSE
If a persisted session already exists (i.e. at a system restart), load the
existing session and continue to monitor it for changes.
I have the persistence working and the monitoring of changes (with a
knowledgeagent) working independently, but not together.
My code:
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY,myEMF);
env.set(EnvironmentName.TRANSACTION_MANAGER, myTxManager);
To create/retrieve my ksession I have tried both:
ksession =
JPAKnowledgeService.newStatefulKnowledgeSession(kAgent.getKnowledgeBase(),null,env)
This creates a persisted session, but it is never updated with changes
I also tried:
ksession =
kAgent.getKnowledgeBase().newStatefulKnowledgeSession(null,env);
This updates the ksession with changes, but never persists the session
I figure I can add a KnowledgeAgentEventListener to the agent and then
recreate the ksession by hand (in the knowledgeBaseUpdated method). But I
am hoping there is a cleaner/better way.
Thanks for any ideas.
-J
--
View this message in context: http://drools.46999.n3.nabble.com/KnowledgeAgent-with-persistence-tp40258...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 6 months