commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dion Gillard <dion.gill...@gmail.com>
Subject [jelly] Re: executing dynamically created scripts
Date Thu, 06 Jan 2005 05:57:26 GMT
This is a bug in Jelly. Could you please raise a bug in the issue
tracking system for Jelly:
http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10012

so that we can fix and track it.

Thanks

On Wed, 5 Jan 2005 21:53:32 -0800 (PST), Jeff Gregory
<hokiejeffg@yahoo.com> wrote:
> Hello,
> 
> I'm implementing a message bus and some adapters.
> We're using XML as the message transport device and
> XSLT to transform the messages into Jelly scripts. The
> jelly script contains SQL commands that update our
> database with the contents of the message. So the
> jelly script is not from a file or URL, it's the
> output of a XSLT transformation and so a string
> buffer. Whenever I run the script, I get an exception
> complaining about the JellyContextURL being null. So
> can I execute jelly scripts that are not persisted
> somewhere? What do I put in for the URL? Below is my
> code and stack trace. I've successfully executed the
> contents of the message consumed here by copying it to
> a file and running the command line version of jelly,
> so the jelly script itself doesn't appear to be the
> problem. Thanks for any help.
> 
>         public StringBuffer filter(StringBuffer message)
> throws FilterException {
> 
>             OutputStream output = new
> ByteArrayOutputStream();
>             try {
>             XMLOutput xmlOutput =
> XMLOutput.createXMLOutput(output);
>             InputSource script = new InputSource( new
> StringReader(message.toString()) );
>             context = new JellyContext();
>             context.runScript( script, xmlOutput);
>             xmlOutput.flush();
>         } catch (Exception e) {
>             throw new FilterException(e);
>         }
> 
>                 return new StringBuffer(output.toString());
>         }
> 
> java.lang.NullPointerException
> at
> org.apache.commons.jelly.JellyContext.getJellyContextURL(JellyContext.java:947)
>         at
> org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:670)
>         at
> org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:588)
>         at
> eai.routing.filters.JellyFilter.filter(JellyFilter.java)
>         at
> eai.routing.MessagePipe.process(MessagePipe.java:69)
>         at
> eai.services.MessageListenerBean.onMessage(MessageListenerBean.java:57)
>         at
> com.ibm.ejs.jms.listener.MDBWrapper$PriviledgedOnMessage.run(MDBWrapper.java:316)
>         at
> com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
>         at
> com.ibm.ejs.jms.listener.MDBWrapper.callOnMessage(MDBWrapper.java:285)
> at
> com.ibm.ejs.jms.listener.MDBWrapper.onMessage(MDBWrapper.java:263)
> at com.ibm.mq.jms.MQSession.run(MQSession.java:1650)
> at
> com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:960)
>         at
> com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:813)
>         at
> com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:614)
>         at
> com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:581)
>         at
> sun.reflect.GeneratedMethodAccessor70.invoke(Unknown
> Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62)
>         at java.lang.reflect.Method.invoke(Method.java:391)
>         at
> com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:37)
>         at
> com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:91)
>         at
> com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127)
>         at
> com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:456)
>         at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332).run(ThreadPool.java:1332)
> 
> __________________________________
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
> http://mobile.yahoo.com/maildemo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


-- 
http://www.multitask.com.au/people/dion/

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


Mime
View raw message