History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: EJB-308
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Emmanuel Bernard
Reporter: Max Rydahl Andersen
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Hibernate Entity Manager

Space in path result in error during deployment in JBoss AS

Created: 09/Aug/07 10:29 AM   Updated: 08/Feb/08 01:06 PM
Component/s: EntityManager
Affects Version/s: 3.2.1
Fix Version/s: 3.3.2.Beta1

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: both linux and windows, JBoss EAP 4.2 or JBoss 4.2
Issue Links:
Relates
This issue relates to:
EJB-334 Space in path result in error during ... Major Resolved
EJB-244 JarVisitor fails on exploded archives... Major Resolved
This issue relates to:
EJB-333 Space in path result in error during ... Major Resolved


 Description  « Hide
16:38:05,991 ERROR [[/test]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
javax.persistence.PersistenceException: java.lang.IllegalArgumentException: Unable to visit JAR file:/home/max/rh devstudio/jboss-eap/jboss-as/server/default/deploy/test.war/WEB-INF/classes. Cause: Illegal character in path at index 17: file:/home/max/rh devstudio/jboss-eap/jboss-as/server/default/deploy/test.war/WEB-INF/classes
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:252)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at org.jboss.seam.core.EntityManagerFactory.startup(EntityManagerFactory.java:74)

When testing JBoss EAP 4.2 with RHDS I we created http://jira.jboss.org/jira/browse/JBIDE-691

and this is with Hibernate Annotations 3.2.1 which should have this one fixed according what i could find (i'll link to it)


 All   Comments   Work Log   Change History   FishEye      Sort Order:
Max Rydahl Andersen - [09/Aug/07 10:30 AM ]
note that nothing special is done - just that jboss AS install has a space in the name.

Emmanuel Bernard - [09/Aug/07 02:52 PM ]
Apparently JBoss AS CL messes up with URLs returned by getResources() (as opposed to the regular SE classloader).

Emmanuel Bernard - [09/Aug/07 02:55 PM ]
I think it's fixed
Your Caused By should be

Caused by: java.lang.IllegalArgumentException: Unable to visit JAR file:/Applications/jb oss/jboss-4.2.0.GA/server/default/deploy/myproject.war/WEB-INF/classes. Cause: Illegal character in path at index 21: file:/Applications/jb oss/jboss-4.2.0.GA/server/default/deploy/myproject.war/WEB-INF/classes
        at org.hibernate.ejb.packaging.JarVisitor.getVisitor(JarVisitor.java:100)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:226)
        ... 153 more

Lukasz Hall - [08/Feb/08 12:55 PM ]
The space issue appears to still be present in the latest release.

Using the latest build (EntityManager 3.3.2Beta3, run against JBoss 4.2.0), the relevant portions of the stack trace are:

java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Program Files/JBoss/lh3_d_jb_420/jboss-as/server/production/tmp/deploy/tmp31846Archive-PerformanceTestDriver.sar-contents/Archive-PerformanceTestData.jar
        at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:616)
        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:359)
....
Caused by: java.lang.IllegalArgumentException: Unable to visit JAR file:/C:/Program Files/JBoss/lh3_d_jb_420/jboss-as/server/production/tmp/deploy/tmp31846Archive-PerformanceTestDriver.sar-contents/Archive-PerformanceTestData.jar. Cause: Illegal character in path at index 16: file:/C:/Program Files/JBoss/lh3_d_jb_420/jboss-as/server/production/tmp/deploy/tmp31846Archive-PerformanceTestDriver.sar-contents/Archive-PerformanceTestData.jar
        at org.hibernate.ejb.packaging.JarVisitorFactory.getVisitor(JarVisitorFactory.java:113)
....
Caused by: java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Program Files/JBoss/lh3_d_jb_420/jboss-as/server/production/tmp/deploy/tmp31846Archive-PerformanceTestDriver.sar-contents/Archive-PerformanceTestData.jar
        at java.net.URI$Parser.fail(URI.java:2816)
        at java.net.URI$Parser.checkChars(URI.java:2989)
        at java.net.URI$Parser.parseHierarchical(URI.java:3073)
        at java.net.URI$Parser.parse(URI.java:3021)
        at java.net.URI.<init>(URI.java:578)
        at java.net.URL.toURI(URL.java:916)
        at org.hibernate.ejb.packaging.JarVisitorFactory.getVisitor(JarVisitorFactory.java:110)
.....




Emmanuel Bernard - [08/Feb/08 01:06 PM ]
I've opened a new JIRA issue to track this one down.