accessing suspended exchanges

2014-12-18 Thread Mark Ford
I'm using the BacklogDebugger but don't see an easy way to access the
suspended exchanges. The map is private and the SuspendedExchange class
itself is also private. While at the breakpoint, I'd like the user to be
able to inspect the Exchange.

It would help if there were simple getters for this value. I'm not using
JMX in this case so I'm not concerned about having to make the Message and
its content accessible via JMX.


Re: accessing suspended exchanges

2014-12-18 Thread Mark Ford
I saw that option but it's better suited for JMX. In my case, everything is
resident locally so dumping to XML and having to provide a string adapter
for the payload seems like a lot to do. Also consider that I need to parse
everything back from XML to see what the message is.

Would you be open to a patch that made made the suspended exchanges easily
accessible through the debugger? For now, I'll add this as a custom
interceptor in my code.

On Thu, Dec 18, 2014 at 12:00 PM, Claus Ibsen claus.ib...@gmail.com wrote:

 You can use dumpTracedMessagesAsXml to get the message content in xml.

 On Thu, Dec 18, 2014 at 5:26 PM, Mark Ford m...@massfords.com wrote:
  I'm using the BacklogDebugger but don't see an easy way to access the
  suspended exchanges. The map is private and the SuspendedExchange class
  itself is also private. While at the breakpoint, I'd like the user to be
  able to inspect the Exchange.
 
  It would help if there were simple getters for this value. I'm not using
  JMX in this case so I'm not concerned about having to make the Message
 and
  its content accessible via JMX.



 --
 Claus Ibsen
 -
 Red Hat, Inc.
 Email: cib...@redhat.com
 Twitter: davsclaus
 Blog: http://davsclaus.com
 Author of Camel in Action: http://www.manning.com/ibsen
 hawtio: http://hawt.io/
 fabric8: http://fabric8.io/



Re: XML parse error

2011-01-07 Thread Mark Ford
Another option is to tweak the classloader setting for your service unit:

http://servicemix.apache.org/classloaders.html

You can enable self-first delegation and then hide the xalan packages
so they don't load. This will allow you to use the version of saxon
for the camel component and any other XSLT transformations you're
doing.

On Fri, Jan 7, 2011 at 8:45 AM, Willem Jiang willem.ji...@gmail.com wrote:
 please use transformerFactoryClass option for xslt component like this
 from(xxx)

 .to(xslt:com/acme/mytransform.xsl?transformerFactoryClass=net.sf.saxon.TransformerFactoryImpl)
   ...

 Willem

 On 1/7/11 8:17 PM, Kovacs Zsolt wrote:

 Still there is a problem. If I remove xalan from servicemix/lib
 directory other older service assemblies (SA) are failing.
 java.lang.NullPointerException
         at
 net.sf.saxon.event.ReceivingContentHandler.getNameCode(ReceivingContentHandler.java:391)
         at
 net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:314)
         at
 org.apache.servicemix.soap.util.stax.StaxSource.parse(StaxSource.java:115)
 I don't know the cause of this exceptions.

 Seems that I need xalan as processor for other legacy SA.

 If I'm packaging saxon with my camel service unit (including in maven
 pom.xml as dependency), and xalan is
 located in lib directory then servicemix still is using xalan as
 processor.

 It's possible to tell servicemix that I want to use saxon as XSLT
 processor if it's packaged into SA and xalan
 (from lib directory) otherwise?

 Thanks,
 On Fri, Jan 7, 2011 at 12:16 PM, Kovacs Zsoltzsolt.m.kov...@gmail.com
  wrote:

 OK, I removed xalan from servicemix/lib and copied saxon there (to
 servicemix/lib), and it's working fine
 so I can used XSLT 2.0 functions (current-dateTime() in my case).

 Thanks!!!

 On Fri, Jan 7, 2011 at 10:49 AM, Willem Jiangwillem.ji...@gmail.com
  wrote:

 Camel just create the transform template with below code.

 return (TransformerFactory) FactoryFinder.find(
            /* The default property name according to the JAXP spec */
            javax.xml.transform.TransformerFactory,
            /* The fallback implementation class name, XSLTC */

 com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl);

 And the service lib class can be find from the su.

 Can you try to remove the xalan-2.7.0.jar from the lib, or you need to
 regenerate a new servicemix-camel component[1] which includes the saxon.


 [1]http://camel.apache.org/how-to-use-extra-camel-componets-in-servicemix-camel.html

 On 1/7/11 4:08 PM, Kovacs Zsolt wrote:

 Hi,
   I'm using servicemix 3.3 with camel 2.2. I included in maven pom.xml
 the saxon 9.1.0.8 dependencies. The
  camel service unit now contains the lib\saxon-9.1.0.8.jar.

 But I get the same error message during deployment.

  But I have in servicemix/lib the xalan-2.7.0.jar which seems to be a
 XSLT 1.0 processor. Could be happen that
  servicemix is using xalan instead of saxon currently included in
 camel service unit???

 Thanks,


 On Thu, Jan 6, 2011 at 9:25 PM, Mark Fordm...@massfords.com    wrote:

 Are you using XSLT 2.0? If so, you should verify that you have an XSLT
 2.0 capable library in your classpath. Perhaps when you're using the
 endpoint within JBI there is a 2.0 capable API in the classpath.

 If you're using Maven, then add the following:

      dependency
        groupIdnet.sourceforge.saxon/groupId
        artifactIdsaxon/artifactId
        version9.1.0.8/version
      /dependency
      dependency
        groupIdnet.sourceforge.saxon/groupId
        artifactIdsaxon/artifactId
        version9.1.0.8/version
        classifierdom/classifier
      /dependency

 If not, then download a recent version of saxon and try it.


 On Thu, Jan 6, 2011 at 7:39 AM, Kovacs Zsoltzsolt.m.kov...@gmail.com
  wrote:

 Hi,

  I have a camel endpoint .to(xslt:xslt/transformer.xsl) and in the
 transformer.xml file I try to use
  xsl:variable name=now select=current-dateTime()/
  but deployment failed  and get the Error creating XSLT template.
 This is most likely be caused by a XML parse error. Please verify
 your
 XSLT file configured.
  message.

  I guess the problem is probably caused by the parser used by Camel
 because when I using as jbi endpoint there are no issues.
  Can I change the Camel XML parser ?

 Thanks,
 Zsolt





 --
 Willem
 --
 FuseSource
 Web: http://www.fusesource.com
 Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
 Twitter: willemjiang





 --
 Willem
 --
 FuseSource
 Web: http://www.fusesource.com
 Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
 Twitter: willemjiang



Re: XML parse error

2011-01-06 Thread Mark Ford
Are you using XSLT 2.0? If so, you should verify that you have an XSLT
2.0 capable library in your classpath. Perhaps when you're using the
endpoint within JBI there is a 2.0 capable API in the classpath.

If you're using Maven, then add the following:

  dependency
groupIdnet.sourceforge.saxon/groupId
artifactIdsaxon/artifactId
version9.1.0.8/version
  /dependency
  dependency
groupIdnet.sourceforge.saxon/groupId
artifactIdsaxon/artifactId
version9.1.0.8/version
classifierdom/classifier
  /dependency

If not, then download a recent version of saxon and try it.


On Thu, Jan 6, 2011 at 7:39 AM, Kovacs Zsolt zsolt.m.kov...@gmail.com wrote:
 Hi,

  I have a camel endpoint .to(xslt:xslt/transformer.xsl) and in the
 transformer.xml file I try to use
  xsl:variable name=now select=current-dateTime()/
  but deployment failed  and get the Error creating XSLT template.
 This is most likely be caused by a XML parse error. Please verify your
 XSLT file configured.
  message.

  I guess the problem is probably caused by the parser used by Camel
 because when I using as jbi endpoint there are no issues.
  Can I change the Camel XML parser ?

 Thanks,
 Zsolt