2 Replies Latest reply on Apr 13, 2009 8:38 PM by Shreyas Shinde

    Errors with Corba service when replacing log4j with custom l

    Shreyas Shinde Newbie

      Hello,

      I have implemented the org.jboss.logging.LoggerPlugin class to use the JDK logger. When I start the 'all' profile by specifying my custom logger plugin I get Exceptions in Corba service.

      It appears that the service is trying to use a log4j instance instead of using my log plugin. IAm I missing anything here? I have implemented the interface and made the implementation available to JBoss using the -L option during startup. Any other pieces I need to configure?

      I am using JBoss 5.0.0.CR2 on Windows and Linux.

      Thanks,

      Shreyas

      This is how I am starting the 'all' profile:

      run.bat -b 0.0.0.0 -c all -Dorg.jboss.logging.Logger.pluginClass=test.jdk.logger.LoggerPlugin -L my-logger-plugin.jar -Djboss.messaging.ServerPeerID=141 -Djava.util.logging.config.file="c:\logging.properties"


      Here is the exception:

      SEVERE: Error installing to Start: name=jboss:service=CorbaORB state=Create mode
      =Manual requiredState=Installed
      java.lang.NullPointerException
       at org.apache.avalon.framework.logger.Log4JLogger.isDebugEnabled(Log4JLo
      gger.java:115)
       at org.jacorb.orb.ORBSingleton.configure(Unknown Source)
       at org.jacorb.orb.ORB.configure(Unknown Source)
       at org.jacorb.orb.ORB.set_parameters(Unknown Source)
       at org.omg.CORBA.ORB.init(ORB.java:337)
       at org.jboss.iiop.CorbaORBService.startService(CorbaORBService.java:297)
      
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
      upport.java:376)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
      eanSupport.java:322)
       at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch


        • 1. Re: Errors with Corba service when replacing log4j with cust
          David Lloyd Master

          There is already a JDK logger plugin available: "org.jboss.logging.jdk.JDK14LoggerPlugin". If you want to use the JDK logging plugin, pass in the "--log=jdk" argument to the run script. Be aware that JDK logging won't be fully functional though. In 5.1.0 we've introduced a log bridge component and improved JDK LogManager that allows JDK logging and log4j messages to be forwarded to the same log.

          • 2. Re: Errors with Corba service when replacing log4j with cust
            Shreyas Shinde Newbie

            Hello David,

            I need to use the JDK logger that my plugin provides as it sets up the log levels and log handlers required by my applications. But if some of the component services in JBoss need a log4j instance instead of the logger plugin then the plugin model is not viable for me.

            Besides the three parameters (name of the plugin class, implementation JAR and the logging.properties file) is there anything else that the" --log=jdk" setup that I need to do get my logger plugin to work with all component services?

            Thanks,

            Shreyas