Foros de discusión

EJB3 + JPA + JSF portlet+OSGI

Najlaa STITOU, modificado hace 7 años.

EJB3 + JPA + JSF portlet+OSGI

New Member Mensajes: 10 Fecha de incorporación: 16/05/16 Mensajes recientes
Hi everyone,

First of all, i tried to create Portlet and inside it i added JPA entites, then i deployed the portlet as war in osgi folder of liferay home , i have noticed that the jpa is not recognized , and then i tried to deploy a EJB in osgi as war , nothing happend so i tought to deploy a remote ejb in deployments then i call it from a portlet deployed in osgi.

I have got this issue:

java.util.ServiceConfigurationError: org.jboss.ejb.client.EJBClientContextInitializer: Provider org.jboss.ejb.client.DefaultInterceptorsClientContextInitializer not a subtype

the same client code executed as java application works without problem.

Please help me find out the solution, how can i access ejb remote service from portlet which is deployed in osgi.

Thanks in advance
thumbnail
Juan Gonzalez, modificado hace 7 años.

RE: EJB3 + JPA + JSF portlet+OSGI (Respuesta)

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
Najlaa STITOU:
Hi everyone,

First of all, i tried to create Portlet and inside it i added JPA entites, then i deployed the portlet as war in osgi folder of liferay home , i have noticed that the jpa is not recognized , and then i tried to deploy a EJB in osgi as war , nothing happend so i tought to deploy a remote ejb in deployments then i call it from a portlet deployed in osgi.

I have got this issue:

java.util.ServiceConfigurationError: org.jboss.ejb.client.EJBClientContextInitializer: Provider org.jboss.ejb.client.DefaultInterceptorsClientContextInitializer not a subtype

the same client code executed as java application works without problem.

Please help me find out the solution, how can i access ejb remote service from portlet which is deployed in osgi.

Thanks in advance


Hi Najlaa.

Liferay 7 is NOT actually a web profile or full profile Java EE container. It's a portlet container with some Java EE specific supported features (Servlet 3, etc).

So, in order to make this work, just deploy your EJB in a Java EE container,

Said that, you can create your own rest or jax-ws services in Liferay 7. Right now that part of documentation is being processed and should be available soon. Meanwhile here is an example to create a module with a jax-ws service:

https://github.com/akosthurzo/liferay-portal/pull/55/commits/05037d4b4b99a5e9e80ed8af00a2615ecbe5288a

Hope it helps!
Najlaa STITOU, modificado hace 7 años.

RE: EJB3 + JPA + JSF portlet+OSGI

New Member Mensajes: 10 Fecha de incorporación: 16/05/16 Mensajes recientes
Hi Juan,

Thank you so much for your answer, i will try to follow the url you sent to me.
thumbnail
Ray Augé, modificado hace 7 años.

RE: EJB3 + JPA + JSF portlet+OSGI

Liferay Legend Mensajes: 1197 Fecha de incorporación: 8/02/05 Mensajes recientes
Could you also provide the full stacktrace you got here?

- Ray