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

Please make sure that *"all required logging files are provided with this
WAR file Or no other logging files are provided with this WAR file."*, so my
advise is to delete all of the logging jars from your web application and to
use the application server ones as WebSphere already ships these jars.

On Mon, Sep 14, 2009 at 12:03 PM, domincb <[email protected]> wrote:

>
> Yes, the loading policy is PARENT_LAST and APPLICATION.
>
> I have tried to put a 1.0.4 version of commons-logging.jar, and I get the
> same message in the logs, and if I put the version 1.1.1, the exception is
> the next one:
>
> SRVE0026E: [Error de servlet]-[java.lang.Exception:
> java.lang.ExceptionInInitializerError
>        at
>
> com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1461)
>        at
>
> com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1312)
>        at
>
> com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:84)
>        at
> com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:745)
> ...
>
> 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://commons.apache.org/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://commons.apache.org/logging/troubleshooting.html.)
>
>
> any suggestions to resolve the error?
>
>
>
> Hazem Saleh-2 wrote:
> >
> > Did you set the class loading policy to (PARENT_LAST) ?
> >
> > On Fri, Sep 11, 2009 at 2:20 PM, domincb <[email protected]> wrote:
> >
> >>
> >> I tried to put the log4j library into an myfaces application in a
> >> Websphere
> >> application server (6.0 version). When I inserted the commons-loggin and
> >> log4j librarys I get the next error:
> >>
> >> 00000034 ServletWrappe E   SRVE0100E: Did not realize init() exception
> >> thrown by servlet Faces Servlet: java.lang.IllegalStateException: No
> >> Factories configured for this Application. This happens if the
> >> faces-initialization does not work at all - make sure that you properly
> >> include all configuration settings necessary for a basic faces
> >> application
> >> and that all the necessary libs are included. Also check the logging
> >> output
> >> of your web application and your container for any exceptions!
> >> If you did that and find nothing, the mistake might be due to the fact
> >> that
> >> you use some special web-containers which do not support registering
> >> context-listeners via TLD files and a context listener is not setup in
> >> your
> >> web.xml.
> >> A typical config looks like this;
> >> <listener>
> >>
> >>
> >>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >> </listener>
> >>
> >>        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
> >>        at javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
> >>        at
> >>
> >>
> com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:262)
> >>        at
> >>
> >>
> com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1319)
> >> etc....
> >>
> >>
> >> The web.xml contains the listener (as the message says) and the librarys
> >> in
> >> the /lib:
> >>
> >> commons-beanutils-1.7.0.jar
> >> commons-collections-3.1.jar
> >> commons-digester-1.8.jar
> >> commons-fileupload-1.2.1.jar
> >> commons-lang-2.1.jar
> >> myfaces-api-1.1.3.jar
> >> myfaces-impl-1.1.3.jar
> >> ojdbc14_g.jar
> >> tomahawk-1.1.3.jar
> >> commons-logging.jar (version 1.0.3, and configured for websphere*)
> >> log4j-1.2.8.jar
> >>
> >> Any solution??
> >>
> >> *is from another applications instaled in the server and have a
> >> commons-logging.properties, as appear in
> >> http://www-01.ibm.com/support/docview.wss?uid=swg27004610&aid=1
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/log4j-and-myfaces-problem-in-websphere-tp25399180p25399180.html
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Hazem Ahmed Saleh Ahmed
> >
> > Author of (The Definitive Guide to Apache MyFaces and Facelets):
> >
> http://www.amazon.com/Definitive-Guide-Apache-MyFaces-Facelets/dp/1590597370
> > http://www.amazon.com/-/e/B002M052KY
> >
> > Web blog: http://www.jroller.com/page/HazemBlog
> >
> > [Web 2.0] Google Maps Integration with JSF:
> > http://code.google.com/p/gmaps4jsf/
> > http://www.ibm.com/developerworks/library/wa-aj-gmaps/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/log4j-and-myfaces-problem-in-websphere-tp25399180p25432543.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 
Hazem Ahmed Saleh Ahmed

Author of (The Definitive Guide to Apache MyFaces and Facelets):
http://www.amazon.com/Definitive-Guide-Apache-MyFaces-Facelets/dp/1590597370
http://www.amazon.com/-/e/B002M052KY

Web blog: http://www.jroller.com/page/HazemBlog

[Web 2.0] Google Maps Integration with JSF:
http://code.google.com/p/gmaps4jsf/
http://www.ibm.com/developerworks/library/wa-aj-gmaps/

Reply via email to