You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org> on 2006/04/06 10:11:46 UTC

[jira] Closed: (MYFACES-1270) Hot deployment in exploded mode is broken due to FacesConfigurator

     [ http://issues.apache.org/jira/browse/MYFACES-1270?page=all ]
     
Martin Marinschek closed MYFACES-1270:
--------------------------------------

    Fix Version: 1.1.3-SNAPSHOT
     Resolution: Fixed

Thanks Olaf for handling this. Was painful for us, too. I know how hard it is to find the reason for deployment issues, so kudos to you!

regards,

Martin

> Hot deployment in exploded mode is broken due to FacesConfigurator
> ------------------------------------------------------------------
>
>          Key: MYFACES-1270
>          URL: http://issues.apache.org/jira/browse/MYFACES-1270
>      Project: MyFaces Core
>         Type: Bug

>     Versions: 1.1.1
>  Environment: Windows XP, Suns Java 1.5.0_04, JBoss 4.0.3SP1 or Tomcat 5.5.12, MyEclipse 4.1.0 GA
>     Reporter: Olaf Fricke
>     Assignee: Martin Marinschek
>      Fix For: 1.1.3-SNAPSHOT

>
> We at HanseMerkur insurances are currently working with MyFaces to for creating web applications. Unfortunately, the hot deployment of an exploded web archiv does not work. This is very annoying is using the deployment features of MyEclipse because we always have to restart the JBoss apllication server. I have tried the same using Tomcat standalone, and the same thing happens.
> I have nailed down the problem to the class FacesConfigurator, and there to the call of URL.openStream() in the method feedClassloaderConfigurations(). This call opens a Stream of an already open jar-archiv (Tomcat always opens up the jar files during startup of an application). Later the stream is closed, but at least if running under j2sdk 1.5.0_04, the closing does not work. When trying to undeploy the application, there is still an open file handle and the jar file cannot be removed. You can reproduce this behaviour by deploying one of the myfaces examples to a running Tomcat and then undeploying it. You will end up with some jar files in the WEB-INF/lib directory.
> I am not very sure which component (myfaces, tomcat, or even java) causes this failure, but I found a way to work around it:
> Instead of simply calling
>                 InputStream stream = url.openStream();
> you can open the stream without using a cache by saying
>                 URLConnection connection = url.openConnection();
>                 connection.setUseCaches(false);
>                 InputStream stream = connection.getInputStream();
> Olaf Fricke
> HanseMerkur Versicherungen

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira