Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-189

null pointer exception when executing a script that exist only in memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.0
    • core / taglib.core
    • None
    • ibm websphere

    Description

      When executing a script that exist only in memory, Jelly throws a NullPointerException at org.apache.commons.jelly.JellyContext.getJellyContextURL(JellyContext.java:947)

      This code will fail even if the StringBuffer passed in is a valid jelly script.

      public void exectute(StringBuffer message) {
      OutputStream output = new ByteArrayOutputStream();
      try

      { XMLOutput xmlOutput =XMLOutput.createXMLOutput(output); InputSource script = new InputSource( new StringReader(message.toString()) ); JellyContext context = new JellyContext(); context.runScript( script, xmlOutput); xmlOutput.flush(); }

      catch (Exception e)

      { e.printStackTrace(); }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeffg Jeff Gregory
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: