Posted by jptech
on April 18, 2010 at 5:35 AM PDT
I'm having a problem that should be very easy to troubleshoot, but I just can't figure it out. I must be making a stupid mistake somewhere. I've tried setting the logging to finest for javax.enterprise.system.tools.deployment, but it doesn't seem to give me any extra info.
If someone can tell me how to get verbose logging when deploying an application I can figure this out on my own. If not, my configuration is below. Are there any obvious mistakes?
I have a a very simple EAR with the following structure:
-- /META-INF/*<br />
-- /lib/domain-1.0-SNAPSHOT.jar <<< POJO Module<br />
-- /lib/services-dao-api-1.0-SNAPSHOT.jar <<< POJO Module<br />
-- services-dao-1.0-SNAPSHOT.jar <<< EJB Module<br />
I have the following persistence.xml file in the META-INF directory of the domain-1.0-SNAPSHOT.jar module:
I try to inject the persistence unit in my EJB module like this (I've also tried it without giving a name):
@PersistenceUnit(name = "ItmaPU")<br />
private EntityManagerFactory emf;<br />
I let Maven generate my application.xml file. It looks like this:
<?xml version="1.0" encoding="UTF-8"?></p>
I don't have an ejb-jar.xml file.
Whenever I deploy I get the error:
Could not resolve a persistence unit corresponding to the persistence-unit-ref-name<br />
[ItmaPU] in scope of the module called<br />
My data source appears to be named correctly:
./asadmin list-jndi-entries<br />
itma-ds: org.glassfish.javaee.services.ResourceProxy<br />
I'm using Glassfish v3.1 built on April 16, 2010. I updated my config from something I used with Glassfish v2, so maybe I've overlooked something that changed between versions. I haven't added / removed any modules. My database connections are working.
Message was edited by: jptech