well if you manage to reproduce it the best would be to debug in org.apache.catalina.ha.session.ClusterManagerBase#getReplicationStream and check getClassLoaders() value
normally it works as expected *Romain Manni-Bucau* *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* *Github: https://github.com/rmannibucau* 2013/2/21 <[email protected]> > There is the exception I got when TomEE have tried to replicate session > with CODI objects in it: > > SEVERE: Manager [/hello-myfaces-codi-jsf20-example-1.0.5]: Unable to > receive message through TCP channel > java.lang.RuntimeException: by java.lang.NoClassDefFoundError: > org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/spi/EditableWindowContext > at > javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:515) > at > javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:492) > at > javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:428) > at > javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:420) > at > javassist.util.proxy.SerializedProxy.readResolve(SerializedProxy.java:85) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1091) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1780) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) > at > java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1557) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) > at > java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1557) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) > at > java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1557) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1004) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at > java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) > at > java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) > at > java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) > at > java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) > at > org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.readExternal(DeltaRequest.java:378) > at > org.apache.catalina.ha.session.DeltaRequest.readExternal(DeltaRequest.java:268) > at > org.apache.catalina.ha.session.DeltaManager.deserializeDeltaRequest(DeltaManager.java:604) > at > org.apache.catalina.ha.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1346) > at > org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1293) > at > org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1014) > at > org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:92) > at > org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:924) > at > org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:905) > at > org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:278) > at > org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84) > at > org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84) > at > org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:114) > at > org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:84) > at > org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:253) > at > org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:287) > at > org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:212) > at > org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:101) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:722) > Caused by: javassist.CannotCompileException: by > java.lang.NoClassDefFoundError: > org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/spi/EditableWindowContext > at > javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:170) > at > javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:507) > ... 95 more > Caused by: java.lang.NoClassDefFoundError: > org/apache/myfaces/extensions/cdi/jsf/impl/scope/conversation/spi/EditableWindowContext > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:791) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at > javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:182) > at > javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164) > ... 96 more > Caused by: java.lang.ClassNotFoundException: > org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi.EditableWindowContext > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > at java.lang.ClassLoader.loadClass(ClassLoader.java:423) > at java.lang.ClassLoader.loadClass(ClassLoader.java:356) > ... 104 more > > > -----Ursprüngliche Nachricht----- > Von: Romain Manni-Bucau [mailto:[email protected]] > Gesendet: Donnerstag, 21. Februar 2013 11:07 > An: [email protected] > Betreff: Re: AW: Class loading problem in TomEE 1.5.1 > > i don't have the exact exception so can't say but basically if frameworks > do the serialization they should handle it. > > that said i don't think codi does it so the issue should be sthg else > > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > *Github: https://github.com/rmannibucau* > > > > 2013/2/21 <[email protected]> > > > Will it someday work in TomEE? > > As far as understand, session replication in applications with Apache > > CODI is not working because of same issue, right? > > > > -----Ursprüngliche Nachricht----- > > Von: Romain Manni-Bucau [mailto:[email protected]] > > Gesendet: Donnerstag, 21. Februar 2013 10:29 > > An: [email protected] > > Betreff: Re: AW: Class loading problem in TomEE 1.5.1 > > > > yes and no: you can't guarantee it works in application servers. > > > > There are patches for it and open jiras on commons-lang, not sure the > > state of it > > > > *Romain Manni-Bucau* > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > *Blog: **http://rmannibucau.wordpress.com/*< > > http://rmannibucau.wordpress.com/> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > *Github: https://github.com/rmannibucau* > > > > > > > > 2013/2/21 <[email protected]> > > > > > Thank you for explanation. > > > > > > I have used commons-lang for Serialization-Deserialization. Many > > > other libraries and applications are using it too, or deserializing > > > objects without respecting the TCCL. > > > Does it mean that all this Applications and libraries will not work > > > in TomEE? > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > Von: Romain Manni-Bucau [mailto:[email protected]] > > > Gesendet: Mittwoch, 20. Februar 2013 20:44 > > > An: [email protected] > > > Betreff: Re: AW: Class loading problem in TomEE 1.5.1 > > > > > > sad to say you didn't reproduce it completely but i got the issue. > > > > > > first i don't think it is linked to tomcat (if you use tomcat > > > clustering classes you'll not get it). > > > > > > the fix is simply to not use an ObjectInputStream but this child (in > > > dirty > > > mode): > > > > > > in = new ObjectInputStream(inputStream) { > > > @Override > > > protected Class<?> resolveClass(ObjectStreamClass desc) > > > throws IOException, ClassNotFoundException { > > > return > > > > Thread.currentThread().getContextClassLoader().loadClass(desc.getName()); > > > } > > > }; > > > > > > if you update your sample with this code it will work fine. > > > > > > Tomcat more or less does it automatically. > > > > > > I don't have time to go further right now but i think somebody else > > > is serializing without respecting the TCCL. > > > > > > *Romain Manni-Bucau* > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > > *Blog: **http://rmannibucau.wordpress.com/*< > > > http://rmannibucau.wordpress.com/> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > > *Github: https://github.com/rmannibucau* > > > > > > > > > > > > 2013/2/20 <[email protected]> > > > > > > > Hi, > > > > > > > > I have just reproduced an issue which I have in my Application. > > > > Steps to reproduce: > > > > > > > > *Checkout project from https://github.com/eiskonzept/tomee/ > > > > *Start TomEE maven plugin with node1 profile *Open in browser: > > > > /<application_context_root>/index.xhtml > > > > *Press submit button. > > > > *Following code will be executed: > > > > ByteArrayOutputStream byteArrayOutputStream = new > > > > ByteArrayOutputStream(); > > > > SerializationUtils.serialize(new > > > > DefaultRequestTypeResolver(), byteArrayOutputStream); > > > > byte[] bytes = byteArrayOutputStream.toByteArray(); > > > > try { > > > > byteArrayOutputStream.close(); > > > > } catch (IOException e) { > > > > e.printStackTrace(); } > > > > Object deserialize = > > > > SerializationUtils.deserialize(bytes); > > > > > > > > Exception: > > > > org.apache.commons.lang.SerializationException: > > > > java.lang.ClassNotFoundException: > > > > org.apache.myfaces.extensions.cdi.jsf2.impl.request.DefaultRequest > > > > Ty > > > > pe > > > > Resolver > > > > > > > > org.apache.commons.lang.SerializationUtils.deserialize(Serializati > > > > on > > > > Ut > > > > ils.java:166) > > > > > > > > org.apache.commons.lang.SerializationUtils.deserialize(Serializati > > > > on > > > > Ut > > > > ils.java:193) > > > > > > > > de.test.PassivationCapableBean.submit(PassivationCapableBean.java:55) > > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > > > Method) > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm > > > > pl > > > > .j > > > > ava:57) > > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce > > > ss > > > orImpl.java:43) > > > > java.lang.reflect.Method.invoke(Method.java:601) > > > > > > > > org.apache.webbeans.intercept.InterceptorHandler.invoke(Intercepto > > > > rH > > > > an > > > > dler.java:322) > > > > > > > > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.i > > > > nv > > > > ok > > > > e(NormalScopedBeanInterceptorHandler.java:117) > > > > > > > > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.i > > > > nv > > > > ok > > > > e(NormalScopedBeanInterceptorHandler.java:108) > > > > > > > > > > > de.test.PassivationCapableBean_$$_javassist_27.submit(PassivationCap > > > ab > > > leBean_$$_javassist_27.java) > > > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > > > Method) > > > > > > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm > > > > pl > > > > .j > > > > ava:57) > > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce > > > ss > > > orImpl.java:43) > > > > java.lang.reflect.Method.invoke(Method.java:601) > > > > org.apache.el.parser.AstValue.invoke(AstValue.java:278) > > > > > > > > org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java: > > > > 27 > > > > 4) > > > > > > > > org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression. > > > > in > > > > voke(ContextAwareTagMethodExpression.java:96) > > > > > > > > org.apache.myfaces.application.ActionListenerImpl.processAction(Ac > > > > ti > > > > on > > > > ListenerImpl.java:68) > > > > > > > > org.apache.myfaces.extensions.cdi.jsf.impl.security.SecurityViolat > > > > io > > > > nA > > > > > wareActionListener.processAction(SecurityViolationAwareActionListener. > > > > java:56) > > > > > > > > org.apache.myfaces.extensions.cdi.jsf.impl.config.view.ViewControl > > > > le > > > > rA > > > > ctionListener.processAction(ViewControllerActionListener.java:68) > > > > > > > > > > > org.apache.myfaces.extensions.cdi.jsf.impl.listener.action.CodiActio > > > nL > > > istener.processAction(CodiActionListener.java:58) > > > > > > > > javax.faces.component.UICommand.broadcast(UICommand.java:120) > > > > > > > > javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:102 > > > > 8) > > > > > > > > javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:2 > > > > 86 > > > > ) > > > > > > > > javax.faces.component.UIViewRoot._process(UIViewRoot.java:1375) > > > > > > > > javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java: > > > > 75 > > > > 2) > > > > > > > > org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(Inv > > > > ok > > > > eA > > > > pplicationExecutor.java:38) > > > > > > > > > org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl. > > > > java:170) > > > > > > > > > org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java: > > > > 117) > > > > > > > > > > > org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifec > > > yc > > > leWrapper.execute(CodiLifecycleWrapper.java:95) > > > > > > > > javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > > Von: Romain Manni-Bucau [mailto:[email protected]] > > > > Gesendet: Mittwoch, 6. Februar 2013 14:42 > > > > An: [email protected] > > > > Betreff: Re: AW: Class loading problem in TomEE 1.5.1 > > > > > > > > yep, i just commited it today so it will be available tomorrow > > > > > > > > *Romain Manni-Bucau* > > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > > > *Blog: **http://rmannibucau.wordpress.com/*< > > > > http://rmannibucau.wordpress.com/> > > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > > > *Github: https://github.com/rmannibucau* > > > > > > > > > > > > > > > > 2013/2/6 <[email protected]> > > > > > > > > > What should I rebuild from sources? :) I just replaced as proposed: > > > > > > > > > > org.apache.commons.logging.Log=org.apache.commons.logging.impl.L > > > > > og > > > > > 4J > > > > > Lo > > > > > gger > > > > > by > > > > > org.apache.commons.logging.Log=org.apache.openejb.log.commonslog > > > > > gi > > > > > ng > > > > > .L > > > > > og4J4AppOpenEJB4ContainerLog > > > > > > > > > > in my commons-logging.properties. > > > > > Or I got you wrong and this workaround will work only in future > > builds? > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > > > Von: Romain Manni-Bucau [mailto:[email protected]] > > > > > Gesendet: Mittwoch, 6. Februar 2013 12:09 > > > > > An: [email protected] > > > > > Betreff: Re: AW: Class loading problem in TomEE 1.5.1 > > > > > > > > > > you rebuilt it from sources? > > > > > > > > > > *Romain Manni-Bucau* > > > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > > > > *Blog: **http://rmannibucau.wordpress.com/*< > > > > > http://rmannibucau.wordpress.com/> > > > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > > > > *Github: https://github.com/rmannibucau* > > > > > > > > > > > > > > > > > > > > 2013/2/6 <[email protected]> > > > > > > > > > > > Just tried proposed workaround and got exception: > > > > > > > > > > > > Error configuring application listener of class > > > > > > com.opensymphony.webwork.lifecycle.SessionLifecycleListener > > > > > > java.lang.ExceptionInInitializerError > > > > > > at > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > > > Method) > > > > > > at > > > > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeCons > > > > > tr > > > > > uc > > > > > to > > > > > rAccessorImpl.java:57) > > > > > > at > > > > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Delega > > > > > ti > > > > > ng > > > > > Co > > > > > nstructorAccessorImpl.java:45) > > > > > > at > > > > > java.lang.reflect.Constructor.newInstance(Constructor.java:525) > > > > > > at > > > > > > > > > > > org.apache.webbeans.inject.InjectableConstructor.doInjection(Inj > > > > > ec > > > > > ta > > > > > bl > > > > > eConstructor.java:89) > > > > > > at > > > > > > > > > > > org.apache.openejb.cdi.ConstructorInjectionBean.createInstance(C > > > > > on > > > > > st > > > > > ru > > > > > ctorInjectionBean.java:77) > > > > > > at > > > > > > > > > > > org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwb > > > > > Be > > > > > an > > > > > .j > > > > > ava:186) > > > > > > at > > > > > > > org.apache.openejb.core.WebContext.newInstance(WebContext.java:107) > > > > > > at > > > > > > > > > > > org.apache.tomee.catalina.JavaeeInstanceManager.newInstance(Java > > > > > ee > > > > > In > > > > > st > > > > > anceManager.java:55) > > > > > > at > > > > > > > > > > > org.apache.tomee.catalina.JavaeeInstanceManager.newInstance(Java > > > > > ee > > > > > In > > > > > st > > > > > anceManager.java:48) > > > > > > at > > > > > > > > > > > org.apache.catalina.core.StandardContext.listenerStart(StandardC > > > > > on > > > > > te > > > > > xt > > > > > .java:4727) > > > > > > at > > > > > > > > > > > org.apache.catalina.core.StandardContext.startInternal(StandardC > > > > > on > > > > > te > > > > > xt > > > > > .java:5285) > > > > > > at > > > > > > > > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > > > > > > at > > > > > > > > > > > > > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase. > > > > > java:901) > > > > > > at > > > > > > > > > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:8 > > > 77 > > > ) > > > > > > at > > > > > > > > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) > > > > > > at > > > > > > > > > > > org.apache.catalina.startup.HostConfig.deployDescriptor(HostConf > > > > > ig > > > > > .j > > > > > av > > > > > a:657) > > > > > > at > > > > > > > > > > > org.apache.catalina.startup.HostConfig$DeployDescriptor.run(Host > > > > > Co > > > > > nf > > > > > ig > > > > > .java:1637) > > > > > > at > > > > > > > > > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:4 > > > 71 > > > ) > > > > > > at > > > > > > > java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > > > > > > at > java.util.concurrent.FutureTask.run(FutureTask.java:166) > > > > > > at > > > > > > > > > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec > > > > > ut > > > > > or > > > > > .j > > > > > ava:1110) > > > > > > at > > > > > > > > > > > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor. > > > > > java:603) > > > > > > at java.lang.Thread.run(Thread.java:722) > > > > > > Caused by: org.apache.commons.logging.LogConfigurationException: > > > > > > User-specified log class > > > > > > > > 'org.apache.openejb.log.commonslogging.Log4J4AppOpenEJB4ContainerLog' > > > > > > cannot be found or is not useable. > > > > > > at > > > > > > > > > > > org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplem > > > > > en > > > > > ta > > > > > ti > > > > > on(LogFactoryImpl.java:874) > > > > > > at > > > > > > > > > > > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFa > > > > > ct > > > > > or > > > > > yI > > > > > mpl.java:604) > > > > > > at > > > > > > > > > > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFa > > > > > ct > > > > > or > > > > > yI > > > > > mpl.java:336) > > > > > > at > > > > > > > > > > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFa > > > > > ct > > > > > or > > > > > yI > > > > > mpl.java:310) > > > > > > at > > > > > > org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685) > > > > > > at > > > > > > > > > > > com.opensymphony.webwork.lifecycle.SessionLifecycleListener.<cli > > > > > ni > > > > > t> > > > > > (S > > > > > essionLifecycleListener.java:28) > > > > > > ... 24 more > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > > > > Von: Romain Manni-Bucau [mailto:[email protected]] > > > > > > Gesendet: Mittwoch, 6. Februar 2013 11:21 > > > > > > An: [email protected] > > > > > > Betreff: Re: AW: Class loading problem in TomEE 1.5.1 > > > > > > > > > > > > that's more or less a bug in commons-logging which respects > > > > > > classloading but uses the current class loader configuration > > > > > > even when instantiating classes from upper classloader. > > > > > > > > > > > > It means it works for your app but not for the container part > > > > > > (myfaces) which will reuse your config but the parent > classloader. > > > > > > > > > > > > The workaround i added is the following one: > > > > > > > > > > > > replace > > > > > > org.apache.commons.logging.Log=org.apache.commons.logging.impl > > > > > > .L > > > > > > og > > > > > > 4J > > > > > > Lo > > > > > > gger > > > > > > by > > > > > > > > org.apache.commons.logging.Log=org.apache.openejb.log.commonslogging. > > > > > > Log4J4AppOpenEJB4ContainerLog > > > > > > > > > > > > i opened https://issues.apache.org/jira/browse/TOMEE-758 about > > > > > > it > > > > > > > > > > > > PS: you can implement any other facade you'd like to match > > > > > > your need > > > > > > > > > > > > *Romain Manni-Bucau* > > > > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > > > > > > *Blog: **http://rmannibucau.wordpress.com/*< > > > > > > http://rmannibucau.wordpress.com/> > > > > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau* > > > > > > *Github: https://github.com/rmannibucau* > > > > > > > > > > > > > > > > > > > > > > > > 2013/2/5 <[email protected]> > > > > > > > > > > > > > just have reproduced not exactly the same issue, but very > > > > > > > similar, in my test project: > > > > > > > https://github.com/eiskonzept/tomee > > > > > > > Just package the app and start tomee-plugin with node1 profile. > > > > > > > > > > > > > > Explanation: > > > > > > > I have two dependencies in my project: commons-logging and > log4j. > > > > > > > If I package both libraries in my webapp I become: > > > > > > > "LogConfigurationException: User-specified log class > > > > > > > 'org.apache.commons.logging.impl.Log4JLogger' cannot be > > > > > > > found or is not useable" > > > > > > > which means that commons-logging can't find Log4JLogger class. > > > > > > > > > > > > > > When I put log4j.jar in tomee's lib folder it works just fine. > > > > > > > But I can't do this with other libraries in real Project, > > > > > > > because we use some special versions of libraries(quartz for > > > > > > > example) which are > > > > > > provided by tomee too. > > > > > > > > > > > > > > is there any possibility to use my own versions of libraries > > > > > > > which already provided by tomee? > > > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > > > > > Von: [email protected] > > > > > > > [mailto:[email protected]] > > > > > > > Gesendet: Montag, 4. Februar 2013 13:12 > > > > > > > An: [email protected] > > > > > > > Betreff: AW: AW: Class loading problem in TomEE 1.5.1 > > > > > > > > > > > > > > I got further by copying log4j.jar in CATALINA_BASE/lib > > > > > > > folder, but then I got next NoClassDefFoundError. > > > > > > > Most confusing is that the same application deployed in > > > > > > > TomEE Version 1.5.0 works perfectly. > > > > > > > I believe it is some kind of class loader issue. Are there > > > > > > > some significant class loader changes between version 1.5.0 > > > > > > > and > > 1.5.1? > > > > > > > It looks like that container is loading some classes from > > > > > > > container provided commons-logging.jar first, and then can't > > > > > > > find some classes in WEB-APP/lib which needed by > commons-logging. > > > > > > > > > > > > > > -----Ursprüngliche Nachricht----- > > > > > > > Von: Romain Manni-Bucau [mailto:[email protected]] > > > > > > > Gesendet: Montag, 4. Februar 2013 12:13 > > > > > > > An: [email protected] > > > > > > > Betreff: Re: AW: Class loading problem in TomEE 1.5.1 > > > > > > > > > > > > > > Hard to help since we dont "see" the issue > > > > > > > > > > > > > > You probably have some conflict in your app. > > > > > > > > > > > > > > Check your deps maybe > > > > > > > Le 4 févr. 2013 12:11, <[email protected]> a écrit > : > > > > > > > > > > > > > > > I have tried both: with commons-logging in my war file and > > > without. > > > > > > > > With same result(exception) in both cases. > > > > > > > > I have tried to isolate the issue in small sample app, but > > > > > > > > without success. Unfortunately I can't provide full > > > > > > > > application for > > > > > > reproduction. > > > > > > > > Could you give some hints, how can I help you to reproduce > > > > > > > > the problem on your side or solve the issue by myself? > > > > > > > > > > > > > > > > > > > > > > > > > Note: did you put commons-logging in your app too? > > > > > > > > > > > > > > > > > can you reproduce it in a sample webapp? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
