You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by David Crossley <cr...@indexgeo.com.au> on 2001/09/19 12:09:44 UTC

startup exception when XercesParser instead of JaxpParser

I followed the instructions in 2.1-dev webapp/cocoon.xconf
to activate the XercesParser instead of the default JaxpParser ...
1) add parser entry to cocoon.xconf
 <parser class="... parser.XercesParser"/>
2) add the system property to $TOMCAT_HOME/bin/tomcat.sh
 -Dorg.apache.cocoon.components.parser.Parser=
 org.apache.cocoon.components.parser.XercesParser

However, Tomcat fails on startup when adding the Cocoon context,
with the horrid error message listed below. Everything is fine when
using the default JaxpParser.

Are the instructions in 2.1-dev webapp/cocoon.xconf still current
and still relevant?

(I am actually starting to eradicate [Bug 3595] New: - Entity catalogs - 
XercesParser.java needs setEntityResolver
However, this happened before beginning any code modifications.)

Help please.
regards, David Crossley

----------------------
2001-09-19 05:14:59 - ContextManager: Adding context Ctx( /cocoon )
Exception in thread "main" java.lang.VerifyError: (class: 
org/apache/cocoon/components/parser/XercesParser, method: newDocument 
signature: 
(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Document;) 
Incompatible argument to function
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:237)
        at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:92)
        at 
org.apache.avalon.excalibur.component.DefaultComponentHandler.get(DefaultComponentHandler.java:98)
        at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:302)
        at org.apache.cocoon.Cocoon.configure(Cocoon.java:265)
        at org.apache.cocoon.Cocoon.initialize(Cocoon.java:198)
        at 
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:727)
        at 
org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:204)
        at 
org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)        
at org.apache.tomcat.core.Handler.init(Handler.java:215)
        at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
        at 
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
        at 
org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
        at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

----------------------
src/org/apache/cocoon/Cocoon.java line 265 ...
            p = (Parser)startupManager.lookup(Parser.ROLE);
----------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: startup exception when XercesParser instead of JaxpParser

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 8:09 PM +1000 19/9/01, David Crossley wrote:
>I followed the instructions in 2.1-dev webapp/cocoon.xconf
>to activate the XercesParser instead of the default JaxpParser ...
>1) add parser entry to cocoon.xconf
> <parser class="... parser.XercesParser"/>
>2) add the system property to $TOMCAT_HOME/bin/tomcat.sh
> -Dorg.apache.cocoon.components.parser.Parser=
> org.apache.cocoon.components.parser.XercesParser

This does not solve your problem, but when need to add extra command line
stuff to TomCat's "launch string", instead of editing (and keeping your
changes in) tomcat.sh, you might find it more convenient to set up an
environment variable called $TOMCAT_OPTS, it's contents are automatically
added to the command line by tomcat.sh.

Hope this helps

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pa...@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: startup exception when XercesParser instead of JaxpParser

Posted by Leo Sutic <le...@inspireinfrastructure.com>.
Nuke jaxp.jar from your tomcat/lib directory.

/LS

> -----Original Message-----
> From: David Crossley [mailto:crossley@indexgeo.com.au]
> Sent: den 19 september 2001 12:10
> To: cocoon-dev@xml.apache.org
> Subject: startup exception when XercesParser instead of JaxpParser
>
>
> I followed the instructions in 2.1-dev webapp/cocoon.xconf
> to activate the XercesParser instead of the default JaxpParser ...
> 1) add parser entry to cocoon.xconf
>  <parser class="... parser.XercesParser"/>
> 2) add the system property to $TOMCAT_HOME/bin/tomcat.sh
>  -Dorg.apache.cocoon.components.parser.Parser=
>  org.apache.cocoon.components.parser.XercesParser
>
> However, Tomcat fails on startup when adding the Cocoon context,
> with the horrid error message listed below. Everything is fine when
> using the default JaxpParser.
>
> Are the instructions in 2.1-dev webapp/cocoon.xconf still current
> and still relevant?
>
> (I am actually starting to eradicate [Bug 3595] New: - Entity catalogs -
> XercesParser.java needs setEntityResolver
> However, this happened before beginning any code modifications.)
>
> Help please.
> regards, David Crossley
>
> ----------------------
> 2001-09-19 05:14:59 - ContextManager: Adding context Ctx( /cocoon )
> Exception in thread "main" java.lang.VerifyError: (class:
> org/apache/cocoon/components/parser/XercesParser, method: newDocument
> signature:
> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/d
> om/Document;)
> Incompatible argument to function
>         at java.lang.Class.newInstance0(Native Method)
>         at java.lang.Class.newInstance(Class.java:237)
>         at
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newI
> nstance(DefaultComponentFactory.java:92)
>         at
> org.apache.avalon.excalibur.component.DefaultComponentHandler.get(
DefaultComponentHandler.java:98)
>         at
> org.apache.avalon.excalibur.component.ExcaliburComponentManager.lo
> okup(ExcaliburComponentManager.java:302)
>         at org.apache.cocoon.Cocoon.configure(Cocoon.java:265)
>         at org.apache.cocoon.Cocoon.initialize(Cocoon.java:198)
>         at
> org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet
> .java:727)
>         at
> org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:204)
>         at
> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:3
> 17)
> at org.apache.tomcat.core.Handler.init(Handler.java:215)
>         at
> org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
>         at
> org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(Loa
dOnStartupInterceptor.java:130)
>         at
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
>         at
> org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
>         at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
>         at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
>
> ----------------------
> src/org/apache/cocoon/Cocoon.java line 265 ...
>             p = (Parser)startupManager.lookup(Parser.ROLE);
> ----------------------
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: startup exception when XercesParser instead of JaxpParser

Posted by David Crossley <cr...@indexgeo.com.au>.
Yes Dims, that fixed it. The Xerces jar from original install of
tomcat-3.2.2 was at $TOMCAT_HOME/lib/xerces_1_4_1.jar
I replaced it with the xerces_1_4_3.jar from the Cocoon-2.1dev
dist and all is now well. How on earth could you detect that
that was the problem from the supplied error listing?
Anyway thanks, i can now get on with developing the patch.
regards, David

--------------------------------
On Wed, 19 Sep 2001, Dims wrote:
> David,
> 
> Check if you have any other Xerces JAR file *ANYWHERE* in your tomcat directory hierarchy. replace
> it with the xerces in xml-cocoon2\lib directory and let us know. Also the log file will most
> likely show the location from where xerces jar was picked up so check that too.
> 
> Thanks,
> dims
> 
> --- David Crossley <cr...@indexgeo.com.au> wrote:
> > I followed the instructions in 2.1-dev webapp/cocoon.xconf
> > to activate the XercesParser instead of the default JaxpParser ...
> > 1) add parser entry to cocoon.xconf
> >  <parser class="... parser.XercesParser"/>
> > 2) add the system property to $TOMCAT_HOME/bin/tomcat.sh
> >  -Dorg.apache.cocoon.components.parser.Parser=
> >  org.apache.cocoon.components.parser.XercesParser
> > 
> > However, Tomcat fails on startup when adding the Cocoon context,
> > with the horrid error message listed below. Everything is fine when
> > using the default JaxpParser.
> > 
> > Are the instructions in 2.1-dev webapp/cocoon.xconf still current
> > and still relevant?
> > 
> > (I am actually starting to eradicate [Bug 3595] New: - Entity catalogs - 
> > XercesParser.java needs setEntityResolver
> > However, this happened before beginning any code modifications.)
> > 
> > Help please.
> > regards, David Crossley
> > 
> > ----------------------
> > 2001-09-19 05:14:59 - ContextManager: Adding context Ctx( /cocoon )
> > Exception in thread "main" java.lang.VerifyError: (class: 
> > org/apache/cocoon/components/parser/XercesParser, method: newDocument 
> > signature: 
> > (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Document;) 
> > Incompatible argument to function
> >         at java.lang.Class.newInstance0(Native Method)
> >         at java.lang.Class.newInstance(Class.java:237)
> >         at 
> >
> org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:92)
> >         at 
> >
> org.apache.avalon.excalibur.component.DefaultComponentHandler.get(DefaultComponentHandler.java:98)
> >         at 
> >
> org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:302)
> >         at org.apache.cocoon.Cocoon.configure(Cocoon.java:265)
> >         at org.apache.cocoon.Cocoon.initialize(Cocoon.java:198)
> >         at 
> > org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:727)
> >         at 
> > org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:204)
> >         at 
> > org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)        
> > at org.apache.tomcat.core.Handler.init(Handler.java:215)
> >         at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> >         at 
> >
> org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
> >         at 
> > org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
> >         at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
> >         at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> >         at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
> > 
> > ----------------------
> > src/org/apache/cocoon/Cocoon.java line 265 ...
> >             p = (Parser)startupManager.lookup(Parser.ROLE);
> > ----------------------
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> > 
> 
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: startup exception when XercesParser instead of JaxpParser

Posted by Davanum Srinivas <di...@yahoo.com>.
David,

Check if you have any other Xerces JAR file *ANYWHERE* in your tomcat directory hierarchy. replace
it with the xerces in xml-cocoon2\lib directory and let us know. Also the log file will most
likely show the location from where xerces jar was picked up so check that too.

Thanks,
dims

--- David Crossley <cr...@indexgeo.com.au> wrote:
> I followed the instructions in 2.1-dev webapp/cocoon.xconf
> to activate the XercesParser instead of the default JaxpParser ...
> 1) add parser entry to cocoon.xconf
>  <parser class="... parser.XercesParser"/>
> 2) add the system property to $TOMCAT_HOME/bin/tomcat.sh
>  -Dorg.apache.cocoon.components.parser.Parser=
>  org.apache.cocoon.components.parser.XercesParser
> 
> However, Tomcat fails on startup when adding the Cocoon context,
> with the horrid error message listed below. Everything is fine when
> using the default JaxpParser.
> 
> Are the instructions in 2.1-dev webapp/cocoon.xconf still current
> and still relevant?
> 
> (I am actually starting to eradicate [Bug 3595] New: - Entity catalogs - 
> XercesParser.java needs setEntityResolver
> However, this happened before beginning any code modifications.)
> 
> Help please.
> regards, David Crossley
> 
> ----------------------
> 2001-09-19 05:14:59 - ContextManager: Adding context Ctx( /cocoon )
> Exception in thread "main" java.lang.VerifyError: (class: 
> org/apache/cocoon/components/parser/XercesParser, method: newDocument 
> signature: 
> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Document;) 
> Incompatible argument to function
>         at java.lang.Class.newInstance0(Native Method)
>         at java.lang.Class.newInstance(Class.java:237)
>         at 
>
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:92)
>         at 
>
org.apache.avalon.excalibur.component.DefaultComponentHandler.get(DefaultComponentHandler.java:98)
>         at 
>
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(ExcaliburComponentManager.java:302)
>         at org.apache.cocoon.Cocoon.configure(Cocoon.java:265)
>         at org.apache.cocoon.Cocoon.initialize(Cocoon.java:198)
>         at 
> org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:727)
>         at 
> org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:204)
>         at 
> org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)        
> at org.apache.tomcat.core.Handler.init(Handler.java:215)
>         at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
>         at 
>
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
>         at 
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
>         at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
>         at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
>         at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
> 
> ----------------------
> src/org/apache/cocoon/Cocoon.java line 265 ...
>             p = (Parser)startupManager.lookup(Parser.ROLE);
> ----------------------
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org