I deployed a war file (say myimpl.war) on GateIn 3.6 with JBOSS AS7 as server. After when i start my server there is an exception comes out and which looks like follows.
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
I am using java 6 (64 bit) on windows 7 (64 bit) operating system. Also i am not using maven for dependency resolving, manually just copy/paste the corresponding jar on the WEB-INF/lib folder of war file for dependency resolving. My datasource definition in application-context.xml follows here
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName"> <value>${driver}</value> </property> <property name="url"> <value>${database.url}</value> </property> <property name="username"> <value>${database.user}</value> </property> <property name="password"> <value>${database.password}</value> </property> <property name="maxActive"> <value>5</value> </property> <property name="maxWait"> <value>10000</value> </property> <property name="testOnBorrow"> <value>true</value> </property> <property name="removeAbandoned"> <value>true</value> </property> <property name="removeAbandonedTimeout"> <value>60</value> </property> <property name="logAbandoned"> <value>true</value> </property> </bean>
This is due to the jar conflict between spring-dao.jar and spring-tx.jar, because both of these jars contains org.springframework.transaction.support.AbstractPlatformTransactionManager
class with same package. On the starting time of GateIn takes the AbstractPlatformTransactionManager.class from spring-dao.jar so it produce this issue. For solving this issue just remove spring-dao.jar from classpath