[英]When I deploy two portlets one after another in liferay the second deployed portlet is undeploying the first deployed portlet in liferay
當我在Tomcat上的Liferay 6.0.6中一個接一個地部署兩個portlet時,第二個正在部署的portlet正在取消部署第一個已部署的portlet,反之亦然,更改其順序時會發生這種情況:
堆棧跟蹤:
2ERROR [HotDeployUtil:112] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering plugins for abc-portlet
3com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering plugins for abc-portlet
4 at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:45)
5 at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeDeploy(PluginPackageHotDeployListener.java:161)
6 at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:109)
7 at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._fireDeployEvent(HotDeployUtil.java:182)
8 at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:38)
9 at com.liferay.portal.kernel.servlet.PortletContextListener.doPortalInit(PortletContextListener.java:99)
10 at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
11 at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:52)
12 at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:50)
13 at com.liferay.portal.kernel.servlet.PortletContextListener.contextInitialized(PortletContextListener.java:55)
14 at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
15 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
16 at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1244)
17 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1342)
18 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
19 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
20 at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
21 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
22 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
23 at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
24 at java.lang.Thread.run(Thread.java:744)
25Caused by: com.liferay.portal.OldServiceComponentException: Build namespace abc has build number 20 which is newer than 4
26 at com.liferay.portal.service.impl.ServiceComponentLocalServiceImpl.initServiceComponent(ServiceComponentLocalServiceImpl.java:128)
27 at sun.reflect.GeneratedMethodAccessor689.invoke(Unknown Source)
28 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
29 at java.lang.reflect.Method.invoke(Method.java:606)
30 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
31 at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at com.liferay.portal.dao.jdbc.aop.DynamicDataSourceTransactionInterceptor.invoke(DynamicDataSourceTransactionInterceptor.java:44)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy74.initServiceComponent(Unknown Source)
at com.liferay.portal.service.ServiceComponentLocalServiceUtil.initServiceComponent(ServiceComponentLocalServiceUtil.java:243)
at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.initServiceComponent(PluginPackageHotDeployListener.java:306)
at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.doInvokeDeploy(PluginPackageHotDeployListener.java:217)
at com.liferay.portal.deploy.hot.PluginPackageHotDeployListener.invokeDeploy(PluginPackageHotDeployListener.java:158)
... 19 more
09:02:30,390 INFO [HookHotDeployListener:394] Registering hook for abc-portlet
09:02:34,913 INFO [HookHotDeployListener:649] Hook for abc-portlet is available for use
有什么辦法嗎?
查看堆棧跟蹤
Caused by: com.liferay.portal.OldServiceComponentException: Build namespace abc has build number 20 which is newer than 4
看來您需要更新內部版本號。
更改service.properties
或更新release_
表中特定Portlet的內部版本號
您可以參考下面的鏈接
http://itsliferay.blogspot.co.uk/2012/04/build-number-deployment-error.html
經過大量挖掘並找到了解決方案,並解決了該問題,您可以通過以下步驟解決此問題:
在部署任何portlet之前,需要通過以下命令從servicecomponent表中刪除lportal數據庫中預先部署的portlet的條目:例如:DELETE FROM servicecomponent WHERE buildNamespace ='abc';
現在重新部署您的Portlet不會引發異常:由以下原因引起:com.liferay.portal.OldServiceComponentException:構建名稱空間abc的構建編號為20,比4更新
由以下原因引起:com.liferay.portal.OldServiceComponentException:構建名稱空間yourProject的構建編號x比y更新。
解決方案:轉到service.properties更改build.number = x
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.