Skip to main content
rubenf42159101
Level 2
Aug 2, 2018 3:23 PM UTC
Solved

org.eclipse.jetty.io.EofException in AEM 6.3

Hi,

I'm trying to call a servlet using GET to download an asset from DAM in AEM 6.3.2.0. Asset gets download with file size as zero and I get below exception in the log

org.apache.sling.engine.impl.helper.ClientAbortException: org.eclipse.jetty.io.EofException

at org.apache.sling.engine.impl.log.RequestLoggerResponse$LoggerResponseOutputStream.write(RequestLoggerResponse.java:401)

at com.sample.servlet.DownloadAssetServlet.doGet(DownloadAssetServlet.java:87)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:270)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)

at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:378)

at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)

at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)

..........................................................................

..........................................................................

at org.eclipse.jetty.server.Server.handle(Server.java:499)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

at java.lang.Thread.run(Thread.java:748)

Caused by: org.eclipse.jetty.io.EofException: null

at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:192)

at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:408)

at org.eclipse.jetty.io.WriteFlusher.completeWrite(WriteFlusher.java:364)

at org.eclipse.jetty.io.SelectChannelEndPoint.onSelected(SelectChannelEndPoint.java:111)

at org.eclipse.jetty.io.SelectorManager$ManagedSelector.processKey(SelectorManager.java:641)

at org.eclipse.jetty.io.SelectorManager$ManagedSelector.select(SelectorManager.java:612)

at org.eclipse.jetty.io.SelectorManager$ManagedSelector.run(SelectorManager.java:550)

at org.eclipse.jetty.util.thread.NonBlockingThread.run(NonBlockingThread.java:52)

... 3 common frames omitted

Caused by: java.io.IOException: Broken pipe

at sun.nio.ch.FileDispatcherImpl.write0(Native Method)

at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)

at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)

at sun.nio.ch.IOUtil.write(IOUtil.java:65)

at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)

at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:170)

... 10 common frames omitted

Is this an issue in AEM 6.3?

Regards,

Ruben Fernando

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
Community Advisor
Aug 2, 2018 9:37 PM UTC

Hi Ruben,

Your code is fine, works for me.

aem63app-repo/DownloadAssetsImage.java at master · arunpatidar02/aem63app-repo · GitHub

Problem is somewhere else, you should check the other endpoint.

Arun Patidar

12 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
Aug 2, 2018 9:37 PM UTC

Hi Ruben,

Your code is fine, works for me.

aem63app-repo/DownloadAssetsImage.java at master · arunpatidar02/aem63app-repo · GitHub

Problem is somewhere else, you should check the other endpoint.

Translate
Arun Patidar
smacdonald2008
Level 10
Aug 3, 2018 6:23 PM UTC

Here is link to the AEM 6.4 version of this artilce. Updated points include using Maven 13 Archetype project, using AEM 6.4 UBER JAR, and using DS Annotations - all reflect best practices for 6.4 -- Scott's Digital Community: Downloading Adobe Experience Manager 6.4 DAM Assets using the Query Builder API org.eclipse.jetty.io.EofException in AEM 6.3

Translate