[jboss-user] [JNDI and Naming] - Re: javax.naming.NameNotFoundException: persistence not bound
rac-tech
do-not-reply at jboss.com
Thu Jan 27 17:24:26 EST 2011
rac-tech [http://community.jboss.org/people/rac-tech] created the discussion
"Re: javax.naming.NameNotFoundException: persistence not bound"
To view the discussion, visit: http://community.jboss.org/message/583752#583752
--------------------------------------------------------------
This issue has been fixed and I'm publishing what was done in case this could help someone else out there.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I found out that this error is a misleading error due to a jndi name used. The JNDI name used for "jboss.entity.manager.factory.jndi.name"(declared in persistence.xml) was in the pattern "java:/persistence/abc" Although the error message "Persistence not bound" it should have been "persistence/abc not bound". It could be some error of the error message generation.
So the actual error was jboss.entity.manager.factory.jndi.name(declared in persistence.xml) is not bound. I noticed that this JNDI lookup is done(by EhCache) at the start up time just before binding this persistence unit JNDI name.
Solution
------------
After adding the following property to persistence.xml(inside <properties> ) and applying JBoss patches the error went away.
<property name="hibernate.transaction.factory_class" value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory"/>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/583752#583752]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110127/1a678429/attachment.html
More information about the jboss-user
mailing list