[
https://issues.jboss.org/browse/ISPN-1514?page=com.atlassian.jira.plugin....
]
Galder Zamarreño commented on ISPN-1514:
----------------------------------------
@Gustavo, can you open a new JIRA for this?
Although the exception is similar, I'm not sure the root cause is the same since your
patch is still there:
https://github.com/infinispan/infinispan/blob/5.1.0.CR1/core/src/main/jav...
Since you can quickly replicate it, I'd suggest you try to debug it through and see
what available() is returning this time around and what type buffer is used.
Protect against InputStream providers that do not implement
available()
-----------------------------------------------------------------------
Key: ISPN-1514
URL:
https://issues.jboss.org/browse/ISPN-1514
Project: Infinispan
Issue Type: Bug
Components: Loaders and Stores
Affects Versions: 5.0.1.FINAL, 5.1.0.BETA3
Environment: Oracle Driver version 10.2.0.5.0
Reporter: Thomas Fromm
Assignee: Galder Zamarreño
Fix For: 5.1.0.BETA5, 5.1.0.FINAL
Attachments: AbstractMarshaller.patch
Unmarshalling of value with oracle driver fails with:
2011-11-09 14:57:59,490 [ERROR] org.infinispan.loaders.jdbc.JdbcUtil - ISPN008009: I/O
error while unmarshalling from stream
java.io.EOFException: Read past end of file
at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:126)
at
org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:263)
at
org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.java:224)
at
org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1182)
at
org.infinispan.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:113)
at
org.infinispan.marshall.VersionAwareMarshaller.startObjectInput(VersionAwareMarshaller.java:156)
at
org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:112)
at
org.infinispan.marshall.AbstractMarshaller.objectFromInputStream(AbstractMarshaller.java:104)
at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:88)
at E04.main(E04.java:38)
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 com.inubit.ibis.configuration.Bootstrap.main(Bootstrap.java:66)
org.infinispan.loaders.CacheLoaderException: I/O error while unmarshalling from stream
at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:91)
at E04.main(E04.java:38)
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 com.inubit.ibis.configuration.Bootstrap.main(Bootstrap.java:66)
Caused by: java.io.EOFException: Read past end of file
at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:126)
at
org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:263)
at
org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.java:224)
at
org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1182)
at
org.infinispan.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:113)
at
org.infinispan.marshall.VersionAwareMarshaller.startObjectInput(VersionAwareMarshaller.java:156)
at
org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:112)
at
org.infinispan.marshall.AbstractMarshaller.objectFromInputStream(AbstractMarshaller.java:104)
at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:88)
... 6 more
Solution:
In AbstractMarshaller.objectFromInputStream is assumed, that the available() method from
the incoming InputStream returns the size of data.
But this is optional, so the InputStream from the oracle driver returns 0. So
implementation of objectFromInputStream must be changed to avoid usage of available().
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira