2017-02-27 57 views
0

我試圖使用Liferay,並且出現此錯誤,我知道問題出現在XML文件中,但是我不能夠理解的文件是,看到了類似的問題,但我認爲這是不同的原因它是指在Liferay的框架,com.liferay.portal.kernel.xml.DocumentException:文檔第-1行錯誤:文件過早結束

`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

請顯示您的代碼。 – jww

+0

我的代碼非常龐大,如果你告訴我你想查看哪個文件,很高興發佈它 – Anon

+0

請參閱[如何創建一個最小,完整和可驗證](https://stackoverflow.com/help/mcve) 。 – jww

回答

2

我假設你正在使用6.2 GA6。有這條線在你的堆棧跟蹤

at com.liferay.portal.deploy.hot.PortletHotDeployListener.processPortletProperties(PortletHotDeployListener.java:690) 

指向this code,暗示它的權限聲明,例如resource-actions/default.xml

如果這不是您的版本,請使用github中的相應標籤,並查看您的版本中該行中正在讀取的其他文件。

+0

thx很多,這是確切的回答我需要指出問題 – Anon

相關問題