Fórum
Module login post action not started when servlet-api is added
Damien Guillermet, modificado 7 Anos atrás.
Module login post action not started when servlet-api is added
Junior Member Postagens: 44 Data de Entrada: 09/07/15 Postagens Recentes
Hello!
following the example of blade.lifecycle.loginpreaction I created a project with Maven.
Everything works fine when I do nothing special in processLifecycleEvent method: bundle is started as expected.
However when I add javax servlet and portlet api in Maven POM dependencies in order to use this code in previous method :
Then when I deploy my JAR in Liferay it seems to be processed by the AutoDeployScanner but nothing more is happening (no start, no error log).
Is anybody know what is going wrong here?
Best regards,
Damien.
following the example of blade.lifecycle.loginpreaction I created a project with Maven.
Everything works fine when I do nothing special in processLifecycleEvent method: bundle is started as expected.
However when I add javax servlet and portlet api in Maven POM dependencies in order to use this code in previous method :
final User user = PortalUtil.getUser(lifecycleEvent.getRequest());
Then when I deploy my JAR in Liferay it seems to be processed by the AutoDeployScanner but nothing more is happening (no start, no error log).
Is anybody know what is going wrong here?
Best regards,
Damien.
David H Nebinger, modificado 7 Anos atrás.
RE: Module login post action not started when servlet-api is added
Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Check in gogo what the status is. Likely it is not "started". Start the component and see what it reports.
Damien Guillermet, modificado 7 Anos atrás.
RE: Module login post action not started when servlet-api is added
Junior Member Postagens: 44 Data de Entrada: 09/07/15 Postagens Recentes
Hello David,
the module raised a BunbldeException. The cause is:
I removed all com.liferay.portal.kernel.util.* import from my code. Changing the previous code line by :
Edit : I also have this issue when I invoke com.liferay.portal.kernel.theme.ThemeDisplay in my code :
the module raised a BunbldeException. The cause is:
Unresolved requirement: Import-Package: com.liferay.portal.kernel.util; version="[7.16.0,8.0.0)"
.I removed all com.liferay.portal.kernel.util.* import from my code. Changing the previous code line by :
final User user = (User) lifecycleEvent.getRequest().getSession().getAttribute("USER");
and it works. So it's a workaround but I don't know if it's the best solution?Edit : I also have this issue when I invoke com.liferay.portal.kernel.theme.ThemeDisplay in my code :
Unresolved requirement: Import-Package: com.liferay.portal.kernel.theme; version="[1.1.0,2.0.0)"
Damien Guillermet, modificado 7 Anos atrás.
RE: Module login post action not started when servlet-api is added
Junior Member Postagens: 44 Data de Entrada: 09/07/15 Postagens Recentes
I figured out the problem so I post workaround for community:
I Maven POM the version of liferay portal kernel dependency has to be 2.0.0 (and not 2.X.0 even if 2.21.0 is currently available on Maven central repo).
So :
I Maven POM the version of liferay portal kernel dependency has to be 2.0.0 (and not 2.X.0 even if 2.21.0 is currently available on Maven central repo).
So :
<dependency>
<groupid>com.liferay.portal</groupid>
<artifactid>com.liferay.portal.kernel</artifactid>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>