我正在尝试使用Liferay并且我得到了这个错误,我知道问题出在XML文件中,但是我无法理解它是什么文件,看到类似的问题,但我认为这是不同的因为它引用Liferay框架,
`08:24:54,239 ERROR [localhost-startStop-1][HotDeployImpl:233] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for guestbook-portletguestbook-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for guestbook-portletguestbook-portlet
at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:128)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:230)
at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:257)
at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.liferay.portal.kernel.xml.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:396)
at com.liferay.portal.kernel.xml.UnsecureSAXReaderUtil.read(UnsecureSAXReaderUtil.java:54)
at com.liferay.portal.security.permission.ResourceActionsImpl.read(ResourceActionsImpl.java:625)
at com.liferay.portal.security.permission.ResourceActionsUtil.read(ResourceActionsUtil.java:275)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.processPortletProperties(PortletHotDeployListener.java:690)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:441)
at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:125)
... 24 more
Caused by: org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:343)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:393)
... 30 more`
答案 0 :(得分:2)
我假设您使用的是6.2 GA6。你的stacktrace中有这一行
at com.liferay.portal.deploy.hot.PortletHotDeployListener.processPortletProperties(PortletHotDeployListener.java:690)
指向this code,表明它是权限声明,例如resource-actions/default.xml
如果那不是您的版本,请使用github中的相应标签,并在您的版本中查找该行中正在读取的其他文件。