Re: log4j commons-logging WAS6.1.0.19 - Websphere

This is a discussion on Re: log4j commons-logging WAS6.1.0.19 - Websphere ; Perhaps you have QName class in multiple jars (you should only use the class loaded by websphere). If you're using eclipse, just CTRL+SHIFT+T and search for QName, it will give you all jars containing this class. If you have it ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: log4j commons-logging WAS6.1.0.19

  1. Re: log4j commons-logging WAS6.1.0.19

    Perhaps you have QName class in multiple jars (you should only use the class loaded by websphere).
    If you're using eclipse, just CTRL+SHIFT+T and search for QName, it will give you all jars containing this class.

    If you have it in your ear or web-inf/lib, that's it.

    But be cautious, perhaps you need the version you have in you app (WSFP QName class is for JAX-WS 2.0, while some ws engine use JAX-WS2.1 which use another version of QName class).

  2. Re: log4j commons-logging WAS6.1.0.19

    Hi,

    I have jax-rpc.jar in my web-inf/lib which has QName class , but that is needed by some classes in the application. Basically , this is what my app does:
    It hosts some WS-I Compliant webservices , but also consumes third party webservices which are not ws-i compliant and hence the axis and jax-rpc jars in web-inf/lib. Also the application is using openJPA. Everyhting is working on 6.1.0.17 , no issues. On 6.1.0.19 , with default class loading(parent first) my application seems to find log4j without any issues , but when the OpenJPA tries to initialize persistence env. it complains that log4j.priority class is not found and fails to initialize . If i change the class loading policy to parent last ,i get the NoClass def on handler class.
    Thanks for all your time.

  3. Re: log4j commons-logging WAS6.1.0.19

    This is the stack trace with default class loading (parent first) on 6.1.0.19 :

    [7/15/09 15:48:07:014 EDT] 0000002a PivotHandlerW E com.ibm.ws.webservices.engine.PivotHandlerWrapper bindExceptionToResponse WSWS3400I: Info: unexpected exception.
    java.lang.NoClassDefFoundError: org.apache.log4j.Priority
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 68)
    at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:129)
    at org.apache.openjpa.lib.log.Log4JLogFactory.newLogA dapter(Log4JLogFactory.java:33)
    at org.apache.openjpa.lib.log.LogFactoryAdapter.getLo g(LogFactoryAdapter.java:40)
    at org.apache.openjpa.lib.conf.ConfigurationImpl.getL og(ConfigurationImpl.java:225)
    at org.apache.openjpa.conf.OpenJPAConfigurationImpl.g etConfigurationLog(OpenJPAConfigurationImpl.java:1 475)
    at org.apache.openjpa.persistence.PersistenceProductD erivation$ConfigurationProviderImpl.setInto(Persis tenceProductDerivation.java:426)
    at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.n ewInstance(JDBCBrokerFactory.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:618)
    at org.apache.openjpa.kernel.Bootstrap.invokeFactory( Bootstrap.java:124)
    at org.apache.openjpa.kernel.Bootstrap.newBrokerFacto ry(Bootstrap.java:62)
    at org.apache.openjpa.persistence.PersistenceProvider Impl.createEntityManagerFactory(PersistenceProvide rImpl.java:78)
    at com.ibm.websphere.persistence.PersistenceProviderI mpl.createEntityManagerFactory(PersistenceProvider Impl.java:64)
    at com.ibm.websphere.persistence.PersistenceProviderI mpl.createEntityManagerFactory(PersistenceProvider Impl.java:34)
    at org.apache.openjpa.persistence.PersistenceProvider Impl.createEntityManagerFactory(PersistenceProvide rImpl.java:87)
    at org.apache.openjpa.persistence.PersistenceProvider Impl.createEntityManagerFactory(PersistenceProvide rImpl.java:52)
    at javax.persistence.Persistence.createEntityManagerF actory(Persistence.java:83)
    at javax.persistence.Persistence.createEntityManagerF actory(Persistence.java:60)
    at com.bcbssc.fastar.api.common.util.PersistenceUtil. getEntityManagerFactory(PersistenceUtil.java:46)
    at com.bcbssc.fastar.api.common.util.TransactionUtil. (TransactionUtil.java:34)
    at com.bcbssc.fastar.api.services.handlers.ProviderPa ymentHandler.handleRequest(ProviderPaymentHandler. java:45)
    at com.ibm.ws.webservices.engine.handlers.jaxrpc.Hand lerProxy.handleRequest(HandlerProxy.java:145)
    at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXR PCHandlerChain.handleRequest(JAXRPCHandlerChain.ja va:334)
    at com.ibm.ws.webservices.engine.handlers.soap.SOAPHa ndlerChain.handleRequest(SOAPHandlerChain.java:176 )
    at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXR PCHandler.invokeServerRequestHandler(JAXRPCHandler .java:506)
    at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXR PCSOAPHandler.invokeServerRequestHandler(JAXRPCSOA PHandler.java:184)
    at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXR PCHandler$1.invoke(JAXRPCHandler.java:380)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper. invoke(PivotHandlerWrapper.java:208)
    at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXR PCHandler.invoke(JAXRPCHandler.java:152)
    at com.ibm.ws.webservices.engine.handlers.WrappedHand ler.invoke(WrappedHandler.java:64)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper. invoke(PivotHandlerWrapper.java:228)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper. invoke(PivotHandlerWrapper.java:228)
    at com.ibm.ws.webservices.engine.WebServicesEngine.in voke(WebServicesEngine.java:336)
    at com.ibm.ws.webservices.engine.transport.http.WebSe rvicesServlet.doPost(WebServicesServlet.java:831)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:763)
    at com.ibm.ws.webservices.engine.transport.http.WebSe rvicesServletBase.service(WebServicesServletBase.j ava:341)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:1103)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:570)
    at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.h andleRequest(ServletWrapper.java:486)
    at com.ibm.ws.webcontainer.webapp.WebApp.handleReques t(WebApp.java:3440)
    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequ est(WebGroup.java:267)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:815)
    at com.ibm.ws.wswebcontainer.WebContainer.handleReque st(WebContainer.java:1461)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:118)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:458)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:387)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.ready(HttpInboundLink.java:267)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.sendToDiscriminators(NewConnectionIniti alReadCallback.java:214)
    at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.complete(NewConnectionInitialReadCallba ck.java:113)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCompletionListener.java :165)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletion Actions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:136)
    at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:195)
    at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:743)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:873)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1473)
    Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Priority
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:402)
    at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:347)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:83)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:5 97)
    ... 62 more



    Thanks,

  4. Re: log4j commons-logging WAS6.1.0.19

    Hi,
    I have tested the application without any changes(no changes to class loading and no changes wrt slf4j or jcl) on 6.1.0.25 (without any feature packs installed) and it worked fine . With WS Feature pack on 6.1.0.25 it gives the same log4j priority class not found. It seems like there is definitely a class loading issue on 6.1.0.19 (with or without WS Feature pack) , and with WS feature pack itself (immaterial of the WAS version).

  5. Re: log4j commons-logging WAS6.1.0.19

    It seems like there is definitely a class loading issue on 6.1.0.19 (with or without WS Feature pack) , and with WS feature pack itself (immaterial of the WAS version).

    Interesting, didn't knew about that.

    Since you really have classloading issues with PARENT_LAST, the only solution I see would be to use JCL 1.0.3 as described here http://www.ibm.com/developerworks/we...1_supauth.html.
    I've tested using this solution on 6.1.0.13 - it works.
    But, someone told me that on WAS 6.1.0.23 (without WSFP) it doesn't work. So be catious

    Of course, if 6.1.0.25 works for you perhaps sticking on 6.1.0.25 would be the better option .

    Anyone if someone knows what's the difference in JCL behaviour between all the WAS fixes, I would be very interested.

  6. Re: log4j commons-logging WAS6.1.0.19

    Hi,
    I think we are going to stick with 6.1.0.25 (thats is the server version in all our non-dev environments) and we are going to upgrade our dev servers to 6.1.0.25 . It is not perfect , upon deployment using RAD IDE we get a publishing error saying that we need the WSFP , but the app gets deployed and works fine. We will just have to live with RAD IDE error msg and restart the server manually whenever the projects gets built.

    Thanks for your time .

+ Reply to Thread