0 Replies Latest reply on Feb 22, 2004 3:58 PM by erikgu

    Hibernate JMX and struts conflicts in JBOSS 3.2.1

    erikgu Newbie

      I've created a test jsp that manage to get my hibernate populated POJO’s, but after adding a hibernate jmx / sar to my ear, my struts/web application doesn’t work. (I m using Struts 1.1, hibernate 2.1.1 and jboss 3.2.1.) All worked fine with my dummy DAO, but after adding my hibernate jmx I'm getting the following error;

      2004-02-20 17:59:33,354 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/myappadmin:invoker]: Loading container servlet invoker
      2004-02-20 17:59:33,745 INFO [org.jboss.web.catalina.EmbeddedCatalinaService41] deploy, ctxPath=/myapp, warUrl=file:/C:/jboss3.2.1-2004_01_20/jboss-3.2.1_tomcat-4.1.24/server/default/tmp/deploy/server/default/deploy/myappapp.ear/50.myappapp.ear-contents/myappweb.war
      2004-02-20 17:59:33,795 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploying class repositories to work directory C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp
      2004-02-20 17:59:34,116 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy class files /WEB-INF/classes to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\classes
      2004-02-20 17:59:34,116 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/commons-beanutils.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\commons-beanutils.jar
      2004-02-20 17:59:34,146 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/commons-collections.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\commons-collections.jar
      2004-02-20 17:59:34,186 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/commons-digester.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\commons-digester.jar
      2004-02-20 17:59:34,206 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/commons-fileupload.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\commons-fileupload.jar
      2004-02-20 17:59:34,236 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/commons-lang.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\commons-lang.jar
      2004-02-20 17:59:34,256 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/commons-logging.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\commons-logging.jar
      2004-02-20 17:59:34,276 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/commons-validator.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\commons-validator.jar
      2004-02-20 17:59:34,296 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/myapp-client.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\myapp-client.jar
      2004-02-20 17:59:34,316 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/jakarta-oro.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\jakarta-oro.jar
      2004-02-20 17:59:34,336 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/jstl.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\jstl.jar
      2004-02-20 17:59:34,356 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/standard.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\standard.jar
      2004-02-20 17:59:34,416 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/struts-el.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\struts-el.jar
      2004-02-20 17:59:34,446 INFO [org.jboss.web.localhost.Engine] WebappLoader[/myapp]: Deploy JAR /WEB-INF/lib/struts.jar to C:\jboss-3.2.1_tomcat-4.1.24\server\default\tmp\deploy\server\default\deploy\work\MainEngine\localhost\myapp\WEB-INF\lib\struts.jar
      2004-02-20 17:59:37,601 INFO [org.jboss.web.localhost.Engine] ContextConfig[/myapp]: Added certificates -> request attribute Valve
      2004-02-20 17:59:59,132 INFO [org.jboss.web.catalina.EmbeddedCatalinaService41] Using Java2 parent classloader delegation: true
      2004-02-20 18:00:02,506 INFO [org.jboss.web.localhost.Engine] StandardManager[/myapp]: Seeding random number generator class java.security.SecureRandom
      2004-02-20 18:00:02,506 INFO [org.jboss.web.localhost.Engine] StandardManager[/myapp]: Seeding of random number generator has been completed
      2004-02-20 18:00:02,957 INFO [org.apache.struts.util.PropertyMessageResources] Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
      2004-02-20 18:00:02,957 INFO [org.apache.struts.util.PropertyMessageResources] Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
      2004-02-20 18:00:03,007 ERROR [org.jboss.web.localhost.Engine] StandardContext[/myapp]: Servlet /myapp threw load() exception
      javax.servlet.ServletException: Servlet.init() for servlet action threw exception
       at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:963)
       at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
       at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
       at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:417)
       at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:266)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
       at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy7.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      2004-02-20 18:00:03,017 ERROR [org.jboss.web.localhost.Engine] ----- Root Cause -----
      org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log
       at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:555)
       at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:289)
       at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:414)
       at org.apache.commons.digester.Digester.<init>(Digester.java:352)
       at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1405)
       at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
       at javax.servlet.GenericServlet.init(GenericServlet.java:256)
       at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
       at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
       at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
       at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(EmbeddedCatalinaService41.java:417)
       at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedCatalinaService41.java:266)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
       at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
       at $Proxy7.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:211)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:190)
      Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log
       at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:420)
       at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:548)
       ... 32 more
      Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log
       at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416)
       ... 33 more
      2004-02-20 18:00:03,017 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/myapp:default]: Loading container servlet default
      2004-02-20 18:00:03,017 INFO [org.jboss.web.localhost.Engine] StandardWrapper[/myapp:invoker]: Loading container servlet invoker


      How do I configure my struts/hibernate application with correct logging?

      I ve followed the http://www.hibernate.org/66.html guide.

      Best regards
      Erik