您的位置:首页 > Web前端

liferay portlet.xml配置顺序引起的错误

2010-04-16 16:11 337 查看
<supports>

<portlet-mode>view</portlet-mode>

<portlet-mode>edit</portlet-mode>

<mime-type>text/html</mime-type>

</supports>

15:59:47,488 ERROR [PortletLocalServiceImpl:494] com.liferay.portal.kernel.xml.DocumentException: Error on line 24 of document : cvc-complex-type.2.4.a: Invalid content was found starting with element 'portlet-mode'. One of '{"http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd":mime-type}' is expected. Nested exception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'portlet-mode'. One of '{"http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd":mime-type}' is expected.

com.liferay.portal.kernel.xml.DocumentException: Error on line 24 of document : cvc-complex-type.2.4.a: Invalid content was found starting with element 'portlet-mode'. One of '{"http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd":mime-type}' is expected. Nested exception: cvc-complex-type.2.4.a: Invalid content was found starting with element 'portlet-mode'. One of '{"http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd":mime-type}' is expected.

at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:377)

at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:388)

at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:156)

at com.liferay.portal.service.impl.PortletLocalServiceImpl._readPortletXML(PortletLocalServiceImpl.java:1254)

at com.liferay.portal.service.impl.PortletLocalServiceImpl.initWAR(PortletLocalServiceImpl.java:429)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at $Proxy186.initWAR(Unknown Source)

at com.liferay.portal.service.PortletLocalServiceUtil.initWAR(PortletLocalServiceUtil.java:169)

at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:222)

at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:121)

at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:108)

at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._flushPrematureEvents(HotDeployUtil.java:171)

at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.flushPrematureEvents(HotDeployUtil.java:51)

at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:498)

at javax.servlet.GenericServlet.init(GenericServlet.java:212)

at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)

at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)

at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)

at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

at org.apache.catalina.core.StandardService.start(StandardService.java:448)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)

at org.apache.catalina.startup.Catalina.start(Catalina.java:552)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)

15:59:47,503 INFO [PortletHotDeployListener:303] 0 portlets for SPCPortal are available for use

纠正为

<supports>

<mime-type>text/html</mime-type>

<portlet-mode>view</portlet-mode>

<portlet-mode>edit</portlet-mode>

</supports>

minme-type需在前
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: