2 Replies Latest reply on Aug 14, 2002 11:31 AM by romalley

    NoSuchMethod exception deploying two Server instances

    romalley

      With JBoss 3.0.0 with Tomcat imbededed, I have copied the /server/default folder over to /server/two in order to startup two instances of JBoss.

      I've have NOT modified the JNDI naming service entry in conf/jboss-service.xml yet because I figured I'd wait to see some kind of error caused by duplicate use of this port before deleting it. Not sure what to do with JNDI -- maybe both services can look on the same port. Help here would be appreciated.

      Nevertheless, I've modified the /deploy/tomcat4-service.xml file to change the HTTP connector to use another port besides 8080 (i'm using 8090). I've also modified the ajp13 connector to use 8019 rather than 8009.

      So, with the exception of JNDI, I should not have any duplicated port utilizations between the two servers.

      When I start server two from /bin using run -c two, I get the following error, no matter if my primary server is running or not:

      .
      .
      .
      .
      16:31:10,406 INFO [EARDeployer] Created
      16:31:10,406 INFO [JRMPInvoker] creating
      16:31:10,406 INFO [JRMPInvoker] created
      16:31:10,406 INFO [LocalInvoker] Creating
      16:31:10,416 INFO [LocalInvoker] Created
      16:31:10,416 INFO [URLDeploymentScanner] Creating
      16:31:10,416 INFO [URLDeploymentScanner] Created
      16:31:10,416 INFO [Log4jService] Starting
      16:31:10,426 INFO [AbstractDeploymentScanner$ScannerThread] Running
      16:31:10,426 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour
      ce:log4j.xml
      16:31:10,446 ERROR [MainDeployer] could not start deployment: file:/C:/jboss-3.0
      .0_tomcat-4.0.3/server/two/conf/jboss-service.xml
      java.lang.NoSuchMethodError
      at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:6
      15)
      at org.jboss.logging.Log4jService$URLWatchTimerTask.reconfigure(Log4jSer
      vice.java:482)
      at org.jboss.logging.Log4jService$URLWatchTimerTask.run(Log4jService.jav
      a:423)
      at org.jboss.logging.Log4jService.startService(Log4jService.java:281)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      62)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:894)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:340)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:243)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:465)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:314)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:216)
      at org.jboss.Main.boot(Main.java:142)
      at org.jboss.Main$1.run(Main.java:375)
      at java.lang.Thread.run(Thread.java:484)
      16:31:10,456 ERROR [Server] start failed
      .
      .
      .
      .
      Any ideas of what's wrong here with my log4j stuff?

      Bob

        • 1. Re: NoSuchMethod exception deploying two Server instances
          romalley

          Here I go replying to myself again. Nobody loves me!

          In looking at the log4j code, the Log4j version 1.1.3 DOMConfigurator.java has a static configure(URL) method on line 615, and it's invoking a doConfigure(URL, Hierarchy) method within itself after instanciating a new DOMConfigurator. The newer version 1.2.6 of log4j does not have a matching method because Hierarchy has been replaced with LoggerRepository in the calling argument list.

          So, have I somehow got two versions of log4j in my classpath?

          Any clues as to why ? All I've done is copy the /default folder to a new folder and executed it!!

          Bob

          • 2. Re: NoSuchMethod exception deploying two Server instances
            romalley

            Found it.

            I had placed a jar file from a third party application in the /lib folder and that jar happened to use a different version of log4j. Removed the jar (it's not needed there) and things are fine.

            Funny thing is that the jar file was there in my original default distribution too, so the order of the classpath must be kind of random.

            Bob