[ 
https://issues.apache.org/jira/browse/MYFACES-3580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407863#comment-13407863
 ] 

Daniel Stankiewicz commented on MYFACES-3580:
---------------------------------------------

The analysis of code and debug results show that:

1. The method _getAlternativeJarFile(URL) looks like this:
    private static JarFile _getAlternativeJarFile(URL url) throws IOException
    {
        String urlFile = url.getFile();

        // Trim off any suffix - which is prefixed by "!/" on Weblogic
        int separatorIndex = urlFile.indexOf("!/");

        // OK, didn't find that. Try the less safe "!", used on OC4J
        if (separatorIndex == -1)
        {
            separatorIndex = urlFile.indexOf('!');
        }

        if (separatorIndex != -1)
        {
            String jarFileUrl = urlFile.substring(0, separatorIndex);
            // And trim off any "file:" prefix.
            if (jarFileUrl.startsWith("file:"))
            {
                jarFileUrl = jarFileUrl.substring("file:".length());
            }
            // make sure this is a valid file system path by removing escaping 
of white-space characters, etc. 
            jarFileUrl = decodeFilesystemUrl(jarFileUrl);
            return new JarFile(jarFileUrl);
        }

        return null;
    }

2. The URL that causes FileNotFoundException is:
rar://C:/oracle/Middleware/user_projects/domains/ssr/servers/AdminServer/tmp/_WL_user/SSR-ear/wjq3g2/SSR-jca.rar!_connectorModule.jar!/META-INF/MANIFEST.MF

Note that this path contains both ! and !/ separators. The above code finds the 
second of them and doesn't look for the first one, so it only cuts 
!/META-INF/MANIFEST.MF part. Then constructor of JarFile passed a path with ! 
character causes FileNotFoundException.
                
> Searching for JAR in RAR by facelets Claspath util causes 
> FileNotFoundException
> -------------------------------------------------------------------------------
>
>                 Key: MYFACES-3580
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3580
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.13
>         Environment: Oracle Weblogic 10.3.5
> Apache MyFaces 2.0.13
>            Reporter: Daniel Stankiewicz
>            Priority: Critical
>
> We have an EAR which contains a WAR and a RAR (Resource Adapter). The RAR 
> archive contains a JAR with Resource Adapter classes.
> The problem is that trying to deploy such an EAR in Weblogic 10.3.5 causes a 
> FileNotFoundException to be thrown.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to