Hi,

I think the stacktrace originates from an Stanbol Enhancer request. I
know this trace very well, as I have seen it several times. However in
all those cases the exceptions where caused by problems with the
client side application. Once this was caused by bad Exception
Handling on the client side causing the Apache HttpClient to re-use
still referenced connections of the ConnectionPool. An other time it
was because of wrong "Content-Length" header information causing the
server to close the stream early (e.g. if the Bytes written by
Charset1 are not the one sent by the client because he uses Charset2).
In addition such exceptions might also happen if the client simple
cancels the request before all data where sent.

This does not mean that there is no problem with Stanbol, but it is
very unlikely, as the only think that Stanbol does up to the point
where the Exception is thrown is to call 'IOUtils.toByteArray(in)' on
the InputStream prased by the JAX-RS MessageBodyReader#readFrom(..)
method.

best
Rupert


On Mon, Jan 21, 2013 at 11:52 AM, Andrea Di Menna <[email protected]> wrote:
> Hi all,
>
> I have an issue with the enhancer engine on Tomcat7.
> Trying to access a dbpedia entityhub I randomly get error 500 from a
> Stanbol instance.
>
> The tomcat7 error log reports:
>
> java.io.IOException: Stream closed
> at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:308)
> at
> org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:169)
> at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1025)
> at org.apache.commons.io.IOUtils.copy(IOUtils.java:999)
> at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:218)
> at
> org.apache.stanbol.enhancer.servicesapi.impl.StreamSource.getData(StreamSource.java:136)
> at
> org.apache.stanbol.enhancer.contentitem.inmemory.InMemoryContentItemFactory.createBlob(InMemoryContentItemFactory.java:80)
> at
> org.apache.stanbol.enhancer.servicesapi.impl.AbstractContentItemFactory.createContentItem(AbstractContentItemFactory.java:121)
> at
> org.apache.stanbol.enhancer.servicesapi.impl.AbstractContentItemFactory.createContentItem(AbstractContentItemFactory.java:90)
> at
> org.apache.stanbol.enhancer.jersey.reader.ContentItemReader.readFrom(ContentItemReader.java:261)
> at
> org.apache.stanbol.enhancer.jersey.reader.ContentItemReader.readFrom(ContentItemReader.java:69)
> at
> com.sun.jersey.spi.container.ContainerRequest.getEntity(ContainerRequest.java:474)
>
> It looks like the InputStream gets closed when Stanbol is trying to create
> the ContentItem from the request.
> The input text is a very short string.
>
> My feeling is that the request's InputStream is closed when the
> ContentItemFactory is reading it.
>
> Any suggestion?
>
> Regards
> Andrea



-- 
| Rupert Westenthaler             [email protected]
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

Reply via email to