Issue Details (XML | Word | Printable)

Key: GRAILS-515
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Blocker Blocker
Assignee: Graeme Rocher
Reporter: Jesus Hinojosa
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Grails

Unable to deploy to WAS 6.0: The chosen LogFactory implementation does not extend LogFactory

Created: 19/Dec/06 12:14 PM   Updated: 30/Jul/07 09:03 AM   Resolved: 18/Jan/07 05:32 AM
Return to search
Component/s: None
Affects Version/s: 0.3.1, 0.4
Fix Version/s: 0.4

Time Tracking:
Not Specified

File Attachments: 1. Text File was_error.txt (36 kB)

Environment:
WebSphere Platform 6.0 [BASE 6.0.0.0 o0444.14] running with process name N840JZD7FF2EFBCNode01Cell\N840JZD7FF2EFBCNode01\server1 and process id 3044
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.2 IBM Windows 32 build cn142sr1w-20041028 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6
user.install.root = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/profiles/default
Java Home = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre
ws.ext.dirs = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/java/lib;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/profiles/default/classes;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/classes;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/installedChannels;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/ext;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/web/help;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/profiles/default/properties;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/properties;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/bootstrap.jar;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/j2ee.jar;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/lmproxy.jar;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6/lib/urlprotocols.jar
Java Library path = C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\bin;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\bin;C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\jre\bin;C:\Program Files\IBM\Rational\SDP\6.0\eclipse\jre\bin;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files\MKS\IntegrityClient\bin;C:\Windows\system32\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\WINDOWS\CWD_Build\Scramble;c:\WINDOWS\CWD_Build\Components\Dlls;C:\MQClient\bin;G:\Oracle920\BIN;C:\Program Files\SQLLIB\BIN;C:\Program Files\SQLLIB\HELP;C:\Program Files\1E\SMSNomad\;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\maven-2.0.4\bin;G:\OR816W32\bin;F:\public


 Description  « Hide

When trying to load a war file to WAs 6 and selecting the class loader option "Parent last", I get an error:

Caused by: org.apache.commons.logging.LogConfigurationException: The chosen LogFactory implementation does not extend LogFactory. Please check your configuration. (Caused by java.lang.ClassCastException: The application has specified that a custom LogFactory implementation should be used but Class 'com.ibm.ws.commons.logging.TrLogFactory' cannot be converted to 'org.apache.commons.logging.LogFactory'. The conflict is caused by the presence of multiple LogFactory classes in incompatible classloaders. Background can be found in http://jakarta.apache.org/commons/logging/tech.html. If you have not explicitly specified a custom LogFactory then it is likely that the container has set one without your knowledge. In this case, consider using the commons-logging-adapters.jar file or specifying the standard LogFactory from the command line. Help can be found @http://jakarta.apache.org/commons/logging/troubleshooting.html.).

Attached is the full log.



Graeme Rocher made changes - 08/Jan/07 05:32 AM
Field Original Value New Value
Fix Version/s 0.4 [ 12697 ]
Jesus Hinojosa added a comment - 09/Jan/07 03:30 PM

Does any one knows a work around to this issue ?


Graeme Rocher added a comment - 18/Jan/07 05:32 AM

This is not a Grails specific problem as there have been similar problems when using Portlets with WebSphere:

http://www-1.ibm.com/support/docview.wss?uid=swg21220353

The problem is related to the use of Jakarta commons logging, but there are loads of applications that use this now so IBM should really fix their web server. In the meantime they have provided a 20-page PDF doc on how to get commons-logging working with WebSphere: http://www-1.ibm.com/support/docview.wss?uid=swg27004610

If you have any luck, let us know with the steps you had to go through to get it to work


Graeme Rocher made changes - 18/Jan/07 05:32 AM
Resolution Won't Fix [ 2 ]
Status Open [ 1 ] Resolved [ 5 ]
Jesus Hinojosa added a comment - 23/Jan/07 11:53 AM

After several attempts, this is waht it worked:

1.- Delete commons-logging-1.1.jar from the lib directory
2.- add commons-logging-adepters-1.1.ar to the lib directory
3.- After adding the application. modify the class loader to parent last.

So far it seems to work, I hope this is useful.


Huub Daems added a comment - 30/Jul/07 09:03 AM

I have a working solution for WebSphere 5.1.1.6 and 5.1.1.12 for an ear project. And for the looks of it i hope it will also work for version 6.

1. set classloading to "parent last" (you want to have your libs first to be seen/used)
2. add to the first ejb jar loaded or the ear project (i know this is RAD lingo, sorry for that) a directory /META-INF/services
3. create in this directory "services" a file named org.apache.commons.logging.LogFactory
4. put the following in the file org.apache.commons.logging.impl.LogFactoryImpl

Hope this was/is usefill.