  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - Re: Deployment problems - persistence unit could not be | - Re: Deployment problems - persistence unit could not be 2007-07-15 - By dgdwinte
Back 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 (See http://loy-1.ora-code.com).0-SNAPSHOT.ear,jar=texaco _model-1 (See http://del-1.ora-code.com).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; | | @(protected) | public class ArticleManager implements ArticleManagerRemote, ArticleManagerLocal { | @(protected) (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 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |