tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manu T George (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENEJB-467) Lookup of EntityManagerFactories failing in Windows
Date Sat, 03 Feb 2007 17:59:05 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469967
] 

Manu T George commented on OPENEJB-467:
---------------------------------------

After investigating a bit more I think a better way will be to modify the ReadDescriptors
class to not strip off the ending / from the URI. Then do new File(path).toURI().getPath()
 to look it up

> Lookup of EntityManagerFactories failing in Windows
> ---------------------------------------------------
>
>                 Key: OPENEJB-467
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-467
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: ejb3 simplified
>    Affects Versions: 3.0
>         Environment: Windows
>            Reporter: Manu T George
>             Fix For: 3.0
>
>
> Lookup of EntityManagerFactories failing in Windows. this is because during lookup based
on Jar path we use windows style path but during storing we use a URI. Converting the path
to a URI seems to add a / at the end. So the patch uses a method of the form
>  private String normalizePath(String path){
>         char[] carray = path.toCharArray();
>         for(int i=0;i<carray.length;i++){
>             if(carray[i] == '\\'){
>                 carray[i] = '/';
>             }                
>         }
>         return "/" + new String(carray);
>     }
> to convert the path to the same form. new File(path).toURI().getPath() adding a / at
the end and so lookup fails with this issue. I amnot sure why initially / is not coming in
the end on getting jarURI
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message