Liferay Support does not recommend or endorse specific third-party products over others. Liferay is not responsible for any instructions herein or referenced regarding these products. Any implementation of these principles is the responsibility of the subscriber.
Some environments fail repeatedly to deploy some kinds of plugins, be it a hook, a portlet, a theme or other types. In those cases, an stack trace similar to the one below is displayed on the logs.
13:33:06,568 ERROR [localhost-startStop-1][HotDeployImpl:111] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for calendar-language-fix-hook com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering hook for calendar-language-fix-hook at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46) at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:280) (...) at java.lang.Thread.run(Thread.java:745) Caused by: com.liferay.portal.kernel.xml.DocumentException: Connection timed out Nested exception: Connection timed out at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:428) at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:446) at sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:88) at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56) at com.sun.proxy.$Proxy76.read(Unknown Source) at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:187) at com.liferay.portal.deploy.hot.HookHotDeployListener.doInvokeDeploy(HookHotDeployListener.java:592) at com.liferay.portal.deploy.hot.HookHotDeployListener.invokeDeploy(HookHotDeployListener.java:277) ... 30 more Caused by: org.dom4j.DocumentException: Connection timed out Nested exception: Connection timed out at org.dom4j.io.SAXReader.read(SAXReader.java:484) at org.dom4j.io.SAXReader.read(SAXReader.java:365) at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:425) ... 40 more
The key item is the line containing the string org.dom4j.DocumentException: Connection timed out. In such cases the likely cause if that the server where the portal is running does not have internet access, this access is faulty or the server where the DTD (Document Type Definition) for the liferay-*.xml
files are stored are somehow inaccessible. This causes Liferay Portal to fail the document validation, aborting the deploy process.
Resolution
If the connectivity error is transitory, reattempting to deploy the WAR may eventually work. However, on the common scenario where the server has no Internet access, you may want to proceed in one of those ways:
-
Disable XML validation on
portal-ext.properties
changing the value forxml.validation.enabled
to falsexml.validation.enabled=false
-
Remove the <!DOCTYPE> element line from all
liferay-*.xml
files in your plugin:liferay-look-and-feel.xml
liferay-hook
liferay-display.xml
-
liferay-portlet.xml
, etc.
- This should only be done if you want to make sure the plugins are deployable in offline portals.