0 Replies Latest reply on Oct 2, 2009 4:52 AM by Sebastian Hundt

    Help: Exception rendering image?

    Sebastian Hundt Newbie

      Hello there,

      we face an exception thrown sometimes in our application.
      we were not able to reconstruct it.

      maybe someone can give us a hint.

      Caused by: java.lang.NullPointerException: null
       java.lang.String.compareTo(String.java:1167)
       java.lang.String.compareTo(String.java:92)
       java.util.Arrays.mergeSort(Arrays.java:1144)
       java.util.Arrays.sort(Arrays.java:1079)
       com.sun.faces.renderkit.RenderKitUtils.renderPassThruAttributesOptimized(RenderKitUtils.java:529)
       com.sun.faces.renderkit.RenderKitUtils.renderPassThruAttributes(RenderKitUtils.java:365)
       com.sun.faces.renderkit.html_basic.ImageRenderer.encodeEnd(ImageRenderer.java:106)
       javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
       org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:281)
       org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
       org.ajax4jsf.renderkit.AjaxCommandRendererBase.encodeChildren(AjaxCommandRendererBase.java:95)
       javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
       javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
      


      It seems to be a problem rendering an image component. In the RenderKitUtils there's something happening like:
      private static void renderPassThruAttributesOptimized(ResponseWriter writer,
       UIComponent component,
       String[] knownAttributes,
       List<String> setAttributes)
       throws IOException {
      
       String[] attributes = setAttributes.toArray(new String[setAttributes.size()]);
       Arrays.sort(attributes);
       ...
      


      What preconditions have to be met to cause this exception?