[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1721) JSF RI wrapped commons-logging disables Hibernate commons-logging
Christian Bauer (JIRA)
jira-events at lists.jboss.org
Wed Jul 25 09:13:46 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1721?page=comments#action_12369992 ]
Christian Bauer commented on JBSEAM-1721:
-----------------------------------------
Workaround: Put the following into a commons-logging.properties in the test classpath.
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> JSF RI wrapped commons-logging disables Hibernate commons-logging
> -----------------------------------------------------------------
>
> Key: JBSEAM-1721
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1721
> Project: JBoss Seam
> Issue Type: Bug
> Components: JSF
> Reporter: Christian Bauer
>
> Hibernate uses this to log stuff:
> import org.apache.commons.logging.LogFactory;
> private static final org.apache.commons.logging.Log commonsLog = LogFactory.getLog(...);
> The JSF RI has a wrapped commons-logging:
> import com.sun.org.apache.commons.logging.LogFactory;
> private static final com.sun.org.apache.commons.logging.Log commonsLog = LogFactory.getLog(...);
> If both are on the classpath (in my case, a SeamTest unit - problem does not appear with regular WAR/EAR deployment on AS), Hibernate doesn't log anything anymore to log4j. In other words, try to get Hibernate log output in a Seam test - no go.
> Same if you try to use commons-logging directly in your application/unit test: it doesn't work with the normal commons-logging LogFactory, but it works if you take the com.sun wrapped LogFactory.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list