Drools/Tomcat/Mysql - dueling repository.xml's
by mfeber
I am fairly new to Drools. I am using guvnor 5.4.0. Final installed on
Tomcat 7.0.27. Following the instructions in the documentation, I
1) Defined/downloaded the a repository.xml pointing to a mysql instance
using the Administration -> Repository Configuration wizard.
2) Stopped Tomcat, removed the $CATALINA_HOME/bin/repository.xml and
repository directory
3) Copied the new repository.xml to $CATALINA_HOME/bin
4) Started Tomcat
5) Using guvnor, my assets were created/stored in the mysql db
6) Stopped Tomcat
7) Started Tomcat
8) Guvnor wrote a new repository.xml into $CATALINA_HOME (NOT
$$CATALINA_HOME/bin which still contained the db version created in step 1.)
and had 'forgotten' about the assets created in step 5.
9) Stopped Tomcat
10) Replaced the $CATALINA_HOME/repository.xml with a copy of the
$CATALINA_HOME/bin/repository.xml.
11) Started Tomcat
12) Guvnor started using the mysql instance again and 'remembered' the
assets from step 5
Now there are two repository.xml files in $CATALINA_HOME and
$CATALINA_HOME/bin. This should not be necessary re the documentation.
Why did it create a new repository/repository.xml in $CATALINA_HOME after a
Tomcat restart?
Which repository.xml is it really using now?
How can I convince it to only use one of them?
[Also of note: the workspace.xml files in
$CATALINA_HOME/repository/workspaces/default and
$CATALINA_HOME/bin/repository/workspaces/default are identical after step
11.]
Thanks,
Mark
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Tomcat-Mysql-dueling-repository-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
MVEL optimizer error
by gboro54
I am having an issue with an optimizer stack trace on my linux QA box that I
can't seem to reproduce on my windows development box. The stack trace is:
13:01:50,188 ERROR [stderr] (Thread-123) Exception in thread "Thread-123"
java.lang.RuntimeException: unable to invoke method:
com.billing.domain.context.OrderSideContext.getPrimarySide: target of method
is null
13:01:50,188 ERROR [stderr] (Thread-123) at
org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:66)
13:01:50,189 ERROR [stderr] (Thread-123) at
org.mvel2.optimizers.impl.refl.nodes.VariableAccessor.getValue(VariableAccessor.java:37)
13:01:50,189 ERROR [stderr] (Thread-123) at
org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
13:01:50,189 ERROR [stderr] (Thread-123) at
org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:107)
13:01:50,189 ERROR [stderr] (Thread-123) at
org.mvel2.ast.And.getReducedValueAccelerated(And.java:34)
13:01:50,189 ERROR [stderr] (Thread-123) at
org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
13:01:50,190 ERROR [stderr] (Thread-123) at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:123)
13:01:50,190 ERROR [stderr] (Thread-123) at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:116)
13:01:50,190 ERROR [stderr] (Thread-123) at
org.mvel2.MVEL.executeExpression(MVEL.java:930)
13:01:50,190 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConditionEvaluator.evaluate(MvelConditionEvaluator.java:70)
13:01:50,190 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConditionEvaluator.ensureBranchEvaluation(MvelConditionEvaluator.java:113)
13:01:50,191 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:106)
13:01:50,191 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConditionEvaluator.ensureCompleteEvaluation(MvelConditionEvaluator.java:90)
13:01:50,191 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConditionEvaluator.getAnalyzedCondition(MvelConditionEvaluator.java:82)
13:01:50,191 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConstraint.executeJitting(MvelConstraint.java:214)
13:01:50,191 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConstraint.access$000(MvelConstraint.java:41)
13:01:50,192 ERROR [stderr] (Thread-123) at
org.drools.rule.constraint.MvelConstraint$1.run(MvelConstraint.java:201)
13:01:50,192 ERROR [stderr] (Thread-123) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
13:01:50,192 ERROR [stderr] (Thread-123) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
13:01:50,192 ERROR [stderr] (Thread-123) at
java.lang.Thread.run(Thread.java:662)
13:01:50,192 ERROR [stderr] (Thread-123) Caused by:
java.lang.NullPointerException
13:01:50,193 ERROR [stderr] (Thread-123) at
sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source)
13:01:50,193 ERROR [stderr] (Thread-123) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
13:01:50,193 ERROR [stderr] (Thread-123) at
java.lang.reflect.Method.invoke(Method.java:597)
13:01:50,193 ERROR [stderr] (Thread-123) at
org.mvel2.optimizers.impl.refl.nodes.GetterAccessor.getValue(GetterAccessor.java:40)
13:01:50,193 ERROR [stderr] (Thread-123) ... 19 more
We are using a CENTOS with Java 1.6._31 and drools 5.4.
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/MVEL-optimizer-error-tp4018714.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Using Global Model for all packages
by starfish15
Hi Admins,
I have been using GUVNOR 5.2 from sometime now. We have different packages
created, as per the requirement of different teams. However, they do use the
same MODEL. I was wondering if we could simply upload a jar in the global
area, and use the same in every other package. I know that we can create
models for each package and say Import asset from global area. However doing
the same again and again, isnt helping me in any manner.
The rules arent getting updated with the class files and the rules
validation failes with in the Business Rule Assets.
Is it that this doesnt work or is it that am missing on something???
Kindly assist ASAP.
Regards,
starfish
--
View this message in context: http://drools.46999.n3.nabble.com/Using-Global-Model-for-all-packages-tp4...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
Guvnor5.4 and JBPM5.3 web designer error with IE8
by Ricardo
Hi,
I am tring to open JBPM5.3 web designer in Guvnor5.4 running in JBossAS7,
but fails to open, when I try to open a pop up window says that ' checking
chrome frame' if you click the ok button in this pop-up window , it opens a
new IE window with chrome plug-in information and Guvnor not display the web
designer insted a window popup and says designer loading...but designer not
loading...for ever...
any help will be appriciated...
thanks,
-----
with kind regards,
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor5-4-and-JBPM5-3-web-designer-erro...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
com.google.protobuf.InvalidProtocolBufferException thrown when deserializing
by chrisLi
Hi Droolers,
I am using DroolsObjectOutputStream/DroolsObjectInputStream to
serialize/deserialzie a Stateful
knowledgeSession. The process of serialziation worked well and the size of
the file containing the serialzied
infomation is about 150M. However, when I tried to deserialize the file into
a session, I got an exception. The
stacktrace of the exception is as follows:
com.google.protobuf.InvalidProtocolBufferException: Protocol message was
too large. May be malicious. Use CodedInputStream.setSizeLimit() to
increase the size limit.
at
com.google.protobuf.InvalidProtocolBufferException.sizeLimitExceeded(InvalidProtocolBufferException.java:89)
at
com.google.protobuf.CodedInputStream.refillBuffer(CodedInputStream.java:720)
at com.google.protobuf.CodedInputStream.isAtEnd(CodedInputStream.java:666)
at com.google.protobuf.CodedInputStream.readTag(CodedInputStream.java:99)
at
org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom(ProtobufMessages.java:963)
at
org.drools.marshalling.impl.ProtobufMessages$Header$Builder.mergeFrom(ProtobufMessages.java:769)
at
com.google.protobuf.AbstractMessageLite$Builder.mergeFrom(AbstractMessageLite.java:212)
at
com.google.protobuf.AbstractMessage$Builder.mergeFrom(AbstractMessage.java:746)
at
org.drools.marshalling.impl.ProtobufMessages$Header.parseFrom(ProtobufMessages.java:720)
at
org.drools.marshalling.impl.PersisterHelper.readFromStreamWithHeader(PersisterHelper.java:234)
at
org.drools.marshalling.impl.ProtobufInputMarshaller.loadAndParseSession(ProtobufInputMarshaller.java:221)
at
org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:152)
at
org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:117)
at com.sample.engine.CepEngine.deserialize(CepEngine.java:308)
at com.sample.engine.CepEngine.<init>(CepEngine.java:77)
at com.sample.test.EventDataConsumer.<init>(EventDataConsumer.java:19)
at com.sample.test.CepTimeTest.main(CepTimeTest.java:19)
Exception in thread "main" java.lang.NullPointerException
at com.sample.engine.CepEngine.initCommons(CepEngine.java:138)
at com.sample.engine.CepEngine.<init>(CepEngine.java:90)
at com.sample.test.EventDataConsumer.<init>(EventDataConsumer.java:19)
at com.sample.test.CepTimeTest.main(CepTimeTest.java:19)
It seems that some code of drools set the size limit of deserialized file.
Thus, where can I set the size limit
to meet my needs? Is there a configuration file I can use?
Thank you very much. Any response will be appreciated.
--
View this message in context: http://drools.46999.n3.nabble.com/com-google-protobuf-InvalidProtocolBuff...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
NESTED LOOPS Possible
by salt
Hi,
Please let me know nested loops are possible in drools or not..
Scenario like this needs to be developed
list values : A,B,C,D,E,F..
Need to set 1 in Action if D is after C.
So here i need to loook for D and if got again that list will be iterated
and will check for C.
Have tried this logic without nested loops and it works fine but performance
wise its hitting.
So Kindy let me know whether Nested loops are possible or not..
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/NESTED-LOOPS-Possible-tp4018811.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 8 months
How to retract events that don't match any rules (without @expires())
by Ladd
Is there a recommended way to remove events from working memory that don't
match and can't activate any rules?
For example, let's say I have two rules which should both fire when a person
with name "Bob" is encountered. If a person with name "Jim" comes in he
stays in working memory forever even though he doesn't match any current
rules.
I know @expires() for Person events would work. But I don't know what a
"safe" time would be since I don't know ahead of time what temporal rules
might be written for them.
>From the 5.4.0 Drools Fusion docs (Chapter 2) I found these statements:
/"In other words, one an event is inserted into the working memory, it is
possible for the engine to find out when an event can no longer match other
facts and automatically retract it, releasing its associated resources."/
/"Events may be automatically expired after some time in the working memory.
Typically this happens when, based on the existing rules in the knowledge
base, the event can no longer match and activate any rules. Although, it is
possible to explicitly define when an event should expire."/
Based on this statement I would expect my "Jim" to be automatically expired
after "some time". Maybe it will be and I'm just not waiting long enough.
But then I found this quote from Edson:
/"Any object type for which there are no explicit
expiration policy, nor temporal constraints from which to derive the
expiration offset will have an infinite expiration offset, i.e., will never
be automatically retracted."/
So my question is, how can I retract events which don't match any rules?
Thanks in advance for any tips or suggestsions!!
- Ladd
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-retract-events-that-don-t-match-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months
Counting Number of Items in NESTED LIST
by aliosha79
I have this use case: an Order can contain one or more items... each item is
characterized by one or more measures. They are described by this simple
pojo class.
public class Order{
protected List<Item> itemList;
public void setItemList (List<Item> itemList) { ... }
public List<Item> getItemList() { ... }
}
public class Item {
protected List<Measure> measureList;
public void setMeasureList (List<Measure> measureList) { ... }
public List<Measure> getMeasureList() { ... }
}
public class Measure {
protected int measure;
public getMeasure() { ... }
public setMeasure() { ... }
}
Supposing i have in my Working Memory an Order containing 2 items. The first
item contains 5 measures, the second one instead contains 12 Measures.
I'd like to write a rule using MVEL (for the assumptions), specifying
WHEN each ITEM has more than 11 measures THEN system.out.println ("order is
valid");
How can i write the assumption? It's important to use MVEL ... (is it
necessary to use accumulate? from? or what?)
Really thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/Counting-Number-of-Items-in-NESTED-LIST...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 9 months