[
http://opensource.atlassian.com/projects/hibernate/browse/EJB-283?page=co...
]
Christian Schneider commented on EJB-283:
-----------------------------------------
I have just tested the trunk version of enitymanager with an eclipse rcp project. It seems
the jarvisitor still can not hanlde eclipse bundles.
The error message is: Unable to find file (ignored): bundleresource://33/
Sorry if this is off topic on this issue.
Here is my trace:
08.01.2008 03:24:50 org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing
org.springframework.context.support.ClassPathXmlApplicationContext@1567e6c: display name
[org.springframework.context.support.ClassPathXmlApplicationContext@1567e6c]; startup date
[Tue Jan 08 03:24:50 CET 2008]; root of context hierarchy
08.01.2008 03:24:51 org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [ApplicationContext.xml]
08.01.2008 03:24:51 org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [DbDAOContext.xml]
08.01.2008 03:24:51 org.springframework.context.support.AbstractApplicationContext
obtainFreshBeanFactory
INFO: Bean factory for application context
[org.springframework.context.support.ClassPathXmlApplicationContext@1567e6c]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@17aa2a8
08.01.2008 03:24:52 org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties
INFO: Loading properties file from class path resource [config.properties]
08.01.2008 03:24:52 org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties
INFO: Loading properties file from class path resource [db.properties]
08.01.2008 03:24:52 org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
INFO: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@17aa2a8: defining
beans
[configProps,soaRepository,dataSource,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.config.internalTransactionAdvisor,txManager,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,entityManagerFactory];
root of factory hierarchy
08.01.2008 03:24:52 org.springframework.jdbc.datasource.DriverManagerDataSource
setDriverClassName
INFO: Loaded JDBC driver: com.mysql.jdbc.Driver
08.01.2008 03:24:52 org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
createNativeEntityManagerFactory
INFO: Building JPA container EntityManagerFactory for persistence unit 'db'
08.01.2008 03:24:52 org.hibernate.cfg.annotations.Version <clinit>
INFO: Hibernate Annotations 3.3.0.GA
08.01.2008 03:24:52 org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.5
08.01.2008 03:24:53 org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
08.01.2008 03:24:53 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
08.01.2008 03:24:53 org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
08.01.2008 03:24:53 org.hibernate.ejb.Version <clinit>
INFO: Hibernate EntityManager 3.3.2.Beta1
08.01.2008 03:24:53 org.hibernate.ejb.Ejb3Configuration configure
INFO: Processing PersistenceUnitInfo [
name: db
...]
08.01.2008 03:24:53 org.hibernate.ejb.packaging.InputStreamZippedJarVisitor
doProcessElements
WARNUNG: Unable to find file (ignored): bundleresource://33/
java.io.FileNotFoundException:
D:\workspace32\net.enbw.etg.soa.repository.ui\target\classes\ (Das System kann den
angegebenen Pfad nicht finden)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at
org.eclipse.osgi.framework.util.SecureAction.getFileInputStream(SecureAction.java:124)
at
org.eclipse.osgi.baseadaptor.bundlefile.FileBundleEntry.getInputStream(FileBundleEntry.java:50)
at
org.eclipse.osgi.framework.internal.core.BundleURLConnection.connect(BundleURLConnection.java:53)
at
org.eclipse.osgi.framework.internal.core.BundleURLConnection.getInputStream(BundleURLConnection.java:99)
at java.net.URL.openStream(Unknown Source)
at
org.hibernate.ejb.packaging.InputStreamZippedJarVisitor.doProcessElements(InputStreamZippedJarVisitor.java:33)
at org.hibernate.ejb.packaging.JarVisitor.getMatchingEntries(JarVisitor.java:243)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:278)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:604)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:350)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
at
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:221)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:251)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:296)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:285)
at
org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:224)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findDefaultEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:494)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:464)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:589)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:560)
at
org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:123)
at
org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:61)
at
org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessAfterInstantiation(PersistenceAnnotationBeanPostProcessor.java:298)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:978)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
at java.security.AccessController.doPrivileged(Native Method)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:413)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76)
at net.enbw.etg.soa.repository.ui.Activator.start(Activator.java:44)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
at
org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:165)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
08.01.2008 03:24:53 org.hibernate.connection.ConnectionProviderFactory
newConnectionProvider
INFO: Initializing connection provider:
org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
08.01.2008 03:24:53 org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
configure
INFO: Using provided datasource
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: RDBMS: MySQL, version: 5.0.45-Debian_1ubuntu3.1-log
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.5 ( $Date:
2007-03-01 00:01:06 +0100 (Thu, 01 Mar 2007) $, $Revision: 6329 $ )
08.01.2008 03:24:54 org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
08.01.2008 03:24:54 org.hibernate.transaction.TransactionFactoryFactory
buildTransactionFactory
INFO: Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
08.01.2008 03:24:54 org.hibernate.transaction.TransactionManagerLookupFactory
getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or
transactional second-level cache is not recommended)
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch size: 15
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC batch updates for versioned data: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: enabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): enabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: auto
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL inserts for batching: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
08.01.2008 03:24:54 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: JPA-QL strict compliance: enabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
08.01.2008 03:24:54 org.hibernate.cfg.SettingsFactory buildSettings
INFO: Named query checking : enabled
08.01.2008 03:24:54 org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
08.01.2008 03:24:54 net.sf.ehcache.config.ConfigurationFactory parseConfiguration
WARNUNG: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in
the classpath: bundleresource://33/ehcache-failsafe.xml
08.01.2008 03:24:54 org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
08.01.2008 03:24:54 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: Running hbm2ddl schema update
08.01.2008 03:24:54 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: fetching database metadata
08.01.2008 03:24:55 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: updating schema
08.01.2008 03:24:55 org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: schema update complete
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@106ef07
excludeUnlistedClasses: false
JTA datasource: null
Non JTA datasource: org.springframework.jdbc.datasource.DriverManagerDataSource@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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira