0 Replies Latest reply on Dec 12, 2012 11:06 AM by Alex H

    Migration AS 5 to 7.1 - Problems with old SEAM2-Projects - ClassNotFoundErrors

    Alex H Newbie

      Hi,

       

      i have to migrate from JBoss 5 to 7.1 in a business context. But there are a lot of problems and difficulties. I got a lot of them fixed, but now there are also a few errors remaining.

       

      This is the config: JBoss 7.1.1, SEAM 2.1.2, JPA2, Hibernate 4.x, JSF 1.2

       

      And it seems there are a lot of problems to get a SEAM2-Project (before 2.3) running in AS 7.1 But it will be very nice if you can help me!

       

      I got these Errors:

       

      16:07:12,356 WARN  [org.jboss.modules] (MSC service thread 1-4) Failed to define class org.jboss.seam.persistence.HibernateSessionProxy in Module "deployment.XXX-ear-2.4.23-SNAPSHOT.ear.jboss-seam-2.1.2.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/jboss/seam/persistence/HibernateSessionProxy (Module "deployment.XXX-ear-2.4.23-SNAPSHOT.ear.jboss-seam-2.1.2.jar:main" from Service Module Loader)

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)

          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

          at org.jboss.modules.Module.loadModuleClass(Module.java:517)

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

          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)

          at org.jboss.seam.persistence.HibernatePersistenceProvider.proxySession(HibernatePersistenceProvider.java:104) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.HibernatePersistenceProvider.proxyDelegate(HibernatePersistenceProvider.java:128) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.EntityManagerProxy.getDelegate(EntityManagerProxy.java:97) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.HibernatePersistenceProvider.getSession(HibernatePersistenceProvider.java:369) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.HibernatePersistenceProvider.setFlushModeManual(HibernatePersistenceProvider.java:145) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.ManagedPersistenceContext.setEntityManagerFlushMode(ManagedPersistenceContext.java:316) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:81) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107) [jboss-seam-2.1.2.jar:2.1.2]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_24]

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.callComponentMethod(Component.java:2249) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.unwrap(Component.java:2275) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstance(Component.java:2041) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstance(Component.java:1983) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstance(Component.java:1977) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2349) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getValueToInject(Component.java:2301) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.injectAttributes(Component.java:1736) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.inject(Component.java:1554) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) [jboss-seam-2.1.2.jar:2.1.2]

          at de.XXX.XXX.utils.properties.Properties4Seam_$$_javassist_seam_4.create(Properties4Seam_$$_javassist_seam_4.java) [XXX-utils-2.4.23-SNAPSHOT.jar:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_24]

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.callComponentMethod(Component.java:2249) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.callCreateMethod(Component.java:2172) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.newInstance(Component.java:2132) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:113) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.init.Initialization.init(Initialization.java:740) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.1.2.jar:2.1.2]

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

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

      Caused by: java.lang.NoClassDefFoundError: org/hibernate/engine/SessionImplementor

          at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_24]

          at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [rt.jar:1.6.0_24]

          at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [rt.jar:1.6.0_24]

          at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_24]

          at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

          ... 62 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.engine.SessionImplementor from [Module "deployment.XXX-ear-2.4.23-SNAPSHOT.ear.jboss-seam-2.1.2.jar: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.performLoadClassChecked(ConcurrentClassLoader.java:423)

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

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

          ... 68 more

       

      16:07:12,418 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/XXX]] (MSC service thread 1-4) Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: de.XXX.XXX.utils.Properties

          at org.jboss.seam.Component.newInstance(Component.java:2144) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:113) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.init.Initialization.init(Initialization.java:740) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:36) [jboss-seam-2.1.2.jar:2.1.2]

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

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

      Caused by: java.lang.RuntimeException: exception invoking: getEntityManager

          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.callComponentMethod(Component.java:2249) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.unwrap(Component.java:2275) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstance(Component.java:2041) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstance(Component.java:1983) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstance(Component.java:1977) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2349) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.getValueToInject(Component.java:2301) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.injectAttributes(Component.java:1736) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.inject(Component.java:1554) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) [jboss-seam-2.1.2.jar:2.1.2]

          at de.XXX.XXX.utils.properties.Properties4Seam_$$_javassist_seam_4.create(Properties4Seam_$$_javassist_seam_4.java) [XXX-utils-2.4.23-SNAPSHOT.jar:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_24]

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.callComponentMethod(Component.java:2249) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.callCreateMethod(Component.java:2172) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.Component.newInstance(Component.java:2132) [jboss-seam-2.1.2.jar:2.1.2]

          ... 13 more

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_24]

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) [jboss-seam-2.1.2.jar:2.1.2]

          ... 39 more

      Caused by: java.lang.NoClassDefFoundError: org/jboss/seam/persistence/HibernateSessionProxy

          at org.jboss.seam.persistence.HibernatePersistenceProvider.proxySession(HibernatePersistenceProvider.java:104) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.HibernatePersistenceProvider.proxyDelegate(HibernatePersistenceProvider.java:128) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.EntityManagerProxy.getDelegate(EntityManagerProxy.java:97) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.HibernatePersistenceProvider.getSession(HibernatePersistenceProvider.java:369) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.HibernatePersistenceProvider.setFlushModeManual(HibernatePersistenceProvider.java:145) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.ManagedPersistenceContext.setEntityManagerFlushMode(ManagedPersistenceContext.java:316) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.ManagedPersistenceContext.initEntityManager(ManagedPersistenceContext.java:81) [jboss-seam-2.1.2.jar:2.1.2]

          at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManager(ManagedPersistenceContext.java:107) [jboss-seam-2.1.2.jar:2.1.2]

          ... 45 more

      Caused by: java.lang.ClassNotFoundException: org.jboss.seam.persistence.HibernateSessionProxy from [Module "deployment.XXX-ear-2.4.23-SNAPSHOT.ear.jboss-seam-2.1.2.jar: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)

          ... 53 more

       

      Thx a lot!