Hi,
I've tried to execute my unit tests with Maven an Maven 2.0.6 and
Hibernate EntityManager and got problems.
I have two projects (project1 and project2). Project1 depends on project2.
It seems, for some reason, Maven doesn't find classes at
*target/classes*. So, EntityManager doesn't detect these classes.
When I copy project1 and project2 classes to *target/test-classes* it
works fine.
Am I doing something wrong?
I get an *org.hibernate.MappingException: Unknown entity:
com.xpto.empresa.model.Empresa exception*
EntityManager's log:
13:58:52,796 INFO Version:15 - Hibernate EntityManager 3.2.1.GA
13:58:52,828 INFO Version:15 - Hibernate Annotations 3.2.1.GA
13:58:52,843 INFO Environment:509 - Hibernate 3.2.3
13:58:52,859 INFO Environment:542 - hibernate.properties not found
13:58:52,859 INFO Environment:676 - Bytecode provider name : cglib
13:58:52,875 INFO Environment:593 - using JDK 1.4 java.sql.Timestamp
handling
13:58:53,015 DEBUG Ejb3Configuration:199 - Look up for persistence unit:
empire
13:58:53,093 DEBUG DTDEntityResolver:38 - trying to resolve system-id
[http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd]
13:58:53,093 DEBUG EJB3DTDEntityResolver:49 - recognized EJB3 ORM
namespace; attempting to resolve on classpath under org/hibernate/ejb
13:58:53,093 DEBUG EJB3DTDEntityResolver:58 - located
[http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd] in classpath
13:58:53,171 DEBUG Ejb3Configuration:544 - Detect class: true; detect
hbm: false
*13:58:53,187 DEBUG JarVisitor:206 - Searching mapped entities in
jar/par: file:/C:/workspace/empire/EmpresaEJB/target/test-classes
13:58:53,187 DEBUG JarVisitor:246 - Filtering: com.xpto.EmpresaTest
13:58:53,234 DEBUG Ejb3Configuration:544 - Detect class: true; detect
hbm: false
13:58:53,234 DEBUG JarVisitor:206 - Searching mapped entities in
jar/par: file:Agenda-1.0-SNAPSHOT.jar
13:58:53,234 WARN ExplodedJarVisitor:38 - Exploded jar does not exists
(ignored): file:Agenda-1.0-SNAPSHOT.jar*
Thanks for any help.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]