camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Possible bug in xsltbuilder?
Date Fri, 19 Oct 2007 11:17:36 GMT
On 19/10/2007, arjanm <nabble@ajmoraal.fastmail.net> wrote:
> 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());
>             }
>         }
>     }

Great stuff - patch applied to trunk with thanks!


-- 
James
-------
http://macstrac.blogspot.com/

Open Source SOA
http://open.iona.com

Mime
View raw message