3 Replies Latest reply on Apr 7, 2011 9:54 PM by Freeman(Yue) Fang

    "[xX][mM][lL]" is not allowed

    Greg Davidson Newbie

      I'm trying to create my own version of the cxf-camel-nmr example.  But I keep getting some errors.

       

      servicemix/fuse version: apache-servicemix-4.3.0-fuse-03-00

       

       

      I have the following spring configuration:

           ]

       

      My transformer class:

      public class IfbiProxyTransformer  {

       

           private static final transient Log LOG = LogFactory.getLog(IfbiProxyTransformer.class);

          private boolean verbose = true;

       

          public Object transform(Object body) {

               LOG.info("Made it to the transformer bean with this content: "+body.getClass().getName());

                

               final String fromNmr = (String)body;

                

              return new StringSource(fromNmr);

          }

       

      I get the following error:

      org.apache.servicemix.nmr.api.ServiceMixException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

           at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:151)[272:org.apache.servicemix.cxf.transport.nmr:4.3.0.fuse-03-00]

           at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)[84:org.apache.servicemix.nmr.core:1.3.0.fuse-02-00]

           at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)[84:org.apache.servicemix.nmr.core:1.3.0.fuse-02-00]

           at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)[84:org.apache.servicemix.nmr.core:1.3.0.fuse-02-00]

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]

           at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]

      Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:757)[:]

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)[:]

           at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:51)[272:org.apache.servicemix.cxf.transport.nmr:4.3.0.fuse-03-00]

           at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:127)[272:org.apache.servicemix.cxf.transport.nmr:4.3.0.fuse-03-00]

           ... 6 more

      Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)[:]

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:647)[:]

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:745)[:]

           ... 9 more

       

       

      If I remove the following configuration:

       

       

       

      I get this error, any help greatly appreciated.  Thanks!!

      org.apache.servicemix.nmr.api.ServiceMixException: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Source object passed to '''' has no contents.      at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:151)[272:org.apache.servicemix.cxf.transport.nmr:4.3.0.fuse-03-00]      at org.apache.servicemix.nmr.core.InternalEndpointWrapper.process(InternalEndpointWrapper.java:86)[84:org.apache.servicemix.nmr.core:1.3.0.fuse-02-00]      at org.apache.servicemix.nmr.core.ChannelImpl.process(ChannelImpl.java:255)[84:org.apache.servicemix.nmr.core:1.3.0.fuse-02-00]      at org.apache.servicemix.nmr.core.ChannelImpl$1.run(ChannelImpl.java:215)[84:org.apache.servicemix.nmr.core:1.3.0.fuse-02-00]      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]      at java.lang.Thread.run(Thread.java:619)[:1.6.0_21] Caused by: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Source object passed to '''' has no contents.

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:757)[:]

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)[:]

           at org.apache.servicemix.cxf.transport.nmr.NMRMessageHelper.convertMessageToInputStream(NMRMessageHelper.java:51)[272:org.apache.servicemix.cxf.transport.nmr:4.3.0.fuse-03-00]

           at org.apache.servicemix.cxf.transport.nmr.NMRDestination.process(NMRDestination.java:127)[272:org.apache.servicemix.cxf.transport.nmr:4.3.0.fuse-03-00]

           ... 6 more

      Caused by: javax.xml.transform.TransformerException: Source object passed to '''' has no contents.

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:705)[:]

           at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:745)[:]

           ... 9 more