[jboss-user] [EJB 3.0] - Deployment problems - persistence unit could not be created

dgdwinte do-not-reply at jboss.com
Sun Jul 15 09:46:02 EDT 2007


Hi all,

being new to JBoss, i have some problems deploying my first EJB 3.0 entity-and session-beans. While trying to deploy my ear-package, containing an EJB-jar package with the entity-beans, I get the following error-message in the debug output (JBoss-4.2.0-GA): 

2007-07-15 15:23:08,406 INFO  [org.jboss.ejb3.entity.PersistenceUnitDeployment] Starting persistence unit persistence.units:ear=texaco_deploy-1.0-SNAPSHOT.ear,jar=texaco_model-1.0-SNAPSHOT.ejb3.jar,unitName=texaco
2007-07-15 15:23:08,421 DEBUG [org.jboss.ejb3.entity.PersistenceUnitDeployment] Found persistence.xml file in EJB3 jar
2007-07-15 15:23:08,453 INFO  [org.hibernate.ejb.Version] Hibernate EntityManager 3.2.1.GA
2007-07-15 15:23:08,484 INFO  [org.hibernate.cfg.annotations.Version] Hibernate Annotations 3.2.1.GA
2007-07-15 15:23:08,484 INFO  [org.hibernate.cfg.Environment] Hibernate 3.2.3
2007-07-15 15:23:08,500 INFO  [org.hibernate.cfg.Environment] hibernate.properties not found
2007-07-15 15:23:08,500 INFO  [org.hibernate.cfg.Environment] Bytecode provider name : javassist
2007-07-15 15:23:08,500 INFO  [org.hibernate.cfg.Environment] using JDK 1.4 java.sql.Timestamp handling
2007-07-15 15:23:08,656 DEBUG [org.hibernate.ejb.Ejb3Configuration] Processing PersistenceUnitInfo [
	name: texaco
	persistence provider classname: org.hibernate.ejb.HibernatePersistence
	classloader: org.jboss.mx.loading.UnifiedClassLoader3 at 72edc{ url=file:/D:/Texaco/Texaco_programmatuur/jboss-4.2.0.GA/server/default/tmp/deploy/tmp21839texaco_deploy-1.0-SNAPSHOT.ear ,addedOrder=43}
	Temporary classloader: null
	excludeUnlistedClasses: false
	JTA datasource: org.jboss.resource.adapter.jdbc.WrapperDataSource at 1046270
	Non JTA datasource: null
	Transaction type: JTA
	PU root URL: file:/D:/Texaco/Texaco_programmatuur/jboss-4.2.0.GA/server/default/tmp/deploy/tmp21839texaco_deploy-1.0-SNAPSHOT.ear-contents/texaco_model-1.0-SNAPSHOT.ejb3
	Jar files URLs []
	Managed classes names [
		be.erpsystem.texaco.Article]
	Mapping files names []
	Properties [
		hibernate.jndi.java.naming.factory.url.pkgs: org.jboss.naming:org.jnp.interfaces
		hibernate.cache.provider_class: org.hibernate.cache.HashtableCacheProvider
		hibernate.jndi.java.naming.factory.initial: org.jnp.interfaces.NamingContextFactory
		hibernate.transaction.manager_lookup_class: org.hibernate.transaction.JBossTransactionManagerLookup
		hibernate.jacc.ctx.id: texaco_model-1.0-SNAPSHOT.ejb3
		hibernate.cache.region_prefix: texaco_deploy-1_0-SNAPSHOT_ear,texaco_model-1_0-SNAPSHOT_ejb3_jar,texaco
		hibernate.session_factory_name: persistence.units:ear=texaco_deploy-1.0-SNAPSHOT.ear,jar=texaco_model-1.0-SNAPSHOT.ejb3.jar,unitName=texaco
		hibernate.bytecode.use_reflection_optimizer: false
		hibernate.bytecode.provider: javassist]
2007-07-15 15:23:08,656 DEBUG [org.hibernate.ejb.Ejb3Configuration] Detect class: true; detect hbm: true
2007-07-15 15:23:08,656 DEBUG [org.hibernate.ejb.Ejb3Configuration] Detect class: true; detect hbm: true
2007-07-15 15:23:08,656 INFO  [org.hibernate.ejb.Ejb3Configuration] found EJB3 Entity bean: be.erpsystem.texaco.articles.Article
2007-07-15 15:23:08,671 WARN  [org.hibernate.ejb.Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
2007-07-15 15:23:08,671 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=texaco_deploy-1.0-SNAPSHOT.ear,jar=texaco_model-1.0-SNAPSHOT.ejb3.jar,unitName=texaco
javax.persistence.PersistenceException: [PersistenceUnit: texaco] class or package not found
	at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1089)

In the EJB-jar file, the following persistence.xml can be found in META-INF directory: 


   <persistence-unit name="texaco">
       <jta-data-source>java:TexacoDS</jta-data-source>
       be.erpsystem.texaco.Article
   </persistence-unit>


It seams impossible to create the EntityManager. However, the datasource is correct. 

2007-07-15 15:23:08,390 DEBUG [org.jboss.system.ServiceController] starting service jboss.j2ee:service=EJB3,module=texaco_model-1.0-SNAPSHOT.ejb3
2007-07-15 15:23:08,390 DEBUG [org.jboss.ejb3.Ejb3Module] Starting jboss.j2ee:service=EJB3,module=texaco_model-1.0-SNAPSHOT.ejb3
2007-07-15 15:23:08,390 INFO  [org.jboss.ejb3.JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.entity.PersistenceUnitDeployment
2007-07-15 15:23:08,406 INFO  [org.jboss.ejb3.JmxKernelAbstraction] installing MBean: persistence.units:ear=texaco_deploy-1.0-SNAPSHOT.ear,jar=texaco_model-1.0-SNAPSHOT.ejb3.jar,unitName=texaco with dependencies:
2007-07-15 15:23:08,406 INFO  [org.jboss.ejb3.JmxKernelAbstraction] 	jboss.jca:name=TexacoDS,service=DataSourceBinding

Can anyone clarify the error-messages above, because I cannot find any relevant information on the web. 

Thanks,
Davy 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4064308#4064308

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4064308



More information about the jboss-user mailing list