-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: PersistenceException - Illegal Character in path
PostPosted: Thu Feb 08, 2007 11:40 am 
Beginner
Beginner

Joined: Fri Jan 26, 2007 3:16 pm
Posts: 24
Hi, we use Apache Maven 2.04 http://maven.apache.org for our java build environment. Maven handles dependency management by downloading jar's your project needs and storing them in a local directory that is added to your classpath. By default, on Windows, this is C:\Documents and Settings\(username)\.m2\repository

One of the jar's we develop has a META-INF\persistence.xml -- when we try to execute some code to instantiate a new Entity Manager, it has a problem with whitespace in the local file URL (see stacktrace below).

This seems to be a problem with the classloader. In Eclipse, this problem does not occur (even though in Eclipse the path still points to the same jar). Executing from the cmd line (e.g. running mvn test) generates this exception.

There are quick / hack workarounds -- like moving our local maven repo to not have whitespace, but I'm curious if there is any other solution to this issue?

Thx in advance,
Davis

Hibernate version:
Hibernate Core 3.2.2 ga
Hibernate Annotations 3.2.1 ga
Hibernate Entity Manager 3.2.1 ga

Full stack trace of any exception that occurs:
javax.persistence.PersistenceException: java.lang.IllegalArgumentException: Unable to visit JAR file:/C:/Documents and Settings/ianbro/.m2/repository/com/teleatlas/global/orm-tracer/orm-tracer/1.0-SNAPSHOT/orm-tracer-1.0-SNAPSHOT.jar. Cause: Illegal character in path at index 18: file:/C:/Documents and Settings/ianbro/.m2/repository/com/teleatlas/global/orm-tracer/orm-tracer/1.0-SNAPSHOT/orm-tracer-1.0-SNAPSHOT.jar

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:83)

at com.teleatlas.global.orm.util.HibernateUtil.getEntityManager(HibernateUtil.java:89)

at com.teleatlas.global.orm.query.impl.DataProviderImpl.<init>(DataProviderImpl.java:71)

at com.teleatlas.global.orm.query.DataProviderFactory.getDataProvider(DataProviderFactory.java:41)

at com.teleatlas.global.edit.viewereditor.mapcomponents.orm.OrmRoadElementMapFeatureDataIntegration.loadRealFeatures(OrmRoadElementMapFeatureDataIntegration.java:97)

at com.teleatlas.global.edit.viewereditor.mapcomponents.orm.OrmRoadElementMapFeatureDataIntegration.testFetchFunctionalRoadClass(OrmRoadElementMapFeatureDataIntegration.java:129)


Name and version of the database you are using:
Oracle 10.2 g


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.