[jboss-jira] [JBoss JIRA] (DROOLS-264) JPAKnowledgeService stops to work suddenly

Nedo Nedic (JIRA) jira-events at lists.jboss.org
Fri Sep 20 05:54:03 EDT 2013


    [ https://issues.jboss.org/browse/DROOLS-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12806028#comment-12806028 ] 

Nedo Nedic commented on DROOLS-264:
-----------------------------------

As long as I can see this is only happening with rules having timers. During activation removal JobHandle is always null:

public static void removeAgendaItem(final ScheduledAgendaItem item, final InternalAgenda agenda) {
        // item.getJobHandle() == null
    	((InternalWorkingMemory)agenda.getWorkingMemory()).getTimerService().removeJob( item.getJobHandle() );
}

I'll try to post the full test case soon.
                
> JPAKnowledgeService stops to work suddenly
> ------------------------------------------
>
>                 Key: DROOLS-264
>                 URL: https://issues.jboss.org/browse/DROOLS-264
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 5.5.0.Final
>         Environment: PostgreSQL 8.4
> Linux Ubuntu
> JBoss 5.1.0
>            Reporter: Nedo Nedic
>            Assignee: Mark Proctor
>
> From time to time, while facts are being inserted into session and persisted in database, the following exception occurs.
> The session is no more updated because SQL sentences can't be executed anymore. Sometimes, when session is restored from marshalled snapshot the same error happens.
> 2013-09-17 11:17:03,959 ERROR [org.drools.persistence.jpa.JpaTimerJobInstance] Unable to execute timer job!
> java.lang.RuntimeException: Unable to load session snapshot
> 	at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:96)
> 	at org.drools.persistence.SingleSessionCommandService.initKsession(SingleSessionCommandService.java:269)
> 	at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:369)
> 	at org.drools.persistence.jpa.JpaTimerJobInstance.call(JpaTimerJobInstance.java:34)
> 	at org.drools.time.impl.DefaultTimerJobInstance.call(DefaultTimerJobInstance.java:1)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
> 	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.NullPointerException
> 	at org.drools.time.impl.JDKTimerService.removeJob(JDKTimerService.java:133)
> 	at org.drools.common.Scheduler.removeAgendaItem(Scheduler.java:75)
> 	at org.drools.common.DefaultAgenda.removeScheduleItem(DefaultAgenda.java:474)
> 	at org.drools.common.DefaultAgenda.removeActivation(DefaultAgenda.java:349)
> 	at org.drools.common.DefaultAgenda.cancelActivation(DefaultAgenda.java:687)
> 	at org.drools.reteoo.RuleTerminalNode.retractLeftTuple(RuleTerminalNode.java:320)
> 	at org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:224)
> 	at org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateRetractLeftTuple(SingleLeftTupleSinkAdapter.java:98)
> 	at org.drools.reteoo.NotNode.propagateRetractLeftTuple(NotNode.java:444)
> 	at org.drools.reteoo.NotNode.assertObject(NotNode.java:142)
> 	at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:59)
> 	at org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:364)
> 	at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:235)
> 	at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:240)
> 	at org.drools.marshalling.impl.ProtobufInputMarshaller.assertHandleIntoOTN(ProtobufInputMarshaller.java:483)
> 	at org.drools.marshalling.impl.ProtobufInputMarshaller.readFactHandles(ProtobufInputMarshaller.java:459)
> 	at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:259)
> 	at org.drools.marshalling.impl.ProtobufInputMarshaller.readSession(ProtobufInputMarshaller.java:116)
> 	at org.drools.marshalling.impl.ProtobufMarshaller.unmarshall(ProtobufMarshaller.java:143)
> 	at org.drools.persistence.SessionMarshallingHelper.loadSnapshot(SessionMarshallingHelper.java:88)
> 	... 11 more

--
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


More information about the jboss-jira mailing list