1 Reply Latest reply on May 27, 2013 4:57 PM by Sham HC

    servletengine Unable to send back last chunk: Software caused connection abort: socket write error

    Mshajiahmed Level 4

      I have created a bundle for the class com.xxx.cq.wcm.foundation.profile.impl.TnailImages from the foundation file com.day.cq.wcm.foundation.profile.impl.ProfileImages.

      Here are the changes I made ot this class

      1. width and height for the default foundation class ProfileImages to have our own default width and height in TnailImages.

      2. selectors changed to our own like

      * @scr.property name="sling.servlet.selectors" values.0="adjust"

      *                                              values.1="adjust.small"

       

      3.   Variable changed to  private static final String THUMBNAIL = "small";

      4. Metatype annotation won't compile for CQ5.5  I changed this  * @scr.component metatype="false"

             to

           * @Component(immediate = true)

       

      This bundle compiled successfully and I see it in OSGi felix console, it is in start mode. Even then I did a restart of this bundle as well as whole CQ5.

      When I call an image using the following tag

      <img  alt="" src="/content/dam/geometrixx/portraits/scott_reynolds.jpg.adjust.small.jpg">

      there are no spases anywhere

      the servlet ThumbNailImages is not being call, I see the following error in error.log

      servletengine Unable to send back last chunk: Software caused connection abort: socket write error

      this image is not being displayed in the page, firebug displays failed to load URL

      Default img works fine

      <img  alt="" src="/content/dam/geometrixx/portraits/scott_reynolds.jpg.prof.thumbnail.jpg">

      Class com.day.cq.wcm.foundation.profile.impl.ProfileImages is available in

      /libs/foundation/src/impl/src/main/java/com/day/cq/wcm/foundation/profile/impl/ProfileImag es.java

      Here are my annotations * @Component(immediate = true) * @scr.service * @scr.property name="sling.servlet.resourceTypes" value="nt:file" * @scr.property name="sling.servlet.extensions" values.0="res" *                          values.1="jpg" *                          values.2="png" *                          values.3="gif" * @scr.property name="sling.servlet.selectors" values.0="adjust" *                                              values.1="adjust.small" */ It seems that this servlet is not being called, when I invoke http://xyz.com:4502/content/dam/geometrixx/portraits/scott_reynolds.jpg.adjust.small.jpg I am getting 404 Cannot serve request to /content/dam/geometrixx/portraits/scott_reynolds.jpg.adjust.small.jpg in org.apache.sling.servlets.get.DefaultGetServlet

      3 (2013-05-20 11:02:40) TIMER_END{2,resolveServlet(JcrNodeResource, type=dam:Asset, superType=null, path=/content/dam/geometrixx/portraits/scott_reynolds.jpg)} Using servlet com.day.cq.dam.core.impl.servlet.BinaryProviderServlet 3 (2013-05-20 11:02:40) TIMER_END{2,ServletResolution} URI=/content/dam/geometrixx/portraits/scott_reynolds.jpg.adjust.small.jpg handled by Servlet=com.day.cq.dam.core.impl.servlet.BinaryProviderServlet

      It seems that my Servlet TnailImages is not being called, it is always going to default servlet.