You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "dion gillard (JIRA)" <co...@jakarta.apache.org> on 2005/01/06 09:59:14 UTC

[jira] Commented: (JELLY-189) null pointer exception when executing a script that exist only in memory

     [ http://issues.apache.org/jira/browse/JELLY-189?page=comments#action_57340 ]
     
dion gillard commented on JELLY-189:
------------------------------------

Found the bug, have added your test to TestEmbedded and have a fix.

Will keep testing and hopefully get it committed today.

> 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