On Thu, Jul 31, 2014 at 8:13 PM, Deme Carv <demec...@gmail.com> wrote:

> I am getting the error from subject when running the below code in
> Websphere in my RAD. It is very interesting that this code doesn't cause
> any error in Server. The server runs up Tomcat 6 but I must set the same
> code to run in Websphere. I have searched for hours in web but I didn't
> find nothing that I could at least give a try. I attached a pdf with the
> libs that I found in each place. I guess that it might exist some conflict
> but I have no idea why it is working in Tomcat but it is not working in
> Websphere.
>
> Error message in browser:
>
> Error 500:
> org/apache/xml/utils/TreeWalker.<init>(Lorg/xml/sax/ContentHandler;Lorg/apache/xpath/DOMHelperV
>
> Error message in RAD console:
> java.lang.NoSuchMethodError:
> org/apache/xml/utils/TreeWalker.<init>(Lorg/xml/sax/ContentHandler;Lorg/apache/xpath/DOMHelperV
>

NoSuchMethodErrors often occur when you have the wrong version of a library
on your class path.  This happens because your code is looking for one
version, that has method X while the library you've included has a
different version without method X.

I don't know a lot about WebSphere, but I do recall that it ships with an
older set of libraries and that it prefers those libraries (it calls this
parent first) over ones in the application (it calls this parent last).
 I've seen cases where switching to "parent last" mode has resolved similar
issues.

If that doesn't help, I second André's suggestion to look for help in a
more appropriate forum.

Dan


>
> at org.apache.xalan.serialize.SerializerToXML.seriali
> ze(SerializerToXML.java:2578)
>
> org.apache.xalan.serialize.SerializerToXML serializertoxml = new
> org.apache.xalan.serialize.SerializerToXML();
>
> My code snippet:
> java.io.FileWriter filewriter = new java.io.FileWriter(file);
>
> serializertoxml.setWriter(filewriter);
>
> serializertoxml.serialize(node); // the error happens here
>
> serializertoxml.flushWriter();
>
> filewriter.write("\n");
>
> filewriter.close();
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

Reply via email to