vendredi 9 janvier 2015

Large Json data problems - Jersey gizzly REST API


Vote count:

0




I created a rest api with jersey ( 2.4.1 ) and Grizzly ( 2.3).


All 'running perfectly except when I try to send from the server object (or list of objects) large.


To give you an idea, if I send 10 paragraphs of Bacon Ipsum works fine, but if sending 15 no.


The problem is that I get this exception and send an empty object with a 200 OK .


Here is the stacktrace .


ene 09, 2015 7:50:13 PM org.glassfish.jersey.server.ServerRuntime$Responder writeResponse GRAVE: An I/O error has occurred while writing a response message entity to the container output stream. java.lang.NoSuchMethodError: org.glassfish.grizzly.memory.CompositeBuffer.append(Ljava/lang/Object;)Ljava/lang/Object; at org.glassfish.grizzly.http.io.OutputBuffer.finishCurrentBuffer(OutputBuffer.java:1036) at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:669) at org.glassfish.grizzly.http.server.NIOOutputStreamImpl.write(NIOOutputStreamImpl.java:83) at org.glassfish.jersey.message.internal.CommittingOutputStream.write(CommittingOutputStream.java:233) at org.codehaus.jackson.impl.Utf8Generator._flushBuffer(Utf8Generator.java:1754) at org.codehaus.jackson.impl.Utf8Generator.flush(Utf8Generator.java:1088) at org.codehaus.jackson.map.ObjectWriter.writeValue(ObjectWriter.java:328) at org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:557) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:243) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:230) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:149) at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:103) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:149) at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:88) at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:149) at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1139) at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:557) at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:381) at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:371) at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:262) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:983) at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:334) at org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:209) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545) at java.lang.Thread.run(Thread.java:745)


If I send the object from client to server receives this smoothly and correctly inserted into db.


Thanks for the help!



asked 34 secs ago







Large Json data problems - Jersey gizzly REST API

Aucun commentaire:

Enregistrer un commentaire