[hibernate-issues] [Hibernate-JIRA] Created: (EJB-283) Ejb3Configuration can't read Jar file OC4J

Roman Legat (JIRA) noreply at atlassian.com
Sun Apr 1 17:18:04 EDT 2007


Ejb3Configuration can't read Jar file OC4J 
-------------------------------------------

                 Key: EJB-283
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-283
             Project: Hibernate Entity Manager
          Issue Type: Bug
          Components: EntityManager
    Affects Versions: 3.3.1.GA
         Environment: EM 3.3.1.GA,
Core 3.2.0 GA
            Reporter: Roman Legat
            Priority: Minor


The "Find-the-entities-yourself"-Feature doesn't work with OC4J, since walking over the jar fails.

This is similar to #174, but the problem is not in JarVisitor, but in 
org.jboss.util.file.ArchiveBrowser.getBrowser:

When deploying to OC4J, the Jar URLs start with "code-source" instead of "file"
(See PU root URL below for example).
Hence the Archive-Browser throws a RuntimeException.
Solution should be similar as in #174.


2007-04-01 22:13:38,390 DEBUG Ejb3Configuration - Processing PersistenceUnitInfo [
	name: MyService
	persistence provider classname: org.hibernate.ejb.HibernatePersistence
	classloader: mis_client.web.mis_client:0.0.0
	Temporary classloader: org.springframework.instrument.classloading.SimpleThrowawayClassLoader at 106ef07
	excludeUnlistedClasses: false
	JTA datasource: null
	Non JTA datasource: org.springframework.jdbc.datasource.DriverManagerDataSource at 36eb76
	Transaction type: RESOURCE_LOCAL
	PU root URL: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
	Jar files URLs []
	Managed classes names []
	Mapping files names []
	Properties []
 
java.lang.RuntimeException: error trying to scan <jar-file>: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
	at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:635)
	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
...

Caused by: java.lang.RuntimeException: Archive browser cannot handle protocol: code-source:/C:/Programs/dev/oracle/jdev-10132/j2ee/home/applications/mis_client/mis_client/WEB-INF/lib/mis_model.jar!/
	at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:93)

Regards,
Roman




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list