0

我在 GateIn 3.6 上部署了一个战争文件(比如 myimpl.war),并使用 JBOSS AS7 作为服务器。当我启动我的服务器后,出现了一个异常,如下所示。


10:56:49,602 ERROR [portal:UIPortletLifecycle] (http-localhost-127.0.0.1-8087-1) Portlet render threw an exception: org.exoplatform.services.portletcontainer.PortletContainerException: org.gatein.pc.api.PortletInvokerException: javax.servlet.ServletException
    at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:197) [exo.portal.webui.portal-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.portal.webui.application.UIPortletLifecycle.processRender(UIPortletLifecycle.java:54) [exo.portal.webui.portal-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:128) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.portal.webui.application.UIPortlet.processRender(UIPortlet.java:954) [exo.portal.webui.portal-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:291) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:284) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_37]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_37]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_37]
    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_37]
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at UIContainer.run(UIContainer.gtmpl:68)    at org.exoplatform.groovyscript.GroovyScript.render(GroovyScript.java:99) [exo.portal.component.scripting-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.groovyscript.GroovyTemplate.render(GroovyTemplate.java:105) [exo.portal.component.scripting-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.groovyscript.text.TemplateService.merge(TemplateService.java:113) [exo.portal.component.scripting-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:114) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.lifecycle.Lifecycle.processRender(Lifecycle.java:76) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:128) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:291) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at org.exoplatform.webui.core.UIContainer.renderChildren(UIContainer.java:284) [exo.portal.webui.framework-3.6.0.Final.jar:3.6.0.Final]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_37]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_37]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_37]
    at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_37]
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]
Caused by: org.gatein.pc.api.PortletInvokerException: javax.servlet.ServletException
    at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:90) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    at org.exoplatform.portal.pc.aspects.PortletLifecyclePhaseInterceptor.invoke(PortletLifecyclePhaseInterceptor.java:30) [exo.portal.component.pc-3.6.0.Final.jar:3.6.0.Final]
    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    at org.gatein.pc.portlet.aspects.SecureTransportInterceptor.invoke(SecureTransportInterceptor.java:69) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    at org.gatein.pc.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:111) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    ... 240 more
Caused by: javax.servlet.ServletException
    at org.gatein.wci.command.CommandServlet.include(CommandServlet.java:102) [wci-wci-2.3.1.Final.jar:2.3.1.Final]
    at org.gatein.wci.command.CommandDispatcher.include(CommandDispatcher.java:58) [wci-wci-2.3.1.Final.jar:2.3.1.Final]
    at org.gatein.wci.jboss.JB7ServletContainerContext.include(JB7ServletContainerContext.java:108) [wci-jboss7-2.3.1.Final.jar:2.3.1.Final]
    at org.gatein.wci.ServletContainer.include(ServletContainer.java:393) [wci-wci-2.3.1.Final.jar:2.3.1.Final]
    at org.exoplatform.portal.webui.application.ExoServerContext.dispatch(ExoServerContext.java:45) [exo.portal.webui.portal-3.6.0.Final.jar:3.6.0.Final]
    at org.gatein.pc.portlet.aspects.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:65) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    ... 236 more
Caused by: java.lang.NoSuchMethodError: org.springframework.orm.hibernate3.HibernateTransactionManager.determineTimeout(Lorg/springframework/transaction/TransactionDefinition;)I
    at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:492)
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:283)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:226)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
    at com.new.myimpl.services.CustomersService$$EnhancerByCGLIB$$386a2f85.getCustomerSettings()
    at com.new.myimpl.view.util.myimplGenericPortlet.doView(myimplGenericPortlet.java:830)
    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:354) [portlet-api-2.0.jar:]
    at javax.portlet.GenericPortlet.render(GenericPortlet.java:259) [portlet-api-2.0.jar:]
    at com.new.myimpl.view.util.myimplGenericPortlet.render(myimplGenericPortlet.java:102)
    at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:592) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    at org.exoplatform.portal.application.ApplicationMonitoringFilter.doFilter(ApplicationMonitoringFilter.java:65) [exo.portal.webui.portal-3.6.0.Final.jar:3.6.0.Final]
    at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    at org.gatein.pc.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80) [pc-portlet-2.4.1.Final.jar:2.4.1.Final]
    ... 265 more



我在 Windows 7(64 位)操作系统上使用 java 6(64 位)。此外,我没有使用 maven 进行依赖解析,只需手动将相应的 jar 复制/粘贴到 war 文件的 WEB-INF/lib 文件夹中即可进行依赖解析。我在 application-context.xml 中的数据源定义如下


    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
            <property name="driverClassName">
                <value>${driver}</value>
            </属性>
            <属性名称="url">
                <value>${database.url}</value>
            </属性>
            <属性名称="用户名">
                <value>${database.user}</value>
            </属性>
            <属性名称="密码">
                <value>${database.password}</value>
            </属性>
            <属性名称="maxActive">
                <值>5</值>
            </属性>
            <属性名称="maxWait">
                <值>10000</值>
            </属性>
            <property name="testOnBorrow">
                <值>真</值>
            </属性>
            <property name="removeAbandoned">
                <值>真</值>
            </属性>
            <property name="removeAbandonedTimeout">
                <值>60</值>
            </属性>
            <property name="logAbandoned">
                <值>真</值>
            </属性>

        </豆>

4

1 回答 1

0

这是由于 spring-dao.jar 和 spring-tx.jar 之间的 jar 冲突,因为这两个 jar 都包含org.springframework.transaction.support.AbstractPlatformTransactionManager具有相同包的类。在 GateIn 的开始时间从 spring-dao.jar 中获取 AbstractPlatformTransactionManager.class 所以它产生了这个问题。为了解决这个问题,只需从类路径中删除 spring-dao.jar

于 2013-10-08T06:48:00.807 回答