Moving comment in DSLR file causes issue under 5.3
by drdaveg
This is an odd one. I was testing some DSL and have been tracing back an
error in the translation. The line marked in the code below, even as a
comment, causes multiple "cannot be resolved" errors when moved. Any
thoughts on what could cause this other than a bug?
Note that almsot all of the code is commented and as it appears now
generates the errors. If I move the line to the LHS the "cannot be
resolved" errors go away. The only interesting thing shown in the DRL
viewer is that some of the comments appear duplicated.
rule "Compute"
when
# Fare(fareBasisCode == fp1)
# ts1 : TrainSegment(fl1 : fareList)
# ts2 : TrainSegment(fl2 : fareList)
# mySol : Solution()
> Fare(fp1 : fareBasisCode, thruFare == true)
> x : FQ3()
# eval(fl1.get(fp1 )!=null)
# eval(fl2.get(fp1 )!=null)
# eval(mySol .nthSegment(ts1)==(mySol .nthSegment(ts2)+1))
then
# > //int n = fq.nthSegment(fp1) ****** moving this line can cause a
syntax error
# > FQ3 test = new FQ3(); test = fq;
> System.out.println(fp1);
> x.setPassengerString("T"); // x.getPassengerString()+
end
--
View this message in context: http://drools.46999.n3.nabble.com/Moving-comment-in-DSLR-file-causes-issu...
Sent from the Drools: User forum mailing list archive at Nabble.com.
14 years
java.lang.NullPointerException at org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(ReteooFactHandleFactory.java:56)
by Carolina Pellecchia
*Hi everyone! *
*I'm loading from Guvnor5.3.0 the pkg below ** into my application. *
*package* org.dfms.model;
*import* org.dfms.model.observation.ACObservation;
*import* org.dfms.model.situation.AccessControlEvent;
*import* org.dfms.model.situation.SituationManager;
*import* org.dfms.model.situation.Event;
*import* org.dfms.model.mapfeature.AccessControlPoint;
*import* java.util.HashSet;
*import* java.util.ArrayList;
*declare* ACObservation
@role(event)
*end*
*declare* AccessControlEvent
@role(event)
*end*
*rule* "AccessControl"
*no-loop*
*when*
$obs : ACObservation( $sensorid : sensorId, $location :
location ) over window:length(1) *from* entry-point access_control
*then*
*insert*( SituationManager.createAccessControlEvent( $obs, "Access
Control Detection", Event.THREAT_NO, $location, $sensorid ));
*end*
*When the rule is executed the application get this exception:*
[*java*] ERROR [2012-07-20 14:32:17,422] [Thread-19] (*
ExpertSystemManager.java:162*) - *java.lang.NullPointerException*
[*java*] *java.lang.NullPointerException*
[*java*] at
org.drools.reteoo.ReteooFactHandleFactory.newFactHandle(*
ReteooFactHandleFactory.java:56*)
[*java*] at
org.drools.common.AbstractFactHandleFactory.newFactHandle(*
AbstractFactHandleFactory.java:80*)
[*java*] at
org.drools.common.AbstractFactHandleFactory.newFactHandle(*
AbstractFactHandleFactory.java:65*)
[*java*] at org.drools.common.NamedEntryPoint.createHandle(*
NamedEntryPoint.java:720*)
[*java*] at org.drools.common.NamedEntryPoint.insert(*
NamedEntryPoint.java:280*)
[*java*] at org.drools.common.NamedEntryPoint.insert(*
NamedEntryPoint.java:116*)
[*java*] at org.drools.common.NamedEntryPoint.insert(*
NamedEntryPoint.java:48*)
[*java*] at org.tass.utils.ExpertSystemManager.insertObservation(
*ExpertSystemManager.java:156*)
[*java*] at org.tass.vsensor.ExpertVS.dataAvailable(*
ExpertVS.java:59*)
[*java*] at gsn.beans.InputStream.executeQuery(*
InputStream.java:277*)
[*java*] at gsn.beans.StreamSource.windowSlided(*
StreamSource.java:325*)
[*java*] at
gsn.beans.windowing.SQLViewQueryRewriter.dataAvailable(*
SQLViewQueryRewriter.java:83*)
[*java*] at
gsn.beans.windowing.TupleBasedSlidingHandler.dataAvailable(*
TupleBasedSlidingHandler.java:56*)
[*java*] at gsn.wrappers.AbstractWrapper.postStreamElement(*
AbstractWrapper.java:222*)
[*java*] at
gsn.http.rest.LocalDeliveryWrapper.writeStreamElement(*
LocalDeliveryWrapper.java:147*)
[*java*] at
gsn.http.rest.DefaultDistributionRequest.deliverStreamElement(*
DefaultDistributionRequest.java:57*)
[*java*] at gsn.DataDistributer.flushStreamElement(*
DataDistributer.java:165*)
[*java*] at gsn.DataDistributer.run(*DataDistributer.java:220*)
[*java*] at java.lang.Thread.run(*Thread.java:662*)
*How can I solve this issue?*
*
Thank you in advance,
Carolina Pellecchia*
14 years
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.
14 years
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.
14 years
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.
14 years
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.
14 years
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.
14 years
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.
14 years