myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gulyás István (JIRA) <myfaces-...@incubator.apache.org>
Subject [jira] Commented: (MYFACES-184) in init(); tmp file can not delete... myfaces 1.0.9 / throws javax.faces.FacesException: java.security.AccessControlException: access denied (java.io.FilePermission
Date Tue, 12 Apr 2005 16:40:52 GMT
     [ http://issues.apache.org/jira/browse/MYFACES-184?page=comments#action_62663 ]
     
Gulyás István commented on MYFACES-184:
---------------------------------------

if i delete all faces-config.xml from jars, it seems good.

> in init(); tmp file can not delete... myfaces 1.0.9 / throws javax.faces.FacesException:
java.security.AccessControlException: access denied (java.io.FilePermission
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>          Key: MYFACES-184
>          URL: http://issues.apache.org/jira/browse/MYFACES-184
>      Project: MyFaces
>         Type: Bug
>  Environment: dual HT xenon CPUs
> w2003server
> sunone 7.0.0_6
> j2ee 1.3
> j2se 1.4.2
> myfaces 1.0.9
>     Reporter: Gulyás István
>     Priority: Minor

>
> in FacesConfigurator.java(feedJarConfig 391) phrase 3
> tmp.delete() throws an AccessControlException.
> it seems tmp has not had ZipFile.OPEN_DELETE mode argument (ZipFile constructor check
it) or some process(native zipfile.close(long)?) access the tmp file.
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr: javax.faces.FacesException:
java.security.AccessControlException: access denied (java.io.FilePermission C:\WINDOWS\TEMP\myfaces21123.jar
delete)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.myfaces.config.FacesConfigurator.feedJarConfig(FacesConfigurator.java:399)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.myfaces.config.FacesConfigurator.feedJarFileConfigurations(FacesConfigurator.java:311)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:203)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:105)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:88)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3275)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.catalina.core.StandardContext.start(StandardContext.java:3595)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:345)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at org.apache.catalina.startup.Embedded.start(Embedded.java:957)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at com.iplanet.ias.web.WebContainer.start(WebContainer.java:426)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:514)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr:       at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:170)
> [12/Apr/2005:16:03:10] WARNING ( 1060): CORE3283: stderr: Caused by: java.security.AccessControlException:
access denied (java.io.FilePermission C:\WINDOWS\TEMP\myfaces21123.jar delete)
> .....
> source in FacesConfigurator.java(feedJarConfig 362) phrase 3:
>             if (found)
>             {
>                 tmp = File.createTempFile("myfaces", ".jar");
>                 in = _externalContext.getResourceAsStream(jarPath);
>                 FileOutputStream out = new FileOutputStream(tmp);
>                 byte[] buffer = new byte[4096];
>                 int r;
>                 while ((r = in.read(buffer)) != -1)
>                 {
>                     out.write(buffer, 0, r);
>                 }
>                 out.close();
>                 JarFile jarFile = new JarFile(tmp);
>                 try
>                 {
>                     JarEntry configFile = jarFile.getJarEntry("META-INF/faces-config.xml");
>                     if (configFile != null)
>                     {
>                         if (log.isDebugEnabled()) log.debug("faces-config.xml found in
jar " + jarPath);
>                         InputStream stream = jarFile.getInputStream(configFile);
>                         String systemId = "jar:" + tmp.toURL() + "!/" + configFile.getName();
>                         if (log.isInfoEnabled()) log.info("Reading config " + systemId);
>                         _dispenser.feed(_unmarshaller.getFacesConfig(stream, systemId));
>                     }
>                 } finally
>                 {
>                     jarFile.close();
>                     tmp.delete();
>                 }
>             } else
>             {
>                 if (log.isDebugEnabled()) log.debug("Jar " + jarPath + " contains no
faces-config.xml");
>             }
>         } catch (Exception e)
>         {
>             throw new FacesException(e);
>         }

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message