Hi Dan,

we were also experiencing a problem with StaxUtils in 2.7.7-SNAPSHOT in OSGi. In our case the StaxUtils class was not found from WsdlManagerImpl I think.

So I think at least in our case the problem is that the wrong classloader is used to load extensions. I think the classloader of the bundle implementing the extension should be used. I think I saw this problem on CXF 3 SNAPSHOT some time before.

Not sure if this is the same problem that Osvaldo reported.

Christian

On 28.08.2013 23:34, Daniel Kulp wrote:
On Aug 28, 2013, at 5:26 PM, Osvaldo Pina <[email protected]> wrote:
   I'm having a trouble int StaxUtils static initializer  with cxf 2.7.6
running in the IBM jkd 1.6. When it tries to create the XMLOutputFactory
(XMLOutputFactory xof = XMLOutputFactory.newInstance()) a
NoClassDefFoundError is thrown. The reason is that the factory property
(javax.xml.stream.XMLOutputFactory) is set
to com.ctc.wstx.stax.WstxOutputFactory and this class is not avaliable
to javax.xml.stream.XMLOutputFactory classloader (the same applies to
javax.xml.stream.XMLInputFactory).
  I'm thinking about changing the property to the IBM default value but I
would like to know if it is safe.
It's certainly not safe if your service accepts any sort of streaming XML.   
You really need to use woodstox for that case.

The question is why ISN'T it found in the class loader?  It should be using the 
context class loader which should be set properly in these  cases.  Is there a 
full stack trace so we can see if there is a context class loader or similar 
missing?

That said, I just noticed the input factories are protected via a try/catch 
that would trap this.   The output factories are not.  :-(




--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to