[EJB 3.0 Users] - 5.1 - @PersistenceUnit fails to resolve in Servlet when EJB
by genman
JBoss AS 5.1
Servlet code:
public class Servlet extends HttpServlet {
|
| @PersistenceUnit
| private EntityManagerFactory emf;
|
|
I created a persistence.xml file and included it a separate EJB .jar file in a .ear file. Things were working fine until I added some EJBs in the persistence.xml containing .jar, and this error started coming up:
| 11:34:43,802 ERROR [StandardContext] Context [/mlp] startup failed due to previous errors
| java.lang.IllegalArgumentException: Container org.jboss.web.tomcat.service.TomcatInjectionContainer@1662fdd failed to resolve persistence unit null
| at org.jboss.injection.PersistenceUnitHandler.addPUDependency(PersistenceUnitHandler.java:135)
| at org.jboss.injection.PersistenceUnitHandler.loadXml(PersistenceUnitHandler.java:75)
|
Is there some reason the persistence unit is "lost" when EJBs are declared within the same .jar file?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256063#4256063
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256063
16 years, 9 months
[JBoss Tools Users] - how to get xx.pages.xml files to auto reload...
by deanhiller
I find myself needing to restart the server every time I change xxx.pages.xml files even though I read that jboss tools supports hot redeploy of those files. How do I configure jboss so that seam reloads just the pages files(and hopefully not the entire app)???
Also, I read about the dev directory and deployment to that dir causes seam to reload in just the changed components(including annotations), BUT if I do that, won't tomcat then redeploy the entire app. This sounds like it defeats the purpose as tomcat redeploys the entire app on every class file change unless you set up the context.xml file but then your files are not copied to the target dirs. ie. how to configure this as well even though, it is very annoying that it has to be a dev dir....would be much nicer if the components.xml had a configure option I could turn on and off instead(that is probably more a seam forum question I guess though).
thanks,
Dean
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4256060#4256060
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4256060
16 years, 9 months