Fórumok
Can't deploy portlet
Emmanuel Rondez, módosítva 9 év-val korábban
Can't deploy portlet
New Member Bejegyzés: 1 Csatlakozás dátuma: 2014.11.24. Legújabb bejegyzések
Hello,
When I deploy my portlet, I have this error:
An error occurred performing resource injection on managed bean LivraisonController
I have JPA project with entities and I have include a JAR from this in my liferay portlet project.
I have a persistence file with
And I have add the resource in context file from my server Resource:
Here is my current configuration:
- liferay-portal-6.2-ce-ga2 (tomcat-7.0.42)
- Eclipse Luna
- JPA --> EclipseLink 2.5.2
How can I resolve the path of my persistence file?
I try to put this file in:
/webapps/testLivraison-portlet/WEB-INF/classes/META-INF/
/webapps/testLivraison-portlet/META-INF/
but this has no effects.
Thanks
Emmanuel
When I deploy my portlet, I have this error:
An error occurred performing resource injection on managed bean LivraisonController
Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named Test2_JPA_Persistence
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:84)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
at model.EtiquetteLivraison_Facade.<init>(EtiquetteLivraison_Facade.java:32)
at com.controller.LivraisonController.init(LivraisonController.java:38)
... 208 more</init>
I have JPA project with entities and I have include a JAR from this in my liferay portlet project.
I have a persistence file with
<!--?xml version="1.0" encoding="UTF-8" ?-->
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="Test2_JPA_Persistence" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>bdprod</jta-data-source>
<class>model.Etiquettelivraison</class>
</persistence-unit>
</persistence>
And I have add the resource in context file from my server Resource:
<resource name="bdprod" auth="Container" type="javax.sql.DataSource" username="yyyy" password="xxxx" driverClassName="com.mysql.jdbc.Driver" description="Global Address Database" url="jdbc:mysql://database:3306/bdprod" maxActive="15" maxIdle="3" />
Here is my current configuration:
- liferay-portal-6.2-ce-ga2 (tomcat-7.0.42)
- Eclipse Luna
- JPA --> EclipseLink 2.5.2
How can I resolve the path of my persistence file?
I try to put this file in:
/webapps/testLivraison-portlet/WEB-INF/classes/META-INF/
/webapps/testLivraison-portlet/META-INF/
but this has no effects.
Thanks
Emmanuel