Results 1 to 2 of 2
- 11-30-2009, 04:20 PM #1
Member
- Join Date
- Oct 2008
- Posts
- 16
- Rep Power
- 0
Name persistence is not bound in this Context
Hello, I have a problem with implementation WebApplication with JPA.
Servlet is in the attachment...
Exception is:
java.lang.RuntimeException: javax.naming.NameNotFoundException: Name persistence is not bound in this Context
web.EplDetails.findByID(EplDetails.java:126)
web.EplDetails.processRequest(EplDetails.java:58)
web.EplDetails.doGet(EplDetails.java:84)
javax.servlet.http.HttpServlet.service(HttpServlet .java:627)
javax.servlet.http.HttpServlet.service(HttpServlet .java:729)
Can anybody help me with it???
Thanks.
- 12-15-2009, 10:01 PM #2
Senior Member
- Join Date
- Dec 2009
- Location
- Belgrade, Serbia
- Posts
- 364
- Rep Power
- 4
I don't use approach with JNDI and Context
but if you use Eclipse i can post a simple manual
how to create entities from tables,
get persistence.xml file with tag:
<persistence-unit name="JPA1">
and then just simply call it from your code:
....
EntityManagerFactory emf = Persistence.createEntityManagerFactor("JPA1");
EntityManager em = emf.createEntityManager();
...
regards
Similar Threads
-
Array Index Out of bound exception
By abhijit in forum NetworkingReplies: 7Last Post: 09-25-2009, 07:25 PM -
javax.naming.NameNotFoundException: bean not bound
By Sirisha_24 in forum Enterprise JavaBeans (EJB)Replies: 2Last Post: 04-01-2009, 10:51 AM -
[SOLVED] String out of bound error
By maxb in forum New To JavaReplies: 4Last Post: 12-01-2008, 02:32 PM -
ArrayIndexout of Bound exception
By Preethi in forum New To JavaReplies: 2Last Post: 02-14-2008, 09:40 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks