Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Error using Xalan and Xerces

92 views
Skip to first unread message

Davide Mora

unread,
Feb 13, 2001, 1:18:59 PM2/13/01
to

Hi,

it's the first time i use WebSphere (3.5.2), i'm trying to run my servlet
that use Xerces and Xalan (a different version from the one i found in the
Websphere directory.
What i can get from the error it's there is a conflict, seems like the
classloader "enpty" as the other servlet engine i used until now (work ok
with Tomcat, Netscape, ServletExec,...). It's really so? Somebody had
(and/or solved) this problem?

============================================

Error 500
An error has occured while processing request:http://localhost/TPN
Message: Server caught unhandled exception from servlet [TestParserSrvNew]:
org.apache.xerces.dom.NodeImpl: method
(Lorg/apache/xerces/dom/DocumentImpl;Ljava/lang/String;Ljava/lang/String;)V
not found

Target Servlet: TestParserSrvNew
StackTrace:
----------------------------------------------------------------------------
----
Root Error-1: org.apache.xerces.dom.NodeImpl: method
(Lorg/apache/xerces/dom/DocumentImpl;Ljava/lang/String;Ljava/lang/String;)V
not found

java.lang.NoSuchMethodError: org.apache.xerces.dom.NodeImpl: method
<init>(Lorg/apache/xerces/dom/DocumentImpl;Ljava/lang/String;Ljava/lang/Stri
ng;)V not found
at org.apache.xerces.dom.NodeContainer.<init>(NodeContainer.java:160)
at org.apache.xerces.dom.DocumentImpl.<init>(DocumentImpl.java:157)
at org.apache.xerces.dom.DocumentImpl.<init>(DocumentImpl.java:152)
at
org.apache.xalan.xpath.xdom.XercesLiaison.createDocument(XercesLiaison.java:
299)
at
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault.getDOMFactory(XMLParserLi
aisonDefault.java:1423)
at
org.apache.xalan.xslt.XSLTEngineImpl.getDOMFactory(XSLTEngineImpl.java:3233)
at
org.apache.xalan.xslt.XSLTEngineImpl.createDocFrag(XSLTEngineImpl.java:2947)
at
org.apache.xalan.xslt.XSLTEngineImpl.createResultTreeFrag(XSLTEngineImpl.jav
a:2083)
at org.apache.xalan.xslt.ElemVariable.getValue(ElemVariable.java:180)
at org.apache.xalan.xslt.ElemVariable.execute(ElemVariable.java:146)
at
org.apache.xalan.xslt.Stylesheet.pushTopLevelVariables(Stylesheet.java:976)
at
org.apache.xalan.xslt.XSLTEngineImpl.resolveTopLevelParams(XSLTEngineImpl.ja
va:3035)
at org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:429)
at org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:631)
at TestParserSrvNew.doPost(TestParserSrvNew.java:74)
at TestParserSrvNew.doGet(TestParserSrvNew.java:45)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
.java:580)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
eServlet.java:160)


Lex Sewuster

unread,
Feb 13, 2001, 4:30:38 AM2/13/01
to
> ........... i'm trying to run my servlet

> that use Xerces and Xalan (a different version from the one i found in the
> Websphere directory.
I read http://www.theserverside.com/resources/soapandejb1.jsp the other day.
The author warns you for using other versions than the ones found in the
WebSphere directory.

Lex Sewuster


Hong Yew

unread,
Feb 13, 2001, 5:15:27 AM2/13/01
to
We are using Xalan/Xerces. We had to remove the conflicting packages:

1. seek out all XML interfaces from VAJ projects (eg. org.* or sax.* stuff)
and remove them from the project. I removed
the IBM Java Parser project.

2. Bring in a project that only contains all the IBM implementation of XML,
the TX classes without all the W3C interfaces.

3. Import the Xalan/Xerces and the latest XML interfaces from W3C.


"Davide Mora" <d_m...@yahoo.com> wrote in message
news:96atbh$16sm$1...@news.software.ibm.com...

Günther Wieser

unread,
Feb 13, 2001, 9:03:09 AM2/13/01
to
You have to append the correspondig jar files as a comman line parameter
for the application server you want to use it with (e.g. the default
server). For us this works perfect, we don't have any problems. We are
working with the latest releases of Xalan and Xerces.
e.g. add this to the comman line argument in WS admin console for
default server:
-classpath d:\your_path\xerces.jar;d:\your_path\xalan.jar

Regards,

--
--------------------------------------------------------------------
Guenther WIESER (Senior Software Architect)
dotparc IT GmbH, Austria, 8010 Graz, Wielandgasse 2
mailto: gwi...@dotparc.com
T: +43 316 813392 12 F: +43 316 813392 9 M: +43 664 4605407
--------------------------------------------------------------------

Davide Mora

unread,
Feb 13, 2001, 8:20:20 PM2/13/01
to
> we are working with the latest releases of Xalan and Xerces.

> e.g. add this to the comman line argument in WS admin console for
> default server:
> -classpath d:\your_path\xerces.jar;d:\your_path\xalan.jar

This work ok.
Thank you very much!


Davor Cengija

unread,
Feb 13, 2001, 6:11:47 AM2/13/01
to
"Davide Mora" <d_m...@yahoo.com> writes:

> Hi,
>
> it's the first time i use WebSphere (3.5.2), i'm trying to run my servlet
> that use Xerces and Xalan (a different version from the one i found in the
> Websphere directory.
> What i can get from the error it's there is a conflict, seems like the
> classloader "enpty" as the other servlet engine i used until now (work ok
> with Tomcat, Netscape, ServletExec,...). It's really so? Somebody had
> (and/or solved) this problem?
>
> ============================================
>
> Error 500
> An error has occured while processing request:http://localhost/TPN
> Message: Server caught unhandled exception from servlet [TestParserSrvNew]:
> org.apache.xerces.dom.NodeImpl: method
> (Lorg/apache/xerces/dom/DocumentImpl;Ljava/lang/String;Ljava/lang/String;)V
> not found

I had no problems using Xalan 2.0 and Xerces 1.2.3 with
Websphere 3.5.2 on Win2000 and 3.5.0 on Linux. I just put
xalan.jar and xerces.jar at the beginning of the classpath in
admin.config.

Your problem is almost certainly version-related: older
versions of Xerces do not implements DocumentImpl method. This
is a very common problem with a big number of servlet engines
(and application servers) -- providing older version of a very
common and useful package.
--
Besplatno kopiranje Linux distribucija i softwarea
[Novi Mandrake, RedHat, Debian, ...]
http://www.inet.hr/~dcengija/

0 new messages