Grails

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Won't Fix
  • Affects Version/s: 0.3.1, 0.4
  • Fix Version/s: 0.4
  • Component/s: None
  • Labels:
    None
  • Environment:

Description

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.

Activity

Hide
Jesus Hinojosa added a comment -

Does any one knows a work around to this issue ?

Show
Jesus Hinojosa added a comment - Does any one knows a work around to this issue ?
Hide
Graeme Rocher added a comment -

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

Show
Graeme Rocher added a comment - 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
Hide
Jesus Hinojosa added a comment -

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.

Show
Jesus Hinojosa added a comment - 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.
Hide
Huub Daems added a comment -

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.

Show
Huub Daems added a comment - 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.
Hide
Graeme Rocher added a comment -

Bulk closing bunch of resolved issues

Show
Graeme Rocher added a comment - Bulk closing bunch of resolved issues

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: