[jboss-user] [EJB 3.0] - Re: Deployment problems - persistence unit could not be crea

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


I'm sorry, I've pushed too fast on the button "submit" making an unclear post: 

the main problem is thus: 


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

The persistence-unit defined in persistence.xml cannot be found. The
following annotation in my session-bean causes the problem: 

 
  | import javax.persistence.EntityManager; 
  | import javax.persistence.PersistenceContext; 
  | 
  | @Stateless 
  | public class ArticleManager implements ArticleManagerRemote, ArticleManagerLocal {
  | 	@PersistenceContext (unitName="texaco")	EntityManager em; 
  | 
causing the problem. 

The persistence.xml-file is read correctly and the binding to the (MySQL) datasource works fine. The persistence.xml looks as follows: 


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

Thanks again and sorry for the bad post. 

Davy. 

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

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



More information about the jboss-user mailing list