[opencms-dev] Tomcat 5.0.16 usage

Mariano Barcia mariano.barcia at colaborativa.net
Wed Feb 11 20:06:01 CET 2004


Reed,

You are right, however you still have Xerces v1.4.4 which is fine, but
as long you *don't* use Lucene.

Anyway, it's good to know Tomcat 4.1.29 comes with Xerces 2.x, and how
to avoid that in a simple manner.

BTW, I checked out the CVS and saw that Opencms 5.3.1 still uses Xerces
v1.4.4. Any particular reason for not updating? 

--mariano

-----Mensaje original-----
De: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
En nombre de reed.mccauley at us.abb.com
Enviado el: Martes, 10 de Febrero de 2004 07:04 p.m.
Para: opencms-dev at opencms.org
CC: opencms-dev at opencms.org; opencms-dev-admin at opencms.org
Asunto: RE: [opencms-dev] Tomcat 5.0.16 usage

Hi Mariano,
Sorry I didn't get back to you sooner, thanks for the help. As mentioned
in a further stream, getting opencms 5.0.1 to work with Tomcat 5.0.1x
requires the following (shortest path):

- remove the endorsed xerces jar file (2.x) in Tomcat
($CATALINA_HOME/common/endorsed)
- replacing above with xerces-1_4_4.jar file (from
$CATALINA_HOME/webapps/opencms/WEB-INF/lib)
- restart Tomcat

Thanks,
Reed


Message from "Mariano Barcia"
<mariano.barcia at colaborativa.net>@opencms.org received on 02/09/2004
01:50 PM

02/09/2004 01:50 PM
Internal


"Mariano Barcia" <mariano.barcia at colaborativa.net>@opencms.org

Please respond to opencms-dev at opencms.org
Sent by opencms-dev-admin at opencms.org



        To:     <opencms-dev at opencms.org>
        cc:
        Subject:        RE: [opencms-dev] Tomcat 5.0.16 usage


Reed,

I am sure that Xerces being used in your environment is still v2.5,
probably because of the J2SDK 1.4.2 (I strongly recommend you using
J2SDK 1.4.1). I attach you here a tiny patch for your exception, HTH

Brief instructions:
Once opencms.war is deployed, stop the context, and replace the Xerces
library under WEB-INF/lib, then overwrite the .class file in
WEB-INF/classes/com/opencms/template (CmsXmlXercesParser.class) with
this one attached, and restart the context.

Notes:
-Xerces v1.4.4 (bundled in opencms v5) consists of 1 JAR file:
xercesImpl.jar -Xerces v2.5 consists of 3 JAR files: xercesImpl.jar
xml-apis.jar xmlParserAPIs.jar -Tomcat/Catalina must be 4.1, and J2SDK
must be 1.4.0 or 1.4.1. Have not tried with the new 1.4.2. Check if
J2SDK is already bundled with Xerces 2.x -Have not yet tried with Xerces
v2.6

--mariano



-----Mensaje original-----
De: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
En nombre de reed.mccauley at us.abb.com
Enviado el: Lunes, 09 de Febrero de 2004 04:22 p.m.
Para: opencms-dev at opencms.org
CC: opencms-dev at opencms.org; opencms-dev-admin at opencms.org
Asunto: Re: [opencms-dev] Tomcat 5.0.16 usage







Hi,
Well, as recommended, I installed an older version of Tomcat (4.1.29).
Unfortunately, it yields similar errors (see below). I'm just trying
going through the "test demo" portion of the opencms user's manual. Is
this not how folks get up to speed on this product? It's not a classpath
issue as I've set it to "." before starting Tomcat; it is using the
xerces code that comes bundled with it. As mentioned farther down, this
is a standared W2K installation with JDK 1.4.2-02. Thanks for any help,
Reed type Exception report message description The server encountered an
internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
at java.lang.Thread.run(Thread.java:534)

root cause
java.lang.NoSuchMethodError:
org.apache.xerces.dom.CoreDocumentImpl.getEncoding()Ljava/lang/String;
at
com.opencms.template.CmsXmlXercesParser.getOriginalEncoding(CmsXmlXerces
Parser.java:193)
at
com.opencms.template.CmsXmlXercesParser.getXmlText(CmsXmlXercesParser.ja
va:131)
at
com.opencms.template.A_CmsXmlContent.getXmlText(A_CmsXmlContent.java:684
)
at
com.opencms.template.A_CmsXmlContent.getXmlText(A_CmsXmlContent.java:673
)
at
com.opencms.file.CmsResourceTypePage.copyResource(CmsResourceTypePage.ja
va:391)
at
com.opencms.file.CmsObject.copyResource(CmsObject.java:684)
at
com.opencms.workplace.CmsXmlTemplateEditor.createTemporaryFile(CmsXmlTem
plateEditor.java:100)
at
com.opencms.workplace.CmsXmlTemplateEditor.getContent(CmsXmlTemplateEdit
or.java:444)
at
com.opencms.template.cache.CmsElementXml.getContent(CmsElementXml.java:1
71)
at
com.opencms.template.cache.CmsUri.callCanonicalRoot(CmsUri.java:185)
at
com.opencms.template.cache.CmsElementCache.callCanonicalRoot(CmsElementC
ache.java:149)
at
com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLauncher.java:2
85)
at
com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:341)
at
com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:274)
at
com.opencms.core.OpenCms.showResource(OpenCms.java:961)
at
com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
7)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:78
1)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
onnection(Http11Protocol.java:549)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58
9)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:666)
at java.lang.Thread.run(Thread.java:534)


Apache Tomcat/4.1.29



Message from Reed McCauley/USTRA/NONABB at ABB_US01@opencms.org received on
02/06/2004 02:16 PM

02/06/2004 02:16 PM
Internal


Reed McCauley/USTRA/NONABB at ABB_US01@opencms.org

Please respond to opencms-dev at opencms.org
Sent by opencms-dev-admin at opencms.org



To:     opencms-dev at opencms.org
cc:
Subject:        [opencms-dev] Tomcat 5.0.16 usage







Hi,
I've installed the opencms (Tomcat (5.0.16), MySQL (4.0.17) and opencms
(5.0.1)) environment on W2K. I'm trying out "the demo" listed in Ch 5.2
section 1 of the opencms manual. The step  to  "Edit pages" fails. On
different installation/test run phases I get different results. Here's
the most common: type Exception report message description The server
encountered an internal error () that prevented it from fulfilling this
request. exception
javax.servlet.ServletException: Servlet execution threw an exception

root cause
java.lang.NoSuchMethodError:
org.apache.xerces.dom.CoreDocumentImpl.getEncoding()Ljava/lang/String;

com.opencms.template.CmsXmlXercesParser.getOriginalEncoding(CmsXmlXerces
Parser.java:193)



com.opencms.template.CmsXmlXercesParser.getXmlText(CmsXmlXercesParser.ja
va:131)


com.opencms.template.A_CmsXmlContent.getXmlText(A_CmsXmlContent.java:684
)


com.opencms.template.A_CmsXmlContent.getXmlText(A_CmsXmlContent.java:673
)


com.opencms.file.CmsResourceTypePage.copyResource(CmsResourceTypePage.ja
va:391)


com.opencms.file.CmsObject.copyResource(CmsObject.java:684)

com.opencms.workplace.CmsXmlTemplateEditor.createTemporaryFile(CmsXmlTem
plateEditor.java:100)



com.opencms.workplace.CmsXmlTemplateEditor.getContent(CmsXmlTemplateEdit
or.java:444)



com.opencms.template.cache.CmsElementXml.getContent(CmsElementXml.java:1
71)


com.opencms.template.cache.CmsUri.callCanonicalRoot(CmsUri.java:185)

com.opencms.template.cache.CmsElementCache.callCanonicalRoot(CmsElementC
ache.java:149)



com.opencms.launcher.CmsXmlLauncher.generateOutput(CmsXmlLauncher.java:2
85)


com.opencms.launcher.CmsXmlLauncher.launch(CmsXmlLauncher.java:341)
com.opencms.launcher.A_CmsLauncher.initlaunch(A_CmsLauncher.java:274)
com.opencms.core.OpenCms.showResource(OpenCms.java:961)
com.opencms.core.OpenCmsHttpServlet.doGet(OpenCmsHttpServlet.java:310)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)


Note that I'm using Tomcat 5.0.16. I get a compability warning during
installation saying that opencms has not been tested against it. Is this
the problem?

Thanks for any help on this,

Reed

(See attached file: C.htm)

Attention: Attachment  "C.htm" has been removed from this note on
February 09 2004 by Reed McCauley/USTRA/NONABB


(See attached file: C.htm)


Attention: Attachment  "CmsXmlXercesParser.class" has been removed from
this note on February 10 2004 by Reed McCauley/USTRA/NONABB


(See attached file: C.htm)




More information about the opencms-dev mailing list