You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Pierre V (JIRA)" <ji...@apache.org> on 2010/10/13 17:17:10 UTC

[jira] Created: (OPENEJB-1371) Bad peristence unit URL format with Hibernate 3.5.5

Bad peristence unit URL format with Hibernate 3.5.5
---------------------------------------------------

                 Key: OPENEJB-1371
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
             Project: OpenEJB
          Issue Type: Bug
          Components: deployment
    Affects Versions: (trunk/openejb3)
         Environment: Win xp + Hibernate 3.5.5 Final
            Reporter: Pierre V
            Priority: Blocker


With spaces in persistence units paths, the generated URLs cannot be used by hibernate.

In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Updated: (OPENEJB-1371) Bad persistence unit URL format with Hibernate 3.5.5

Posted by "Francis De Brabandere (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Francis De Brabandere updated OPENEJB-1371:
-------------------------------------------

    Affects Version/s: 3.1.3

> Bad persistence unit URL format with Hibernate 3.5.5
> ----------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: (trunk/openejb3), 3.1.3
>         Environment: Win xp + Hibernate 3.5.5 Final
>            Reporter: Pierre V
>            Priority: Blocker
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Updated: (OPENEJB-1371) Bad persistence unit URL format with Hibernate 3.5.5

Posted by "Pierre V (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre V updated OPENEJB-1371:
------------------------------

    Summary: Bad persistence unit URL format with Hibernate 3.5.5  (was: Bad peristence unit URL format with Hibernate 3.5.5)

> Bad persistence unit URL format with Hibernate 3.5.5
> ----------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: (trunk/openejb3)
>         Environment: Win xp + Hibernate 3.5.5 Final
>            Reporter: Pierre V
>            Priority: Blocker
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Updated: (OPENEJB-1371) Bad persistence unit URL format with Hibernate 3.5.5

Posted by "Francis De Brabandere (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Francis De Brabandere updated OPENEJB-1371:
-------------------------------------------

    Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga  (was: Win xp + Hibernate 3.5.5 Final)

> Bad persistence unit URL format with Hibernate 3.5.5
> ----------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: (trunk/openejb3), 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Priority: Blocker
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Updated: (OPENEJB-1371) Invalid persistence unit URL on a path with spaces using Hibernate

Posted by "Francis De Brabandere (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Francis De Brabandere updated OPENEJB-1371:
-------------------------------------------

    Summary: Invalid persistence unit URL on a path with spaces using Hibernate  (was: Bad persistence unit URL format with Hibernate 3.5.5)

> Invalid persistence unit URL on a path with spaces using Hibernate
> ------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: (trunk/openejb3), 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Priority: Blocker
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Commented: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924752#action_12924752 ] 

David Blevins commented on OPENEJB-1371:
----------------------------------------

I'm hoping we can do a 3.1.4 if not this week, then definitely next.

Not sure what the deal is with that and other file.  Every single time we do a an 'svn merge' command that and this other file get their svn properties changed.  You'd think it'd do it just once then be done, but every time.  Haven't spent any time investigating, but It's very annoying.


> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Commented: (OPENEJB-1371) Bad persistence unit URL format with Hibernate 3.5.5

Posted by "Francis De Brabandere (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923810#action_12923810 ] 

Francis De Brabandere commented on OPENEJB-1371:
------------------------------------------------

We have this issue with the newly released 3.1.3 version and hibernate 3.2.6.ga (entitymanager 3.3.2.GA)

the path used /home/foo/hudson/workspace/Event Service/trunk/events.beans gives a: 
WARN - Unable to find file (ignored): file:/home/foo/hudson/workspace/Event%2520Service/trunk/events.beans/target/classes
and afterwards fails the build because of classes that can not be found

Full log from the hudson server

Apache OpenEJB 3.1.3    build: 20101015-05:42
http://openejb.apache.org/
INFO - openejb.home = /home/foo/hudson/workspace/Event Service/trunk/events.beans
INFO - openejb.base = /home/foo/hudson/workspace/Event Service/trunk/events.beans
INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
INFO - Configuring Service(id=OracleDS, type=Resource, provider-id=Default JDBC Database)
INFO - Found PersistenceModule in classpath: /home/foo/hudson/workspace/Event Service/trunk/events.beans/target/classes
INFO - Beginning load: /home/foo/hudson/workspace/Event Service/trunk/events.beans/target/classes
INFO - Configuring enterprise application: classpath.ear
INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default Stateless Container)
INFO - Auto-creating a container for bean EventServiceRegistrationServiceBean: Container(type=STATELESS, id=Default Stateless Container)
INFO - Configuring PersistenceUnit(name=event-service, provider=org.hibernate.ejb.HibernatePersistence)
INFO - Auto-creating a Resource with id 'OracleDSNonJta' of type 'DataSource for 'event-service'.
INFO - Configuring Service(id=OracleDSNonJta, type=Resource, provider-id=OracleDS)
INFO - Adjusting PersistenceUnit event-service <jta-data-source> to Resource ID 'OracleDS' from 'java:/OracleDS'
INFO - Adjusting PersistenceUnit event-service <non-jta-data-source> to Resource ID 'OracleDSNonJta' from 'null'
INFO - Enterprise application "classpath.ear" loaded.
INFO - Assembling app: classpath.ear
WARN - Unable to find file (ignored): file:/home/foo/hudson/workspace/Event%2520Service/trunk/events.beans/target/classes
java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
	at java.util.jar.JarFile.<init>(JarFile.java:135)
	at java.util.jar.JarFile.<init>(JarFile.java:72)
	at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:46)
	at org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:139)
	at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:287)
	at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:614)
	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:360)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
	at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:185)
	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:490)
	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:450)
	at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:368)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:280)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:125)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:60)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:271)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:250)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


These are our hibernate dependencies:

[INFO] +- org.hibernate:hibernate-entitymanager:jar:3.3.2.GA:test
[INFO] |  +- org.hibernate:hibernate:jar:3.2.6.ga:test
[INFO] |  |  +- net.sf.ehcache:ehcache:jar:1.2.3:test
[INFO] |  |  +- asm:asm-attrs:jar:1.5.3:test
[INFO] |  |  +- dom4j:dom4j:jar:1.6.1:test
[INFO] |  |  +- antlr:antlr:jar:2.7.6:test
[INFO] |  |  +- cglib:cglib:jar:2.1_3:test
[INFO] |  |  +- asm:asm:jar:1.5.3:test
[INFO] |  |  \- commons-collections:commons-collections:jar:2.1.1:test
[INFO] |  +- org.hibernate:hibernate-annotations:jar:3.3.1.GA:test
[INFO] |  +- org.hibernate:hibernate-commons-annotations:jar:3.0.0.ga:test
[INFO] |  +- org.hibernate:ejb3-persistence:jar:1.0.1.GA:test
[INFO] |  \- javassist:javassist:jar:3.4.GA:test


> Bad persistence unit URL format with Hibernate 3.5.5
> ----------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: (trunk/openejb3), 3.1.3
>         Environment: Win xp + Hibernate 3.5.5 Final
>            Reporter: Pierre V
>            Priority: Blocker
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Updated: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins updated OPENEJB-1371:
-----------------------------------

    Affects Version/s:     (was: (trunk/openejb3))
        Fix Version/s: 3.1.4
             Assignee: David Blevins
              Summary: Double encoding of persistence-unit root-url leads to issues in paths with spaces  (was: Invalid persistence unit URL on a path with spaces using Hibernate)

Found the issue.  Stems from an extra line added to ensure that the path was properly encoded when creating a URL.  The issue was that the path was already properly encoded.  So "/tmp/my%20path/" which is already properly encoded, was again encoded so the "%" turned into "%25" resulting in "/tmp/my%2520path/".  The issue only affected persistence units.

Checking in a fix shortly.

> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Commented: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "Pierre V (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929635#action_12929635 ] 

Pierre V commented on OPENEJB-1371:
-----------------------------------

I just have reverted to r1025514. The problem do not exist in this revision.

> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Commented: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "Francis De Brabandere (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924548#action_12924548 ] 

Francis De Brabandere commented on OPENEJB-1371:
------------------------------------------------

was the test updated to check for this issue?

Jira points to a modified test class but nothing seems to be changed for that class
MODIFY /openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/config/BusinessInterfacesTest.java 

> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Commented: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "Francis De Brabandere (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924288#action_12924288 ] 

Francis De Brabandere commented on OPENEJB-1371:
------------------------------------------------

Thanks for fixing this, I'll try the snapshot on monday. I hope 3.1.4 won't take as long as 3.1.3 to be released.

> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Commented: (OPENEJB-1371) Invalid persistence unit URL on a path with spaces using Hibernate

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924003#action_12924003 ] 

David Blevins commented on OPENEJB-1371:
----------------------------------------

Still looking into this one.  Note that this was caught and fixed as far back as the 3.0 betas:

  https://issues.apache.org/jira/browse/OPENEJB-767

But seems to have been re-introduced some time after 3.1.2 with this related issue:

  https://issues.apache.org/jira/browse/OPENEJB-1252


Note that string.replaceAll("%20"," ") doesn't go far enough to fully decode an encoded URL.  We were using URLDecoder from 3.0 to 3.1.2, but that is deprecated and fails to properly handle "+" character that OSX likes to add to temp files. Those get improperly decoded as a space.


> Invalid persistence unit URL on a path with spaces using Hibernate
> ------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: (trunk/openejb3), 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Priority: Blocker
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Closed: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "David Blevins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins closed OPENEJB-1371.
----------------------------------

    Resolution: Fixed

Fixed and 3.1.4-SNAPSHOT published to https://repository.apache.org/content/repositories/snapshots

> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Commented: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "Francis De Brabandere (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924545#action_12924545 ] 

Francis De Brabandere commented on OPENEJB-1371:
------------------------------------------------

I can confirm this is fixed with the 3.1.4-SNAPSHOT

> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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


[jira] Reopened: (OPENEJB-1371) Double encoding of persistence-unit root-url leads to issues in paths with spaces

Posted by "Pierre V (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENEJB-1371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pierre V reopened OPENEJB-1371:
-------------------------------


I have updated from latest trunk today. URL formating is now OK but hibernate cannot handle exploded persistence units anymore. 
Persistence units packed in jars work fine. 
The problem did not exist with previous revisions


17:16:11,203 [main] WARN  FileZippedJarVisitor - Unable to find file (ignored): file:/C:/Documents%20and%20Settings/user/Mes%20documents/devMaven/finances/finances-entities/target/classes/META-INF/persistence.xml
java.util.zip.ZipException: error in opening zip file
	at java.util.zip.ZipFile.open(Native Method)
	at java.util.zip.ZipFile.<init>(ZipFile.java:114)
	at java.util.jar.JarFile.<init>(JarFile.java:133)
	at java.util.jar.JarFile.<init>(JarFile.java:70)
	at org.hibernate.ejb.packaging.FileZippedJarVisitor.doProcessElements(FileZippedJarVisitor.java:65)
	at org.hibernate.ejb.packaging.AbstractJarVisitor.getMatchingEntries(AbstractJarVisitor.java:146)
	at org.hibernate.ejb.packaging.NativeScanner.getClassesInJar(NativeScanner.java:128)
	at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:475)
	at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:836)
	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:590)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
	at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:202)
	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:520)
	at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:461)
	at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:371)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:283)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:130)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:63)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:276)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
	at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
	at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
	at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
	at javax.naming.InitialContext.init(InitialContext.java:223)
	at javax.naming.InitialContext.<init>(InitialContext.java:197)
	at chabbeville.commontools.openejb.OpenEjbBoostrap.startServer(OpenEjbBoostrap.java:88)
	at chabbeville.commontools.scalatools.ProcessEltsGuiLauncher.setupOpenEjbInitialCtxt(ProcessEltsGuiLauncher.scala:81)
	at chabbeville.commontools.scalatools.ProcessEltsGuiLauncher.launch(ProcessEltsGuiLauncher.scala:26)
	at chabbeville.finances.tools.FinanceToolsLauncher$.main(FinanceToolsLauncher.scala:68)
	at chabbeville.finances.tools.FinanceToolsLauncher.main(FinanceToolsLauncher.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:75)

> Double encoding of persistence-unit root-url leads to issues in paths with spaces
> ---------------------------------------------------------------------------------
>
>                 Key: OPENEJB-1371
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1371
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 3.1.3
>         Environment: Win xp / Linux + Hibernate 3.5.5 Final / Hibernate 3.2.6.ga
>            Reporter: Pierre V
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.1.4
>
>
> With spaces in persistence units paths, the generated URLs cannot be used by hibernate.
> In PersistenceUnitInfoImpl#setRootUrlAndJarUrls, the persistenceUnitRootUrl param seems to have already been formated. The problem is fixed with 
> File root = new File(persistenceUnitRootUrl.replaceAll("%20"," "));

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