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.
12 years, 4 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.
12 years, 4 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.
12 years, 4 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.
12 years, 4 months
Drools-Guvnor integration with Webshere- Exception during startup...Please help!!!
by Ravikiran
Hi,
I am deploying drools-guvnor.war (version 5.3.0) into Websphere AS 7. The
war file was working perfectly fine in JBoss AS 7. But i am getting below
exception when launching the guvnor from browser...
[18/07/12 12:09:02:101 SGT] 00000032 SystemOut O ERROR 18-07
12:09:02,101 (LoggingHelper.java:error:74) Service method 'public abstract
org.drools.guvnor.client.rpc.UserSecurityContext
org.drools.guvnor.client.rpc.SecurityService.getCurrentUser()' threw an
unexpected exception: java.lang.IllegalStateException: CDI hasn't been
properly started.
Make sure your IDE classpath is in sync with the real maven classpath.
The classpath should include weld-servlet.
java.lang.IllegalStateException: CDI hasn't been properly started.
Make sure your IDE classpath is in sync with the real maven classpath.
The classpath should include weld-servlet.
at
org.drools.guvnor.server.SecurityServiceServlet.getCurrentUser(SecurityServiceServlet.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:445)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:504)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:301)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1563)
[18/07/12 12:09:02:101 SGT] 00000032 webapp I
com.ibm.ws.webcontainer.webapp.WebApp log SRVE0296E:
[drools-guvnor_war#drools-guvnor.war][/drools-guvnor][Servlet.LOG]:.Exception
while dispatching incoming RPC
call:.com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract org.drools.guvnor.client.rpc.UserSecurityContext
org.drools.guvnor.client.rpc.SecurityService.getCurrentUser()' threw an
unexpected exception: java.lang.IllegalStateException: CDI hasn't been
properly started.
Make sure your IDE classpath is in sync with the real maven classpath.
The classpath should include weld-servlet.
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:385)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:588)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1663)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:939)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:445)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:504)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:301)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1563)
Caused by: java.lang.IllegalStateException: CDI hasn't been properly
started.
Make sure your IDE classpath is in sync with the real maven classpath.
The classpath should include weld-servlet.
at
org.drools.guvnor.server.SecurityServiceServlet.getCurrentUser(SecurityServiceServlet.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
... 26 more
-----------------------------------------------------------------------------------------------
I have tried commenting the
org.drools.guvnor.server.repository.SafeWeldListener listener in web.xml,
<listener>
<listener-class>org.drools.guvnor.server.repository.SafeWeldListener</listener-class>
</listener>
but still i am getting the same above mentioned exception..
Anybody...please help...
thanks a lot.
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-Guvnor-integration-with-Webshere...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Jboss As7.0.2 (linux): designer-2.2.Final-jboss7 request to guvnor-5.4.0.Final-jboss-as-7.0: connection refused
by rodolphio
Hi all,
following error appears on trying to save a bpmn2 process:
15:21:28,408 SEVERE
[org.jbpm.designer.web.repository.impl.UUIDBasedJbpmRepository]
(http--192.168.0.67-8080-3) Unable to connect to Gunvor. Is it running?
[Connection refused]
15:21:28,701 SEVERE [org.jbpm.designer.web.server.ServletUtil]
(http--192.168.0.67-8080-2) Connection refused
15:21:28,819 SEVERE [org.jbpm.designer.web.server.DictionaryServlet]
(http--192.168.0.67-8080-2) Connection refused
designer configuration file jbpm.xml :
<externalloadurl protocol="http" host="localhost:8080"
subdomain="guvnor/org.drools.guvnor.Guvnor/oryxeditor" usr="admin"
pwd="admin"/>
guvnor configuration file preferences.properties :
#Designer configuration
designer.url=http://localhost:8080
#Do not change this unless you know what are you doing
designer.context=designer
designer.profile=jbpm
guvnor configuration file beans.xml :
<security:IdentityImpl>
<s:modifies/>
<security:authenticatorClass>org.drools.guvnor.server.security.DemoAuthenticator</security:authenticatorClass>
</security:IdentityImpl>
subdomaines in Jboss-Server:
-designer
-guvnor
Can anybody help me please. Thanks a lot
--
View this message in context: http://drools.46999.n3.nabble.com/Jboss-As7-0-2-linux-designer-2-2-Final-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Drools-expert: Memory Leak with org.mvel2.MVELRuntime
by jsoula
Hello,
I am using Drools Expert v5.30 with mvel-2.1.0-drools4.jar.
In my program, i run drools in a specific classloader (child first
urlClassloader) and i maybe detect a memory Leak with the class
org.mvel2.MVELRuntime.
In the method resetDebugger, the content of the threadLocal is never set to
null, so i have a reference in the main thread to this instance.
After call debuggerContext.set(null) with the magic of instropection, the
memory leak disappear (and i can reload my specific classloader).
Is this bug already checked? (I have scan google with no result)
Does it concerns drools or mvel?
For what this class is useful?
Thanks for help
Jérémy SOULA
--
View this message in context: http://drools.46999.n3.nabble.com/Drools-expert-Memory-Leak-with-org-mvel...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months
Deploying Guvnor 5.4.0.Final on JBossAS 7.1.2.Final
by Cristiano
Hi all,
I'm currently testing
Guvnor(guvnor-distribution-wars-5.4.0.Final-jboss-as-7.0.war) on AS 7.1 and
it seems to work fine apart from logging. I tried to play around with
jboss-deployment-structure.xml to include and exclude the logging libraries
from Jboss and also removing the logging jar's from WEB-INF/lib without
success. Also tried to tweak the log4j.xml on WEB-INF/classes.
Did someone else faced the same problem? I couldn't get any log on stdout or
on any other logger.
Any advice on how could it be fixed?
Thanks in advance ;)
--
View this message in context: http://drools.46999.n3.nabble.com/Deploying-Guvnor-5-4-0-Final-on-JBossAS...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 4 months