users@glassfish.java.net

Re: Couldn't create bookstore database bean: Unable to retrieve EntityManagerFa

From: Snjezana Sevo-Zenzerovic <Snjezana.Sevo-Zenzerovic_at_Sun.COM>
Date: Thu, 23 Jul 2009 13:55:25 -0700

FWIW, you are pretty close - in English it is "not seeing the forest for
the trees" :-)

glassfish_at_javadesktop.org wrote:

>There is a german proverb "vor lauter Bäumen den Wald nicht sehen" which literally means "not seeing the forest due to all the trees". I don't know how do you say that in english but you might give me some English lessons :-).
>
>After spending that much time of uninstalling and installing all the different kinds of v3 installations I forgot to take a close look at the log but I got at least a hint where the problem now is. The console says:
>
>INFO: Couldn't create bookstore database bean: Unable to retrieve EntityManagerFactory for unitName null
>
>The error occurs in com.sun.bookstore1.listeners.ContextListener:
>
>public final class ContextListener implements ServletContextListener {
> @PersistenceUnit
> private EntityManagerFactory emf;
>...
> try {
> BookDBAO bookDB = new BookDBAO(emf);
> context.setAttribute("bookDB", bookDB);
> } catch (Exception ex) {
> System.out.println(
> "Couldn't create bookstore database bean: "
> + ex.getMessage());
> }
>
>It seems that the EntityManagerFactory does not get injected. I will do some further investigation and keep you posted. Any hint but somebody?
>
>Tai
>[Message sent by forum member 'taitruong' (taitruong)]
>
>http://forums.java.net/jive/thread.jspa?messageID=357299
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>