camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arjanm <nab...@ajmoraal.fastmail.net>
Subject Re: Possible bug in xsltbuilder?
Date Fri, 19 Oct 2007 11:04:29 GMT


jpcook wrote:
> 
> 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)
> 
> Maybe that addParameters() method needs a null check for every value
> before copying?
> 

Adding a null check seems to solve this problem indeed. I had problems with
the JMSType parameter being null.

    protected void addParameters(Transformer transformer, Map<String,
Object> map) {
        Set<Map.Entry<String, Object>> propertyEntries = map.entrySet();
        for (Map.Entry<String, Object> entry : propertyEntries) {
            if (entry.getValue() != null) {
                transformer.setParameter(entry.getKey(), entry.getValue());
            }
        }
    }

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


Mime
View raw message