Websphere 6.1 Issue

Hi,  Just a repost of the problem we are having on Websphere from another thread.

Originally posted by: alana
Hi, I am getting the same error with rc1 svn rev 1379 when I run under Websphere.  On Tomcat, everything seems to work.  On Websphere 6.1 I get the following exception:
    Caused by: liquibase.exception.ServiceNotFoundException: liquibase.exception.ServiceNotFoundException: liquibase.exception.ServiceNotFoundException: Could not find implementation of liquibase.logging.Logger       at liquibase.logging.LogFactory.getLogger(LogFactory.java:19)       at liquibase.integration.spring.SpringLiquibase.(SpringLiquibase.java:125)       at

I am trying RC2, to see if it fixes the problem.

Alana

The results of a little further digging

Originally posted by: alana
Hi again,

Getting the same error with RC2.  I traced through the code an found that CloasLoaderResourceAccessor.getResource(liquibase/logging) returns an enumeration with no elements.
This causes nothing to be added to List associated with the key  “liquibase.Logging.Logger” on classesBySuperclass.  This is the root of the error.    The Websphere classLoader object is
com.ibm.ws.classloader.CompoundClassLoader.  I am now trying to figure out why the classloader returns nothing.  Any ideas?

Thanks,
Alana

Repost of the workaround that i discovered

Originally posted by: alana
Hi,

I was able to get past this exception by setting an option in Websphere to load classes with the local class loader first (parent last)
This is not the best option to run in production though:  According to IBM’s doc at

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/topic/com.ibm.websphere.base.doc/info/aes/ae/urun_rappsvr.html

If you select Parent last, your application can override classes contained in the parent class loader, but this action can potentially result in ClassCastException or linkage errors if you have mixed use of overridden classes and non-overridden classes.

Since this is not the default setting, I am sure our business partners would not want it set in their production environments.

Thanks,
Alana

Hi,
The work around caused us another serious problem.  Setting Websphere to use the application class loader first, did allow Liquibase to run.  But it prevents other sections of our code from running.    Our code throws the following exception:

    Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactory Impl incompatible with javax.xml.parsers.SAXParserFactory

We make use of java.beans.XMLDecoder which behind the scenes makes use of SAXParserFactory.  Normally in both the Sun and IBM JVM’s, when the class loader is set to the parent class loader first, javax.xml.parsers.SAXParserFactory is used.  Our code base has a dependency on xercesImpl.jar.  So by setting the class loader to application first, the JVM tries to use the SAXParserFactoryImpl that is part of xerces.  Which is exactly why IBM had the warning that using Application First (Parent Last) is a bad idea. 

This has become a show stopper issue for us.  What information can we provide to help.

Thanks,
Alana

Messing with the classloader order does always seem to cause problems.  Could you try the RC3 build, or have you already?

Nathan

It does appear to be an issue with the stripes ResolverUtil class which I took http://www.stripesframework.org/jira/browse/STS-666

I’m trying to follow what they did to determine if there is a work around.  The same ResolverUtil class has been used several other places including Apache Camel, where they made a custom WEbSphereResulverUtil class (http://www.jarvana.com/jarvana/view/org/apache/camel/apache-camel/1.6.0/apache-camel-1.6.0-src.zip!/apache-camel-1.6.0/src/camel-core/src/main/java/org/apache/camel/util/WebSphereResolverUtil.java?format=ok) but I don’t think their work around will work.

Nathan

Thanks.  Why don’t you think WEbSphereResulverUtil work around will work?  Do you have a Websphere platform to test against?  If not, let me know what you need, and I can run them on mine.   

Thanks again,
Alana

I wasn’t quite sure what it was trying to do was part of it.  I grabbed the newest code from Camel and replaced what I had with it, including the Websphere specific classes.  Could you try a new build from trunk?

I don’t have a websphere platform to test against.

Nathan

Hi Nathan,

The Camel patch has fixed the problem.  Your awesome. :)  I have tested it with Websphere 6.1 on both Windows and AIX.  In case you are interested, IBM provides 60 day trials of Websphere (full blown) on their download site. 

Thanks again,
Alana

Thanks for testing it out.  There were a few changes in RC5, if you could do a quick test with that too, that would be great.

Nathan