camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpcook <jonathan.c...@erars.plus.com>
Subject Possible bug in xsltbuilder?
Date Thu, 18 Oct 2007 12:41:35 GMT

I am getting the following error when trying to perform a xslt
transformation:

java.lang.IllegalArgumentException: The value of param JMSXGroupID must be a
valid Java Object
	at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.setParameter(TransformerImpl.java:1074)
	at
org.apache.camel.builder.xml.XsltBuilder.addParameters(XsltBuilder.java:233)
	at
org.apache.camel.builder.xml.XsltBuilder.configureTransformer(XsltBuilder.java:222)
	at org.apache.camel.builder.xml.XsltBuilder.process(XsltBuilder.java:73)
	at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:157)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)
	at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:56)

On further inspection of the xsltbuilder.java class. 

The error is in the addParameters() method, which is just a plain Map copy
method.

On further inspection of the setParameter method:
public void setParameter(String name, Object value) {
      
        if (value == null) {
            ErrorMsg err = new
ErrorMsg(ErrorMsg.JAXP_INVALID_SET_PARAM_VALUE, name);
            throw new IllegalArgumentException(err.toString());
        }

Maybe the entry.getValue() is null for JSMXGroupId? What I don't understand
is why you have to set JSMXGroupId? 

Maybe that addParameters() method needs a null check for every value before
copying?

This is the code in my route.
URL styleSheet = getClass().getResource("rugby_fixtures.xslt");		
from("activemq:ss.service.solrenderservice").process(XsltBuilder.xslt(styleSheet)).to("file://target");

Thanks for your help
Jonathan



-- 
View this message in context: http://www.nabble.com/Possible-bug-in-xsltbuilder--tf4646251s22882.html#a13272220
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message