You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Joao Araujo <jo...@wireless-networks.com> on 2004/03/26 05:39:47 UTC

Forrest under tomcat problem


    When I run forrest under tomcat 5 I get the error below. This
    only occurs before I run forrest with "forrest run" . After that,
    everything works fine.


2004-03-25 23:32:17 StandardContext[/lixo]Servlet /lixo threw load() 
exception
javax.servlet.ServletException: Servlet.init() for servlet Cocoon threw 
exception
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1086)
    at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
    at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3959)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4284)
    at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
    at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:638)
    at 
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:839)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at 
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:252)
    at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
    at org.apache.commons.digester.Rule.end(Rule.java:276)
    at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
    at 
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:123)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown 
Source)
    at 
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown 
Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown 
Source)
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown 
Source)
    at 
org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown 
Source
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
S
    at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.commons.digester.Digester.parse(Digester.java:1567)
    at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:519)
    at org.apache.catalina.core.StandardHost.install(StandardHost.java:906)
    at 
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:527)
    at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1008)
    at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:394)
    at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1134)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1126)
    at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:521)
    at 
org.apache.catalina.core.StandardService.start(StandardService.java:519)
    at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:594)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   

Thanks,

Joao,



Re: Forrest under tomcat problem

Posted by Joao Araujo <jo...@wireless-networks.com>.

>>     3. I use  tomcat to show the pages.
>>          This was working fine on version 0.51
>>     Now It does not work. Unless I go to the directory of my project
>>    and "forrest run" . Then I have pages been displayed under 8080, and
>>8888.
>>    
>>
>
>This is very strange. "forrest run" does not do anything that is not done by
>"forrest webapp", therefore running forest should make no difference. Can
>you please try building a war file ("forrest war") and copying that into
>your tomcat webapps directory. Then restart tomcat and see if your webapp is
>there.
>
>  
>
    As war file It is worse yet. All the core files are copied to the 
lib directory.
    Anyway, It does not work, nor even executing "forrest run" .

    here is the error:

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented 
it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet Cocoon threw 
exception
    
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
    
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
    
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
    
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
    
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
    java.lang.Thread.run(Thread.java:534)
root cause
java.lang.StackOverflowError
note The full stack trace of the root cause is available in the Tomcat logs.
Apache Tomcat/5.0.19

 --------------------I also DID that ------------------------------------
If using JDK 1.4 or above, make sure to set the Java environment variable
-Djava.endorsed.dirs=/env/forrest/build/dist/shbat/bin/../lib/endorsed
Eg, in the TOMCAT_OPTS (3.3.x) or CATALINA_OPTS (4.x) env variable.

--------------------now I took it off------------------------------------
Does not work either way. In fact, seems that the /build/webapp 
directory is working.
I will reboot the server to see if it works without "forrest run" . I 
tried many combination.
Now i will try to clear this thing up.



Joao,

>Thanks,
>
>Ross
>
>
>  
>


Re: Forrest under tomcat problem

Posted by rg...@apache.org.
----- Original Message ----- 
From: "Joao Araujo" <jo...@wireless-networks.com>
>     1. I generate the webapp like I was doing with version 0.51

I assume you do this by executing "forrest webapp"

>      2. I point a tomcat context to this directory .

I assume you mean ./build/webapp

>      3. I use  tomcat to show the pages.
>           This was working fine on version 0.51
>      Now It does not work. Unless I go to the directory of my project
>     and "forrest run" . Then I have pages been displayed under 8080, and
> 8888.

This is very strange. "forrest run" does not do anything that is not done by
"forrest webapp", therefore running forest should make no difference. Can
you please try building a war file ("forrest war") and copying that into
your tomcat webapps directory. Then restart tomcat and see if your webapp is
there.

Thanks,

Ross


Re: Forrest under tomcat problem

Posted by Carlos Araya <ca...@cvc.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joao:

Why not build forrest war and move the war archive to your production
environment?

Carlos
- - ----- Original Message ----- 
From: "Joao Araujo" <jo...@wireless-networks.com>
To: <fo...@xml.apache.org>
Sent: Saturday, March 27, 2004 09:44
Subject: Re: Forrest under tomcat problem


> 
> >"forrest run" builds a version of the forrest webapp for working
> >with the bundled jetty in a development environment. To build a
> >webapp for distribution to a production environment you need to do
> >"forrest webapp", this will copy across eveything you need
> >(whereas a "run" uses
> >"webapp-local" which leaves many things in the src directory).
> >
> >If you do "forrest war" a distributable war file is build for
> >hosting outside of the bundled jetty.
> >
> >  
> >
>     Yep, I know that.  Let me tell you what I am doing.
> 
>     1. I generate the webapp like I was doing with version 0.51
>      2. I point a tomcat context to this directory .
>      3. I use  tomcat to show the pages.
>           This was working fine on version 0.51
>      Now It does not work. Unless I go to the directory of my
> project 
>     and "forrest run" . Then I have pages been displayed under
> 8080, and  8888.
>    
> 
>     Thanks
> Joao,
> 
> >Ross
> >
> >
> >  
> >
> 

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBQGXBdF1sel0NpjckEQJS9QCdGp89xxnxgspshtWC/IVP5dAYcV0An3MU
9fddly05zf/aO4OhtWaCZogO
=mAku
-----END PGP SIGNATURE-----


Re: Forrest under tomcat problem

Posted by Joao Araujo <jo...@wireless-networks.com>.
>"forrest run" builds a version of the forrest webapp for working with the
>bundled jetty in a development environment. To build a webapp for
>distribution to a production environment you need to do "forrest webapp",
>this will copy across eveything you need (whereas a "run" uses
>"webapp-local" which leaves many things in the src directory).
>
>If you do "forrest war" a distributable war file is build for hosting
>outside of the bundled jetty.
>
>  
>
    Yep, I know that.  Let me tell you what I am doing.

    1. I generate the webapp like I was doing with version 0.51
     2. I point a tomcat context to this directory .
     3. I use  tomcat to show the pages.
          This was working fine on version 0.51
     Now It does not work. Unless I go to the directory of my project
    and "forrest run" . Then I have pages been displayed under 8080, and 
8888.
   

    Thanks
Joao,

>Ross
>
>
>  
>


Re: Forrest under tomcat problem

Posted by rg...@apache.org.
----- Original Message ----- 
From: "Joao Araujo" <jo...@wireless-networks.com>

>     When I run forrest under tomcat 5 I get the error below. This
>     only occurs before I run forrest with "forrest run" . After that,
>     everything works fine.

"forrest run" builds a version of the forrest webapp for working with the
bundled jetty in a development environment. To build a webapp for
distribution to a production environment you need to do "forrest webapp",
this will copy across eveything you need (whereas a "run" uses
"webapp-local" which leaves many things in the src directory).

If you do "forrest war" a distributable war file is build for hosting
outside of the bundled jetty.

Ross