This content has been marked as final.
Show 4 replies
-
1. Re: EntityManager in AbstractResource throws not mapped exception
kmranganathan Sep 22, 2009 2:52 PM (in response to kmranganathan)Hi,
Is no one facing this issue?Ranga.
-
2. Re: EntityManager in AbstractResource throws not mapped exception
kmranganathan Oct 9, 2009 12:29 PM (in response to kmranganathan)I need some help on this issue, pleae.
Ranga.
-
3. Re: EntityManager in AbstractResource throws not mapped exception
perez83 Oct 9, 2009 1:00 PM (in response to kmranganathan)use
managed-persistence-context
@PersistenceContext
Entitymanager entitymanager;
in compenents.xml
you must add
<persistence:managed-persistence-context auto-create="true"
name="entityManager"
persistence-unit-jndi-name="java:/NameEntityManagerFactory" />
or
Seam-managed persistence context
@In (create=true) EntityManager entityManager;
in compenents.xml
you must add
<component name="em"
class="org.jboss.seam.persistence.ManagedPersistenceContext">
<property name="persistenceUnitJndiName">java:/NameEntityManagerFactory</property>
</component>
and in persistance.xml you must add
<property name="jboss.entity.manager.factory.jndi.name" value="java:/NameEntityManagerFactory"/> -
4. Re: EntityManager in AbstractResource throws not mapped exception
kmranganathan Mar 5, 2010 5:45 AM (in response to kmranganathan)Hi,
I resolved the issue. It was a silly error of having everything in upper case. Thanks for your replies.However, now I am facing another issue. I am trying to access a file from the AbstractResource (actually a compiled report). JBoss throws access denied error. the exception trace shows a NP exception.
How do I access an abstract resource...I tried accessing through getServletContext().getResourcePath()...Thanks,
Ranga