当我在liferay中一个接一个地部署两个portlet时,第二个部署的portlet将取消部署liferay中的第一个部署的portlet

时间:2014-03-27 07:57:19

标签: java tomcat liferay portlet

当我在tomcat服务器上一个又一个portlet上部署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

任何解决方案?

3 个答案:

答案 0 :(得分:4)

查看堆栈跟踪

Caused by: com.liferay.portal.OldServiceComponentException: Build namespace abc has build number 20 which is newer than 4

似乎您需要更新内部版本号。

更改service.properties或更新特定portlet的release_表中的内部版本号

您可以参考以下链接

http://itsliferay.blogspot.co.uk/2012/04/build-number-deployment-error.html

答案 1 :(得分:1)

经过大量挖掘后我找到了解决方案并修复了问题,您可以通过以下步骤解决此问题:

  1. 在部署任何portlet之前,需要通过以下命令从servicecomponent表中删除lportal数据库中预部署的portlet的条目:例如:DELETE FROM servicecomponent WHERE buildNamespace =' abc';

  2. 现在重新部署你的portlet不会抛出异常:引起:com.liferay.portal.OldServiceComponentException:构建命名空间abc的内部版本号20比4更新

答案 2 :(得分:0)

原因:com.liferay.portal.OldServiceComponentException:构建名称空间yourProject的构建编号x比y更新

解决方案: 转到service.properties 更改build.number = x