[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1946) Deserializing a KnowledgeBase object throws a java.io.EOFException

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Tue Jun 16 08:21:57 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBRULES-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12472312#action_12472312 ] 

Edson Tirelli commented on JBRULES-1946:
----------------------------------------

Adding additional info by the user:

==============
Hello Rick,

I confirm, that implementations - DroolsObjectOutputStream and DroolsObjectInputStream work well, but it's not applicable in my case, because I depend on external component, that is responsible for storing my data and it uses standard serialization mechanisms. Of course, I may do some workarounds that for example first serialize the stream using Drools implementation and then pass it to the external component, but I prefer to try to do it as it should be. If I don't manage to, I will think about some other ways.

Anyway, thank you for your response and advice.

Best regards,
Przemysław Różycki


> Deserializing a KnowledgeBase object throws a java.io.EOFException
> ------------------------------------------------------------------
>
>                 Key: JBRULES-1946
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-1946
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-core
>    Affects Versions:  5.0.0.M4, 5.0.0.M5
>         Environment: Ubuntu 8.10
>            Reporter: Simon Kelly
>            Assignee: Edson Tirelli
>             Fix For: 5.0.1.FINAL
>
>         Attachments: drools.test.zip, DroolsTest.java, Sample.drl, Sample1.drl, Sandbox2.java
>
>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the jboss-jira mailing list