commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Gregory (JIRA)" <commons-...@jakarta.apache.org>
Subject [jira] Created: (JELLY-189) null pointer exception when executing a script that exist only in memory
Date Thu, 06 Jan 2005 08:04:12 GMT
null pointer exception when executing a script that exist only in memory
------------------------------------------------------------------------

         Key: JELLY-189
         URL: http://issues.apache.org/jira/browse/JELLY-189
     Project: jelly
        Type: Bug
  Components: core / taglib.core  
    Versions: 1.0    
 Environment: ibm websphere
    Reporter: Jeff Gregory


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();
     }
 }



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message