2 Replies Latest reply on Oct 4, 2013 8:59 AM by Josny Delson

    Hibernate confilct problem in jboss as7

    Anish Antony Newbie

      Hi

      I deployed an application in JBoss AS7, Actually i migrated that application from JBoss 5 to JBoss AS7. But it bears a connection exception when i start my server. Here follows the exception

       

      15:41:07,500 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 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]

          ... 160 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]

          ... 163 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.VersionMappingService$$EnhancerByCGLIB$$563c3c95.checkApplnVersionMapping(<generated>)

          at com.new.myimpl.view.util.myimplGenericPortlet.doView(myimplGenericPortlet.java:741)

          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]

          ... 180 more

       

      I think that this issue is due to hibernate conflict in JBoss AS7 and deployed war file. In JBoss AS7 users hibernate 4.0.1 jars and war contains hibernate 3 jars. So i removed hibernate 3 related jar files from the deployed war file, but it results a class not found exception which follows

       

      14:49:30,366 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."myimpl.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myimpl.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myimpl.war"

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_37]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_37]

          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/exception/ConstraintViolationException

          at java.lang.Class.getDeclaredConstructors0(Native Method) [rt.jar:1.6.0_37]

          at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) [rt.jar:1.6.0_37]

          at java.lang.Class.getConstructor0(Class.java:2699) [rt.jar:1.6.0_37]

          at java.lang.Class.getConstructor(Class.java:1657) [rt.jar:1.6.0_37]

          at org.jboss.as.web.deployment.jsf.JsfManagedBeanProcessor.deploy(JsfManagedBeanProcessor.java:108)

          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

          ... 5 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.exception.ConstraintViolationException from [Module "deployment.myimpl.war:main" from Service Module Loader]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

          ... 11 more