Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay 7.2.0 and Tomcat 9.0.27
Hi,I’m trying to use Liferay 7.2.0 with latest Tomcat 9.0.27 on Windows but it fails during the start process with the error message below
According to the Tomcat’s changelog, from version 9.0.23 it runs on Windows platforms under the `LOCAL SERVICE` user account instead of `SYSTEM` for security reasons.
https://bz.apache.org/bugzilla/show_bug.cgi?id=63310
Liferay works fine with Tomcat 9.0.22 or if I manually give full privileges to the Tomcat and Liferay directories to `LOCAL SERVICE`. Can you tell me if newer versions of Tomcat are officially supported with Liferay or if you have any other workaround for this?
Regards,Gonzalo
2019-11-15 17:44:34.809 ERROR [Catalina-utility-1][PortalContextLoaderListener:114] java.lang.NullPointerException
java.lang.NullPointerException
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.reset(HotDeployUtil.java:50)
at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:144)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4732)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5396)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1867)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2019-11-15 17:44:34.809 ERROR [Catalina-utility-1][PortalBeanLocatorUtil:109] BeanLocator is null
According to the Tomcat’s changelog, from version 9.0.23 it runs on Windows platforms under the `LOCAL SERVICE` user account instead of `SYSTEM` for security reasons.
Update to Commons Daemon 1.2.0. This provides improved support for Java 11. This also changes the user configured by the Windows installer for the Windows service from Local System to the lower privileged Local Service. (markt)
https://bz.apache.org/bugzilla/show_bug.cgi?id=63310
Liferay works fine with Tomcat 9.0.22 or if I manually give full privileges to the Tomcat and Liferay directories to `LOCAL SERVICE`. Can you tell me if newer versions of Tomcat are officially supported with Liferay or if you have any other workaround for this?
Regards,Gonzalo
I always use a dedicated user instead of the default Local System user to run Liferay with it. I do that because the service usually needs to access a network share or should use integrated authentication to access the SQL server.
Maybe you could do that do? At least as a workaround.
Maybe you could do that do? At least as a workaround.
Thanks for the info. Do you mean setting the User parameter when installing the Tomcat service or setting any other Liferay specific parameter? Can you point me to any documentation about this?
Gonzalo Gomez:
It should be the user that Tomcat runs in. Note: If you change it, make sure that the new user has the appropriate access (read/write) to all directories that were previously used: Otherwise Liferay might not be able to write to its cache/temp/deployment folders.
Thanks for the info. Do you mean setting the User parameter when installing the Tomcat service or setting any other Liferay specific parameter? Can you point me to any documentation about this?
I always set the user in the services.msc, for some reason I often had problems to set the user with the tomcat executable to manage the service. I really don't know why or if it is just me doing something wrong. I am not sure about the permissions the user has to have, but I always make him the owner of the Liferay folder (or, as Olaf said, grant him the appropriate access)
While it isn't strictly related to your issue, I also recommend that you adapt the java settings according to the settings in setenv.bat. Especially the timezone setting. I am not sure if there is documentation for that.
While it isn't strictly related to your issue, I also recommend that you adapt the java settings according to the settings in setenv.bat. Especially the timezone setting. I am not sure if there is documentation for that.
Thanks for the information! I'll take a look into it.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™