You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Boris Klug <bo...@debeka.de> on 2005/09/20 08:39:12 UTC

MyFaces 1.1.0 - problem redeploying apps

Hi!

today I migrated from MyFaces 1.0.9m9 to 1.1.0. First I want to say
thank you to the whole MyFaces team for the work done.

Now to my problem: I deploy my application to Tomcat 5.5.9, the app
works fine. When I redeploy the same app, I get the following error in
Tomcat:

19.09.2005 15:19:16 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/XXX]
19.09.2005 15:19:16 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive XXX.war
2005-09-19 15:19:21,229 INFO FacesConfigurator: Reading standard config
org/apache/myfaces/resource/standard-faces-config.xml
2005-09-19 15:19:21,349 INFO FacesConfigurator: Reading config
jar:file:/C:/tomcat-5.5.9/webapps/ZederBrowser/WEB-INF/lib/tomahawk.jar!/META-INF/faces-config.xml
2005-09-19 15:19:21,419 INFO FacesConfigurator: Reading config
/WEB-INF/faces-config.xml
2005-09-19 15:19:21,459 INFO FacesConfigurator: Reading config
/WEB-INF/faces-config.xml
2005-09-19 15:19:23,222 INFO StartupServletContextListener:
ServletContext 'c:\tomcat-5.5.9\webapps\XXX\' initialized.
19.09.2005 15:19:33 org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context [/XXX]
19.09.2005 15:19:33 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive XXX.war
19.09.2005 15:19:34 org.apache.catalina.startup.ContextConfig
applicationWebConfig
===>>>
INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/XXXX]
19.09.2005 15:19:34 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error listenerStart
19.09.2005 15:19:34 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [/XXX] startup failed due to previous errors
<<<===

Tomcat first tries to undeploy my application - and this fails. The
problems seems to be in the tomahawk.jar. I think that a lock exists to
one of the files inside the tomahawk.jar file.

I tried the "anti locking features" of Tomncat 5.5.9, I added the
following in as META-INF\context.xml to my application and also in the 
server config, but it does not help:

<Context>
     <WatchedResource reloadable="true"
             antiResourceLocking="true" antiJARLocking="true">
       WEB-INF/web.xml
     </WatchedResource>
</Context>

So what to do?




Re: MyFaces 1.1.0 - problem redeploying apps - SOLVED

Posted by Werner Punz <we...@gmx.at>.
Actually there is more than only one problem with Tomcat, especially
5.5.9 is pretty nasty, on one hand it requires a JDK 5.0 on the other
hand it refuses to compile 5.0 constructs due to the integrated jikes
compiler, guess it is time to open a tomcat quirks page ;-).

(It is not like Tomcat is the only app server with weird quirks, I had
my fair share of problems with Resin recently as well)

Werner


Martin Marinschek wrote:
> Thanks for keeping us updated!
> 
> I would be great if you could add this on the WIKI pages somewhere.
> 
> sounds like a problem more users could run into ;)
> 
> regards,
> 
> Martin
> 
> On 9/20/05, Boris Klug <bo...@debeka.de> wrote:
> 
>>Hi!
>>
>>I googled about the problem. It seems to be related to classloaders
>>which hold resources like memory, tcp ports and files. The issue exists
>>in Java 1.4.2, maby only on Windows. Java 1.5 fixed some but not all
>>problems - havent tried it.
>>I also had always the problem that after some (around 30) redeploys I
>>get an OutOfMemoryExecption... same problem ;-)
>>
>>You can read more about the issue in the blog at (*1). For me personaly
>>I solved the problem by adding the following to the META-INF\context.xml
>>file:
>>
>>        <Context antiResourceLocking="true" antiJARLocking="true">
>>            <WatchedResource>
>>              WEB-INF/web.xml
>>            </WatchedResource>
>>        </Context>
>>
>>When in Tomcat the antiXXXLocking are true, Tomcat copies all files from
>>the application to its temp folder and uses this files - which means
>>that deployment is slower (due copying) and your temp folder gets full.
>>
>>Dont know why this didnt work the first time...
>>
>>But, ok, its solved.
>>
>>(*1)
>>http://blog.exis.com/colin/archives/2005/08/23/i-put-a-spell-on-you-because-youre-mine-aka-why-is-tomcat-holding-onto-jars/
>>
>>
> 
> 
> 


Re: MyFaces 1.1.0 - problem redeploying apps - SOLVED

Posted by Boris Klug <bo...@debeka.de>.
Hi!

I am not so in this Wiki stuff... but everybody can find the postings in 
the mailing list archive.

Martin Marinschek wrote:
> Thanks for keeping us updated!
> 
> I would be great if you could add this on the WIKI pages somewhere.
> 
> sounds like a problem more users could run into ;)
> 
> regards,
> 
> Martin
> 
> On 9/20/05, Boris Klug <bo...@debeka.de> wrote:
> 
>>Hi!
>>
>>I googled about the problem. It seems to be related to classloaders
>>which hold resources like memory, tcp ports and files. The issue exists
>>in Java 1.4.2, maby only on Windows. Java 1.5 fixed some but not all
>>problems - havent tried it.
>>I also had always the problem that after some (around 30) redeploys I
>>get an OutOfMemoryExecption... same problem ;-)
>>
>>You can read more about the issue in the blog at (*1). For me personaly
>>I solved the problem by adding the following to the META-INF\context.xml
>>file:
>>
>>        <Context antiResourceLocking="true" antiJARLocking="true">
>>            <WatchedResource>
>>              WEB-INF/web.xml
>>            </WatchedResource>
>>        </Context>
>>
>>When in Tomcat the antiXXXLocking are true, Tomcat copies all files from
>>the application to its temp folder and uses this files - which means
>>that deployment is slower (due copying) and your temp folder gets full.
>>
>>Dont know why this didnt work the first time...
>>
>>But, ok, its solved.
>>
>>(*1)
>>http://blog.exis.com/colin/archives/2005/08/23/i-put-a-spell-on-you-because-youre-mine-aka-why-is-tomcat-holding-onto-jars/
>>
>>
> 
> 
> 

Re: MyFaces 1.1.0 - problem redeploying apps - SOLVED

Posted by Martin Marinschek <ma...@gmail.com>.
Thanks for keeping us updated!

I would be great if you could add this on the WIKI pages somewhere.

sounds like a problem more users could run into ;)

regards,

Martin

On 9/20/05, Boris Klug <bo...@debeka.de> wrote:
> Hi!
> 
> I googled about the problem. It seems to be related to classloaders
> which hold resources like memory, tcp ports and files. The issue exists
> in Java 1.4.2, maby only on Windows. Java 1.5 fixed some but not all
> problems - havent tried it.
> I also had always the problem that after some (around 30) redeploys I
> get an OutOfMemoryExecption... same problem ;-)
> 
> You can read more about the issue in the blog at (*1). For me personaly
> I solved the problem by adding the following to the META-INF\context.xml
> file:
> 
>         <Context antiResourceLocking="true" antiJARLocking="true">
>             <WatchedResource>
>               WEB-INF/web.xml
>             </WatchedResource>
>         </Context>
> 
> When in Tomcat the antiXXXLocking are true, Tomcat copies all files from
> the application to its temp folder and uses this files - which means
> that deployment is slower (due copying) and your temp folder gets full.
> 
> Dont know why this didnt work the first time...
> 
> But, ok, its solved.
> 
> (*1)
> http://blog.exis.com/colin/archives/2005/08/23/i-put-a-spell-on-you-because-youre-mine-aka-why-is-tomcat-holding-onto-jars/
> 
> 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German

Re: MyFaces 1.1.0 - problem redeploying apps - SOLVED

Posted by Boris Klug <bo...@debeka.de>.
Hi!

I googled about the problem. It seems to be related to classloaders 
which hold resources like memory, tcp ports and files. The issue exists 
in Java 1.4.2, maby only on Windows. Java 1.5 fixed some but not all 
problems - havent tried it.
I also had always the problem that after some (around 30) redeploys I 
get an OutOfMemoryExecption... same problem ;-)

You can read more about the issue in the blog at (*1). For me personaly 
I solved the problem by adding the following to the META-INF\context.xml 
file:

	<Context antiResourceLocking="true" antiJARLocking="true">
	    <WatchedResource>
	      WEB-INF/web.xml
	    </WatchedResource>
	</Context>

When in Tomcat the antiXXXLocking are true, Tomcat copies all files from 
the application to its temp folder and uses this files - which means 
that deployment is slower (due copying) and your temp folder gets full.

Dont know why this didnt work the first time...

But, ok, its solved.

(*1) 
http://blog.exis.com/colin/archives/2005/08/23/i-put-a-spell-on-you-because-youre-mine-aka-why-is-tomcat-holding-onto-jars/


Re: MyFaces 1.1.0 - problem redeploying apps

Posted by Boris Klug <bo...@debeka.de>.
Hi Martin!

> Can you post your web.xml?

See my web.xml atteched at the bottom


> Wild shot: did you get rid of the StartupServletContextListener in
> web.xml, as this is not necessary in MyFaces 1.1.0 anymore?

Yes, I had the StartupServletContextListener in my web.xml, removed, but 
the problem remains the same.


<?xml version="1.0" encoding="UTF-8"?>

<!--
  * xxx web.xml Datei
-->

<web-app   version="2.4"
              xmlns="http://java.sun.com/xml/ns/j2ee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

     <description>xxx web.xml</description>

     <context-param>
         <description>
             Comma separated list of URIs of (additional) faces config 
files.
             (e.g. /WEB-INF/my-config.xml)
             See JSF 1.0 PRD2, 10.3.2
         </description>
         <param-name>javax.faces.CONFIG_FILES</param-name>
         <param-value>
             /WEB-INF/faces-config.xml
         </param-value>
     </context-param>

     <context-param>
         <description>
             State saving method: "client" or "server" (= default)
             See JSF Specification 2.5.2
         </description>
         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
         <param-value>client</param-value>
     </context-param>

     <context-param>
         <description>
             This parameter tells MyFaces if javascript code should be 
allowed in the
             rendered HTML output.
             If javascript is allowed, command_link anchors will have 
javascript code
             that submits the corresponding form.
             If javascript is not allowed, the state saving info and 
nested parameters
             will be added as url parameters.
             Default: "true"
         </description>
         <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
         <param-value>true</param-value>
     </context-param>

     <context-param>
         <description>
             If true, rendered HTML code will be formatted, so that it 
is "human readable".
             i.e. additional line separators and whitespace will be 
written, that do not
             influence the HTML code.
             Default: "true"
         </description>
         <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
         <param-value>true</param-value>
     </context-param>

     <context-param>
         <description>
             Default: "false"
         </description>
         <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
         <param-value>false</param-value>
     </context-param>

     <context-param>
         <description>
             Default: "false"
         </description>
         <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
         <param-value>false</param-value>
     </context-param>

<!-- Config parameter fuer den xxx -->
     <context-param>
         <description>
         	Wenn "true", dann wird ein zusaetzliches Debug Menue eingeblendet.
         	Kann "true" oder "false" sein. Default ist "false".
         </description>
         <param-name>de.xxx.DEBUG_MENU</param-name>
         <param-value>true</param-value>
     </context-param>

     <error-page>
         <exception-type>java.lang.Throwable</exception-type>
         <location>/pages/tomcatErrorPage.jsp</location>
     </error-page>

     <!-- Faces Servlet -->
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>
         <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
     </servlet>

     <!-- Faces Filter, wird z.B. von x:popup benutzt -->
     <filter>
         <filter-name>MyFacesExtensionsFilter</filter-name>
 
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
     </filter>

     <!-- Faces Servlet Mapping -->
     <filter-mapping>
		<filter-name>MyFacesExtensionsFilter</filter-name>
		<url-pattern>/faces/*</url-pattern>
	</filter-mapping>

     <!-- Filter, der die Session überwacht -->
     <filter>
         <filter-name>SessionFilter</filter-name>
         <filter-class>de.xx.SessionRequestFilter</filter-class>
     </filter>

     <!-- Jede Anforderung soll den Filter durchlaufen -->
     <filter-mapping>
		<filter-name>SessionFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>
	
	
     <filter>
         <filter-name>GraphVizFilter</filter-name>
         <filter-class>de.xxx.GraphVizRequestFilter</filter-class>
     </filter>

     <!-- Filter nur für entsprechende Endung -->
     <filter-mapping>
		<filter-name>GraphVizFilter</filter-name>
		<url-pattern>*.graphviz</url-pattern>
	</filter-mapping>

     <!-- extension mapping -->
     <servlet-mapping>
         <servlet-name>Faces Servlet</servlet-name>
         <url-pattern>*.jsf</url-pattern>
     </servlet-mapping>

     <!-- Welcome files -->
     <welcome-file-list>
         <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>

</web-app>

Re: MyFaces 1.1.0 - problem redeploying apps

Posted by Martin Marinschek <ma...@gmail.com>.
Can you post your web.xml?

Wild shot: did you get rid of the StartupServletContextListener in
web.xml, as this is not necessary in MyFaces 1.1.0 anymore?

regards,

Martin

On 9/20/05, Boris Klug <bo...@debeka.de> wrote:
> Hi!
> 
> today I migrated from MyFaces 1.0.9m9 to 1.1.0. First I want to say
> thank you to the whole MyFaces team for the work done.
> 
> Now to my problem: I deploy my application to Tomcat 5.5.9, the app
> works fine. When I redeploy the same app, I get the following error in
> Tomcat:
> 
> 19.09.2005 15:19:16 org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/XXX]
> 19.09.2005 15:19:16 org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive XXX.war
> 2005-09-19 15:19:21,229 INFO FacesConfigurator: Reading standard config
> org/apache/myfaces/resource/standard-faces-config.xml
> 2005-09-19 15:19:21,349 INFO FacesConfigurator: Reading config
> jar:file:/C:/tomcat-5.5.9/webapps/ZederBrowser/WEB-INF/lib/tomahawk.jar!/META-INF/faces-config.xml
> 2005-09-19 15:19:21,419 INFO FacesConfigurator: Reading config
> /WEB-INF/faces-config.xml
> 2005-09-19 15:19:21,459 INFO FacesConfigurator: Reading config
> /WEB-INF/faces-config.xml
> 2005-09-19 15:19:23,222 INFO StartupServletContextListener:
> ServletContext 'c:\tomcat-5.5.9\webapps\XXX\' initialized.
> 19.09.2005 15:19:33 org.apache.catalina.startup.HostConfig checkResources
> INFO: Undeploying context [/XXX]
> 19.09.2005 15:19:33 org.apache.catalina.startup.HostConfig deployWAR
> INFO: Deploying web application archive XXX.war
> 19.09.2005 15:19:34 org.apache.catalina.startup.ContextConfig
> applicationWebConfig
> ===>>>
> INFO: Missing application web.xml, using defaults only
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/XXXX]
> 19.09.2005 15:19:34 org.apache.catalina.core.StandardContext start
> SCHWERWIEGEND: Error listenerStart
> 19.09.2005 15:19:34 org.apache.catalina.core.StandardContext start
> SCHWERWIEGEND: Context [/XXX] startup failed due to previous errors
> <<<===
> 
> Tomcat first tries to undeploy my application - and this fails. The
> problems seems to be in the tomahawk.jar. I think that a lock exists to
> one of the files inside the tomahawk.jar file.
> 
> I tried the "anti locking features" of Tomncat 5.5.9, I added the
> following in as META-INF\context.xml to my application and also in the
> server config, but it does not help:
> 
> <Context>
>      <WatchedResource reloadable="true"
>              antiResourceLocking="true" antiJARLocking="true">
>        WEB-INF/web.xml
>      </WatchedResource>
> </Context>
> 
> So what to do?
> 
> 
> 
> 


-- 

http://www.irian.at
Your JSF powerhouse - 
JSF Trainings in English and German