Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6409194

RMI debugging always writes to the console no matter what config is specified

    XMLWordPrintable

Details

    • 5.0
    • b80
    • sparc
    • solaris_10

    Backports

      Description

        FULL PRODUCT VERSION :
        java version "1.5.0_06"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
        Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

        ADDITIONAL OS VERSION INFORMATION :
        All Operating Systems

        A DESCRIPTION OF THE PROBLEM :
        I am trying to debug some RMI problems I am having, so I turned on RMI debugging and write the information to a file. However with this configuration (which should write all relevant information to a file) some information is still written to the console. The information is coming from the logger sun.rmi.server.Util.

        It seems that this is because in the class sun.rmi.server.Util the field serverRefLog is initialised using the unitialised value of the field logLevel in the same class.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        1. Set up source code and logging.properties as shown below
        2. run java -Djava.util.logging.config.file=logging.properties test.Client


        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        No output should appear on the console
        ACTUAL -
        Some output appears in the console of the form
        28-Mar-2006 12:39:38 sun.rmi.server.Util computeMethodHash

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        logging.properties

        handlers = java.util.logging.FileHandler
        .level = OFF
        sun.rmi.level = ALL

        Server.java

        package test;
        import java.rmi.*;
        public interface Server extends Remote {}

        ServerImpl.java

        package test;
        import java.rmi.*;
        import java.rmi.registry.*;
        import java.rmi.server.*;
        public class ServerImpl extends UnicastRemoteObject implements Server {
            public ServerImpl() throws RemoteException {}

            public void main(String[] argv) throws Exception {
                LocateRegistry.createRegistry(1234);
                Naming.rebind("//localhost:1234/Server", new ServerImpl());
            }
        }
        ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

                peterjones Peter Jones
                tbell Tim Bell
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: