on 03-27-2008 4:40 PM
Hi
I'm deploying my ejb3 module, with the simple persistence.xml file
<persistence-unit name="testUnit" transaction-type="JTA">
<jta-data-source>TESTDS</jta-data-source>
</persistence-unit>
Then in one of the deployed beans i'm trying to get EntityManasgerfactory trough a container injection mechanism:
@PesistentUnit(unitName="testUnit")
EntityManagerFactory emf.
this unfortunately causes the following error:
Could not get a value to be injected from the factory.
at com.sap.engine.services.ejb3.util.pool.ContainerPool.translate(ContainerPool.java:288)
....
Caused by: com.sap.engine.services.orpersistence.container.exceptions.ResourceException: Application 'com.Test/Test' is not deployed, not started or doesn't contain persistence units.
at com.sap.engine.services.orpersistence.container.ORPersistenceObjectFactory.getApplication(ORPersistenceObjectFactory.java:192)
at com.sap.engine.services.orpersistence.container.ORPersistenceObjectFactory.getObjectInstance(ORPersistenceObjectFactory.java:58)
at com.sap.engine.lib.injection.ReferenceObjectFactory.getObject(ReferenceObjectFactory.java:65)
at com.sap.engine.lib.injection.FieldInjector.inject(FieldInjector.java:113)
The application is up and running, of course except for the part using JPA.
Br
PF
Seems your persistence unit is not recognized. Where is your persistence.xml packed?
You can also try to run the telnet command
LIST_EL -a com.Test/Test
to list the deployed components of your application.
HTH!
\-- Vladimir
PS: Moving this thread to the Java EE 5 @ SAP forum.
Edited by: Vladimir Pavlov on Mar 27, 2008 8:14 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The question would be more like if your app is Java EE 5 or lower. If it's lower the persistence.xml would not be processed. So please check the version of your application.xml (if present - if there isn't an application.xml then your app is Java EE 5 and we should investigate further).
\-- Vladimir
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.