3 Replies Latest reply on Oct 22, 2002 9:29 AM by elowndes

    NoSuchMethodError in Logger

    elowndes

      Hi,

      I've just installed JBoss 3.0.0 w/ Tomcat 4.1.12 (running on a Windows 2000 server as a windows service via JavaService.exe). I'm using the standard 'all' configuration. I'm working on writing a remote Java messaging publisher/subscriber. When I try to look up the topic connection factory using this code:

      Properties properties = new Properties();

      properties.put( Context.PROVIDER_URL,
      "jnp://63.98.138.114:1099");
      properties.put( Context.INITIAL_CONTEXT_FACTORY,
      "org.jnp.interfaces.NamingContextFactory" );
      properties.put( Context.URL_PKG_PREFIXES,
      "org.jboss.naming:orn.jnp.interfaces" );

      Context jndi = new InitialContext(properties);

      TopicConnectionFactory conFactory = (TopicConnectionFactory)jndi.lookup("ConnectionFactory");

      I get the following error message:

      java.lang.NoSuchMethodError
      at org.jboss.logging.Logger.isDebugEnabled(Logger.java:108)
      at org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory.getObjectInstance(SpyConnectionFactoryObjectFactory.java:42)
      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:299)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:549)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
      at javax.naming.InitialContext.lookup(InitialContext.java:345)


      Does anyone have any ideas? I already tried updating the log4j.jar file to the latest version.

      Thanks,
      Erik

        • 1. Re: NoSuchMethodError in Logger
          prabhakar

          Add $jboss/client/lib/jboss-common-client.jar to the classpath of your client.

          -prabhakar

          • 2. Re: NoSuchMethodError in Logger
            elowndes

            I was missing the jboss-common-client.jar file in my classpath. I now have jnp-client.jar, jnet.jar, jboss-common-client.jar and jbossmq-client.jar in my classpath and I'm still getting the same error. I'm running version 1.3.1_05 of the JDK on the client side (due to problems with the debugger in JDK 1.4.x under Windows XP). The server is running JDK 1.4.1 on Windows 2000.

            • 3. Re: NoSuchMethodError in Logger
              elowndes

              Nevermind... I completely rebuilt my project (Sun One Studio) and classpath and things appear to be working now! I think there was an older version of Log4j in the classpath ahead of the newer version. Thanks for the pointer!