Bug 724213 (BRMS-156)

Summary: Deserializing a KnowledgeBase object throws a java.io.EOFException
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: nwallace <nwallace>
Component: unspecifiedAssignee: Jervis Liu <jliu>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: high    
Version: 5.0.0 GA, 5.0.1 CR1CC: mproctor
Target Milestone: ---   
Target Release: 5.0.1, 5.0.1 CR2   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/BRMS-156
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Ubuntu 8.10
Last Closed: 2009-09-18 13:12:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description nwallace 2009-07-07 13:08:17 UTC
Date of First Response: 2009-09-02 08:05:26
securitylevel_name: Public

A java.io.EOFException is thrown when reading a serialized KnowledgeBase object from a file.

java.io.EOFException
	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2281)
	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)
	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)
	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:280)
	at org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStream.java:55)
	at org.drools.common.DroolsObjectInputStream.<init>(DroolsObjectInputStream.java:49)
	at org.drools.common.AbstractRuleBase.readExternal(AbstractRuleBase.java:227)
	at org.drools.reteoo.ReteooRuleBase.readExternal(ReteooRuleBase.java:173)
	at org.drools.impl.KnowledgeBaseImpl.readExternal(KnowledgeBaseImpl.java:83)
	at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
	at com.sample.DroolsTest.read(DroolsTest.java:75)
	at com.sample.DroolsTest.testIO(DroolsTest.java:50)
	at com.sample.DroolsTest.main(DroolsTest.java:40)

Comment 1 nwallace 2009-07-07 13:10:20 UTC
Link: Added: This issue is related to JBRULES-1946


Comment 2 nwallace 2009-09-01 12:19:13 UTC
Fix in place.

Comment 3 Jaroslaw Kijanowski 2009-09-02 12:05:26 UTC
I'm reopening this since the corresponding JBRULES-1946 has also been reopened.

Comment 4 Jaroslaw Kijanowski 2009-09-18 13:12:30 UTC
This is one has a corresponding test case in 5.0.1:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/soa_branches/BRMS-5.0.1/drools-compiler/src/test/java/org/drools/integrationtests/MarshallingTest.java (testJBRULES_1946, testJBRULES_1946_2, testJBRULES_1946_3)

Comment 5 David Le Sage 2009-10-02 06:27:21 UTC
Please confirm the following for the Release Notes documentation and fill in the missing information.

Dot point explanations are fine:

The CAUSE (what was actually broken)
 *

CONSEQUENCES of the bug (how users might have encountered it)
 * Deserializing a KnowledgeBase object throws a java.io.EOFException
 * Were the DroolsObjectOutputStream and DroolsObjectInputStream working but not the  normal Java streamst?

The FIX (what was changed to eliminate this bug)
 *

RESULTS of the fix (what now happens for users)
*

Comment 6 Dana Mison 2009-10-05 05:09:10 UTC
added to the 5.0.CP01 release notes as resolved:

JBRULES-1946
Deserializing a KnowledgeBase object using a non-drools stream would throw an exception. . This has been fixed and no longer occurs.

Comment 7 Jervis Liu 2009-10-06 11:29:12 UTC
Hi Darrin and David, the release note above looks good to me. Thanks.

The CAUSE (what was actually broken)
 *

CONSEQUENCES of the bug (how users might have encountered it)
 * Deserializing a KnowledgeBase object using a non-drools stream would throw an exception.

The FIX (what was changed to eliminate this bug)
 *

RESULTS of the fix (what now happens for users)
*  This has been fixed and no longer occurs.

Comment 8 Tihomir Surdilovic 2010-03-02 17:14:48 UTC
Support Case for this issue: https://enterprise.redhat.com/issue-tracker/582313