[JBoss JIRA] (JGRP-1708) sun.security.rsa.RSAPrivateCrtKeyImpl cannot be cast to javax.crypto.SecretKey
by shen kim (JIRA)
shen kim created JGRP-1708:
------------------------------
Summary: sun.security.rsa.RSAPrivateCrtKeyImpl cannot be cast to javax.crypto.SecretKey
Key: JGRP-1708
URL: https://issues.jboss.org/browse/JGRP-1708
Project: JGroups
Issue Type: Bug
Environment: JDK1.7 Jgroups3.4.0.Beta1
Reporter: shen kim
Assignee: Bela Ban
When I used ENCRYPT with key_store like this:
<config xmlns="urn:org:jgroups" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.3.xsd">
<TCP />
<MPING />
<MERGE2 />
<FD />
<VERIFY_SUSPECT />
<ENCRYPT key_store_name="server.keystore" store_password="changeit" alias="tomcat"/>
<pbcast.NAKACK />
<UNICAST3 />
<pbcast.GMS />
<UFC />
<MFC />
<STATS />
<pbcast.STATE_SOCK />
</config>
When I start the first Cluster it is OK, but when I start the second Cluster it throw:
Exception in thread "main" java.lang.ClassCastException: sun.security.rsa.RSAPrivateCrtKeyImpl cannot be cast to javax.crypto.SecretKey
at org.jgroups.protocols.ENCRYPT.initConfiguredKey(ENCRYPT.java:274)
at org.jgroups.protocols.ENCRYPT.init(ENCRYPT.java:234)
at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:848)
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:467)
at org.jgroups.JChannel.init(JChannel.java:830)
at org.jgroups.JChannel.<init>(JChannel.java:158)
at org.jgroups.JChannel.<init>(JChannel.java:138)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (DROOLS-278) ProtobufMarshaller throws ClassCastException when marshalling CDI proxied KieSession.
by Duncan Doyle (JIRA)
Duncan Doyle created DROOLS-278:
-----------------------------------
Summary: ProtobufMarshaller throws ClassCastException when marshalling CDI proxied KieSession.
Key: DROOLS-278
URL: https://issues.jboss.org/browse/DROOLS-278
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 6.0.0.CR3
Environment: Mac OS-X 1.0.8.5, Hotspot 1.7.0_40
Reporter: Duncan Doyle
Assignee: Mark Proctor
I have a CDI (Weld) @Producer which produces a KieSession. The KieSession is therefore proxied by a CDI/Weld proxy. When I try to marshall such a KieSession object, the ProtobufMarshaller throws the following ClassCastException:
01:21:07.505 [main] ERROR o.j.d.b.c.CdiSessionPersistenceTest - Error saving KieSession.
java.lang.ClassCastException: org.jboss.weld.proxies.CommandExecutor$EntryPoint$KieRuntime$KieRuntimeEventManager$KieSession$ProcessEventManager$ProcessRuntime$RuleRuntime$StatefulProcessSession$StatefulRuleSession$WorkingMemoryEventManager$761192450$Proxy$_$$_WeldClientProxy cannot be cast to org.drools.core.impl.StatefulKnowledgeSessionImpl
at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:157) ~[drools-core-6.0.0.CR4-Pre1.jar:6.0.0.CR4-Pre1]
at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:148) ~[drools-core-6.0.0.CR4-Pre1.jar:6.0.0.CR4-Pre1]
at org.jboss.ddoyle.brms.cep.ha.management.FileKieSessionLoader.save(FileKieSessionLoader.java:67) ~[classes/:na]
at org.jboss.ddoyle.brms.cep.ha.management.FileKieSessionLoader.save(FileKieSessionLoader.java:37) ~[classes/:na]
at org.jboss.ddoyle.brms.cep.ha.drools.session.SessionManager.saveKieSession(SessionManager.java:27) ~[classes/:na]
at org.jboss.ddoyle.brms.cep.ha.drools.session.SessionManager$Proxy$_$$_WeldClientProxy.saveKieSession(SessionManager$Proxy$_$$_WeldClientProxy.java) ~[classes/:na]
at org.jboss.ddoyle.brms.cdi.CdiSessionPersistenceTest.testCdiSessionPersistence(CdiSessionPersistenceTest.java:43) ~[test-classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_40]
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [junit-4.11.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [junit-4.11.jar:na]
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit-4.11.jar:na]
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) [surefire-junit4-2.10.jar:2.10]
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) [surefire-junit4-2.10.jar:2.10]
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) [surefire-junit4-2.10.jar:2.10]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_40]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_40]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_40]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_40]
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) [surefire-api-2.10.jar:2.10]
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) [surefire-booter-2.10.jar:2.10]
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) [surefire-booter-2.10.jar:2.10]
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) [surefire-booter-2.10.jar:2.10]
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) [surefire-booter-2.10.jar:2.10]
I've created a reproducer which shows the behaviour: https://github.com/DuncanDoyle/DroolsSessionCdiClassCastException
Just run 'mvn clean test' in the project.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (WFLY-2178) exception in distributable webapp leads to infinispan lock contention
by Thomas Frühbeck (JIRA)
[ https://issues.jboss.org/browse/WFLY-2178?page=com.atlassian.jira.plugin.... ]
Thomas Frühbeck commented on WFLY-2178:
---------------------------------------
see UNDERTOW-107 for the reason of ConcurrentModificationException
> exception in distributable webapp leads to infinispan lock contention
> ----------------------------------------------------------------------
>
> Key: WFLY-2178
> URL: https://issues.jboss.org/browse/WFLY-2178
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 8.0.0.Beta1
> Reporter: Thomas Frühbeck
> Assignee: Paul Ferraro
> Attachments: lockContention_server.log
>
>
> Exception in session.invalidate leads to:
> ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (default task-23) ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutExceptio
> n: Unable to acquire lock after [15 seconds] on key [FIsDATdNvtWFPLx-x-00_6x0] for requestor [GlobalTransaction:<storage/web>:171:local]! Lock held by [GlobalTransaction:<storage/web>:170:local]
> server.log attached
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (WFLY-2178) exception in distributable webapp leads to infinispan lock contention
by Thomas Frühbeck (JIRA)
Thomas Frühbeck created WFLY-2178:
-------------------------------------
Summary: exception in distributable webapp leads to infinispan lock contention
Key: WFLY-2178
URL: https://issues.jboss.org/browse/WFLY-2178
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 8.0.0.Beta1
Reporter: Thomas Frühbeck
Assignee: Paul Ferraro
Attachments: lockContention_server.log
Exception in session.invalidate leads to:
ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (default task-23) ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutExceptio
n: Unable to acquire lock after [15 seconds] on key [FIsDATdNvtWFPLx-x-00_6x0] for requestor [GlobalTransaction:<storage/web>:171:local]! Lock held by [GlobalTransaction:<storage/web>:170:local]
server.log attached
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (WFLY-2178) exception in distributable webapp leads to infinispan lock contention
by Thomas Frühbeck (JIRA)
[ https://issues.jboss.org/browse/WFLY-2178?page=com.atlassian.jira.plugin.... ]
Thomas Frühbeck updated WFLY-2178:
----------------------------------
Attachment: lockContention_server.log
snippet of server.log containing the causing exception and the resulting lock contention messages
> exception in distributable webapp leads to infinispan lock contention
> ----------------------------------------------------------------------
>
> Key: WFLY-2178
> URL: https://issues.jboss.org/browse/WFLY-2178
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 8.0.0.Beta1
> Reporter: Thomas Frühbeck
> Assignee: Paul Ferraro
> Attachments: lockContention_server.log
>
>
> Exception in session.invalidate leads to:
> ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (default task-23) ISPN000136: Execution error: org.infinispan.util.concurrent.TimeoutExceptio
> n: Unable to acquire lock after [15 seconds] on key [FIsDATdNvtWFPLx-x-00_6x0] for requestor [GlobalTransaction:<storage/web>:171:local]! Lock held by [GlobalTransaction:<storage/web>:170:local]
> server.log attached
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (WFLY-2139) ProxyStepHandler/Controller need to check access before attempting to read information
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-2139?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-2139:
-----------------------------------------------
Brian Stansberry <brian.stansberry(a)redhat.com> changed the Status of [bug 1011994|https://bugzilla.redhat.com/show_bug.cgi?id=1011994] from POST to MODIFIED
> ProxyStepHandler/Controller need to check access before attempting to read information
> --------------------------------------------------------------------------------------
>
> Key: WFLY-2139
> URL: https://issues.jboss.org/browse/WFLY-2139
> Project: WildFly
> Issue Type: Sub-task
> Components: Domain Management, Security
> Reporter: Kabir Khan
> Assignee: Kabir Khan
> Fix For: 8.0.0.Beta1
>
>
> This affects things like recursive :read-resource(-description) :read-children-resources and so on. The problem as it stands is that if you have, say, a host scoped role scoped to host=master, and there is also a slave host controller, and you try to :read-resource(recursive=true,proxies=true), the master will list the slave host controller in its list of child addresses. It will then execute /host=slave:read-resource(recursive=true,proxies=true), which will fail and roll back the tx since the master host scoped role does not have access to that resource.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (WFLY-164) java.io.IOException Channel closed exception after several reload of server
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-164?page=com.atlassian.jira.plugin.s... ]
RH Bugzilla Integration commented on WFLY-164:
----------------------------------------------
Brian Stansberry <brian.stansberry(a)redhat.com> changed the Status of [bug 1006246|https://bugzilla.redhat.com/show_bug.cgi?id=1006246] from POST to MODIFIED
> java.io.IOException Channel closed exception after several reload of server
> ---------------------------------------------------------------------------
>
> Key: WFLY-164
> URL: https://issues.jboss.org/browse/WFLY-164
> Project: WildFly
> Issue Type: Bug
> Components: Domain Management
> Reporter: Ondřej Chaloupka
> Assignee: Emanuel Muckenhuber
> Fix For: 8.0.0.Alpha1
>
>
> Small testing program:
> https://github.com/ochaloup/jboss-dmr-test/blob/master/src/main/java/ocha...
> When I run it first time then everything is fine and reload is done and info from server is shown.
> When I left the server run and execute my program several more times (3 or more) then it's starting to crash with exception
> {code}
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: java.io.IOException: java.util.concurrent.ExecutionException: Operation failed
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
> at ochaloup.ClientReload.main(ClientReload.java:19)
> ... 6 more
> Caused by: java.util.concurrent.ExecutionException: Operation failed
> at org.jboss.threads.AsyncFutureTask.operationFailed(AsyncFutureTask.java:74)
> at org.jboss.threads.AsyncFutureTask.get(AsyncFutureTask.java:268)
> at org.jboss.as.controller.client.impl.AbstractDelegatingAsyncFuture.get(AbstractDelegatingAsyncFuture.java:100)
> at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:127)
> ... 8 more
> Caused by: java.io.IOException: Channel closed
> at org.jboss.as.protocol.mgmt.AbstractMessageHandler.handleChannelClosed(AbstractMessageHandler.java:354)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient$2.handleClose(RemotingModelControllerClient.java:135)
> at org.jboss.as.controller.client.impl.RemotingModelControllerClient$2.handleClose(RemotingModelControllerClient.java:132)
> at org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy$Establishing$3.handleClose(ManagementClientChannelStrategy.java:189)
> at org.jboss.as.protocol.mgmt.ManagementClientChannelStrategy$Establishing$3.handleClose(ManagementClientChannelStrategy.java:180)
> at org.jboss.remoting3.spi.SpiUtils.safeHandleClose(SpiUtils.java:54)
> at org.jboss.remoting3.spi.AbstractHandleableCloseable$CloseHandlerTask.run(AbstractHandleableCloseable.java:501)
> at org.jboss.remoting3.spi.AbstractHandleableCloseable.runCloseTask(AbstractHandleableCloseable.java:406)
> at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeComplete(AbstractHandleableCloseable.java:277)
> at org.jboss.remoting3.remote.RemoteConnectionChannel.closeAction(RemoteConnectionChannel.java:517)
> at org.jboss.remoting3.spi.AbstractHandleableCloseable.closeAsync(AbstractHandleableCloseable.java:359)
> at org.jboss.remoting3.remote.RemoteConnectionHandler.closeAllChannels(RemoteConnectionHandler.java:382)
> at org.jboss.remoting3.remote.RemoteConnectionHandler.handleConnectionClose(RemoteConnectionHandler.java:103)
> at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:78)
> at org.jboss.remoting3.remote.RemoteReadListener.handleEvent(RemoteReadListener.java:45)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
> at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
> at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
> at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
> at org.xnio.ssl.JsseConnectedSslStreamChannel.handleReadable(JsseConnectedSslStreamChannel.java:180)
> at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
> at org.xnio.nio.NioHandle.run(NioHandle.java:90)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
> {code}
> Maybe this could be connected with AS7 testsuite problem:
> https://issues.jboss.org/browse/AS7-4185
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (DROOLS-275) RuleEngine AfterEvaluator.evaluateCachedRight throws NPE on persisted Session reload (Phreak, Stream, PseudoClock)
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-275?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated DROOLS-275:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1013197
> RuleEngine AfterEvaluator.evaluateCachedRight throws NPE on persisted Session reload (Phreak, Stream, PseudoClock)
> ------------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-275
> URL: https://issues.jboss.org/browse/DROOLS-275
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.CR3
> Environment: Mac OS-X 10.8.5, Hotspot 1.7.0_40
> Reporter: Duncan Doyle
> Assignee: Mark Proctor
>
> I persist a KieSession via the Marshaller (serializable) with one fact/event inserted. On reload of the session, I can see that fact is still there (when I check the FactHandles) and the PseudoClock is at the correct time (the time when I persisted it). If I then insert another fact/event into this reloaded session which matches the following rule:
> rule "SimpleFactTimeWindow"
> when
> $s1: SimpleFact() from entry-point LinkyStream
> $s2: SimpleFact(this != $s1, this after [0s, 10s] $s1) from entry-point LinkyStream
> then
> System.out.println("Rule fired, found 2 Facts within the time window.");
> end
> I get a NPE (in both Phreak and ReteOO mode). Exception in Phreak:
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
> at java.lang.Thread.run(Thread.java:724)
> Caused by: java.lang.NullPointerException
> at org.drools.core.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedRight(AfterEvaluatorDefinition.java:304)
> at org.drools.core.rule.constraint.EvaluatorConstraint.isAllowedCachedRight(EvaluatorConstraint.java:80)
> at org.drools.core.common.DoubleBetaConstraints.isAllowedCachedRight(DoubleBetaConstraints.java:117)
> at org.drools.core.phreak.PhreakJoinNode.doRightInserts(PhreakJoinNode.java:150)
> at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:56)
> at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:547)
> at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:533)
> at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:335)
> at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:162)
> at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:117)
> at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:65)
> at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:936)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1183)
> at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:936)
> at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:910)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:233)
> at org.jboss.ddoyle.brms.cep.ha.management.TestScenarioRunner.secondRun(TestScenarioRunner.java:142)
> at org.jboss.ddoyle.brms.cep.ha.management.MainSecondRun.main(MainSecondRun.java:7)
> ... 6 more
> Exception in ReteOO:
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
> at java.lang.Thread.run(Thread.java:724)
> Caused by: org.drools.core.RuntimeDroolsException: Unexpected exception executing action org.drools.core.reteoo.PropagationQueuingNode$PropagateAction@2e3aeda
> at org.drools.core.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1225)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:371)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:278)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:131)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:56)
> at org.jboss.ddoyle.brms.cep.ha.management.TestScenarioRunner.secondRun(TestScenarioRunner.java:140)
> at org.jboss.ddoyle.brms.cep.ha.management.MainSecondRun.main(MainSecondRun.java:7)
> ... 6 more
> Caused by: java.lang.NullPointerException
> at org.drools.core.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedLeft(AfterEvaluatorDefinition.java:324)
> at org.drools.core.rule.constraint.EvaluatorConstraint.isAllowedCachedLeft(EvaluatorConstraint.java:67)
> at org.drools.core.common.DoubleBetaConstraints.isAllowedCachedLeft(DoubleBetaConstraints.java:108)
> at org.drools.reteoo.nodes.ReteJoinNode.propagateFromLeft(ReteJoinNode.java:147)
> at org.drools.reteoo.nodes.ReteJoinNode.assertLeftTuple(ReteJoinNode.java:99)
> at org.drools.core.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:213)
> at org.drools.core.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:73)
> at org.drools.reteoo.nodes.ReteJoinNode.propagateFromRight(ReteJoinNode.java:135)
> at org.drools.reteoo.nodes.ReteJoinNode.assertRightTuple(ReteJoinNode.java:125)
> at org.drools.reteoo.nodes.ReteBetaNodeUtils.assertObject(ReteBetaNodeUtils.java:47)
> at org.drools.reteoo.nodes.ReteJoinNode.assertObject(ReteJoinNode.java:39)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:387)
> at org.drools.core.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:430)
> at org.drools.core.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:266)
> at org.drools.core.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:592)
> at org.drools.core.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1223)
> ... 12 more
> What I discovered is that this only happens when I save the KieSession to a file in one JVM and reload it in another. When I load the KieSession in the same JVM as the one in which I persisted it, there is no exception and the rule get's fired (as expected).
> I created a reproducer project for it: https://github.com/DuncanDoyle/DroolsSessionPersistenceNPE/
> I've added some Maven profiles so you can easily observe the behaviour:
> - mvn -PallRuns exec:java : this runs both the persistence and the reload in the same JVM, no exception, everything works fine.
> - mvn -PfirstRun exec:java : this runs the first part of the test, and saves the KieSession to a file.
> - mvn -PsecondRun exec:java : this runs the second part of the test, which loads the previously saved KieSession from the file and inserts a new fact, resulting in the NPE.
> All three tests can also be run in ReteOO mode by adding "-Ddrools.ruleEngine=reteoo" at the end of the command.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months
[JBoss JIRA] (DROOLS-275) RuleEngine AfterEvaluator.evaluateCachedRight throws NPE on persisted Session reload (Phreak, Stream, PseudoClock)
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/DROOLS-275?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on DROOLS-275:
------------------------------------------------
Richard Bourner <rbourner(a)redhat.com> made a comment on [bug 1013197|https://bugzilla.redhat.com/show_bug.cgi?id=1013197]
Description of problem:
Information on community issue : https://issues.jboss.org/browse/DROOLS-275
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
> RuleEngine AfterEvaluator.evaluateCachedRight throws NPE on persisted Session reload (Phreak, Stream, PseudoClock)
> ------------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-275
> URL: https://issues.jboss.org/browse/DROOLS-275
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.CR3
> Environment: Mac OS-X 10.8.5, Hotspot 1.7.0_40
> Reporter: Duncan Doyle
> Assignee: Mark Proctor
>
> I persist a KieSession via the Marshaller (serializable) with one fact/event inserted. On reload of the session, I can see that fact is still there (when I check the FactHandles) and the PseudoClock is at the correct time (the time when I persisted it). If I then insert another fact/event into this reloaded session which matches the following rule:
> rule "SimpleFactTimeWindow"
> when
> $s1: SimpleFact() from entry-point LinkyStream
> $s2: SimpleFact(this != $s1, this after [0s, 10s] $s1) from entry-point LinkyStream
> then
> System.out.println("Rule fired, found 2 Facts within the time window.");
> end
> I get a NPE (in both Phreak and ReteOO mode). Exception in Phreak:
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
> at java.lang.Thread.run(Thread.java:724)
> Caused by: java.lang.NullPointerException
> at org.drools.core.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedRight(AfterEvaluatorDefinition.java:304)
> at org.drools.core.rule.constraint.EvaluatorConstraint.isAllowedCachedRight(EvaluatorConstraint.java:80)
> at org.drools.core.common.DoubleBetaConstraints.isAllowedCachedRight(DoubleBetaConstraints.java:117)
> at org.drools.core.phreak.PhreakJoinNode.doRightInserts(PhreakJoinNode.java:150)
> at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:56)
> at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:547)
> at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:533)
> at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:335)
> at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:162)
> at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:117)
> at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:194)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:65)
> at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:936)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1183)
> at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:936)
> at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:910)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:233)
> at org.jboss.ddoyle.brms.cep.ha.management.TestScenarioRunner.secondRun(TestScenarioRunner.java:142)
> at org.jboss.ddoyle.brms.cep.ha.management.MainSecondRun.main(MainSecondRun.java:7)
> ... 6 more
> Exception in ReteOO:
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
> at java.lang.Thread.run(Thread.java:724)
> Caused by: org.drools.core.RuntimeDroolsException: Unexpected exception executing action org.drools.core.reteoo.PropagationQueuingNode$PropagateAction@2e3aeda
> at org.drools.core.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1225)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:371)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:278)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:131)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:56)
> at org.jboss.ddoyle.brms.cep.ha.management.TestScenarioRunner.secondRun(TestScenarioRunner.java:140)
> at org.jboss.ddoyle.brms.cep.ha.management.MainSecondRun.main(MainSecondRun.java:7)
> ... 6 more
> Caused by: java.lang.NullPointerException
> at org.drools.core.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluateCachedLeft(AfterEvaluatorDefinition.java:324)
> at org.drools.core.rule.constraint.EvaluatorConstraint.isAllowedCachedLeft(EvaluatorConstraint.java:67)
> at org.drools.core.common.DoubleBetaConstraints.isAllowedCachedLeft(DoubleBetaConstraints.java:108)
> at org.drools.reteoo.nodes.ReteJoinNode.propagateFromLeft(ReteJoinNode.java:147)
> at org.drools.reteoo.nodes.ReteJoinNode.assertLeftTuple(ReteJoinNode.java:99)
> at org.drools.core.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:213)
> at org.drools.core.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:73)
> at org.drools.reteoo.nodes.ReteJoinNode.propagateFromRight(ReteJoinNode.java:135)
> at org.drools.reteoo.nodes.ReteJoinNode.assertRightTuple(ReteJoinNode.java:125)
> at org.drools.reteoo.nodes.ReteBetaNodeUtils.assertObject(ReteBetaNodeUtils.java:47)
> at org.drools.reteoo.nodes.ReteJoinNode.assertObject(ReteJoinNode.java:39)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:502)
> at org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:387)
> at org.drools.core.reteoo.PropagationQueuingNode$AssertAction.execute(PropagationQueuingNode.java:430)
> at org.drools.core.reteoo.PropagationQueuingNode.propagateActions(PropagationQueuingNode.java:266)
> at org.drools.core.reteoo.PropagationQueuingNode$PropagateAction.execute(PropagationQueuingNode.java:592)
> at org.drools.core.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1223)
> ... 12 more
> What I discovered is that this only happens when I save the KieSession to a file in one JVM and reload it in another. When I load the KieSession in the same JVM as the one in which I persisted it, there is no exception and the rule get's fired (as expected).
> I created a reproducer project for it: https://github.com/DuncanDoyle/DroolsSessionPersistenceNPE/
> I've added some Maven profiles so you can easily observe the behaviour:
> - mvn -PallRuns exec:java : this runs both the persistence and the reload in the same JVM, no exception, everything works fine.
> - mvn -PfirstRun exec:java : this runs the first part of the test, and saves the KieSession to a file.
> - mvn -PsecondRun exec:java : this runs the second part of the test, which loads the previously saved KieSession from the file and inserts a new fact, resulting in the NPE.
> All three tests can also be run in ReteOO mode by adding "-Ddrools.ruleEngine=reteoo" at the end of the command.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 6 months