1 Reply Latest reply: Apr 13, 2011 12:23 AM by Otto Bertalan RSS

    dbms_java.start_jmx_agent - java.util.MissingResourceException

    Otto Bertalan
      I tried to start jmx agent in oracle database (Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production)

      Running the following program and ran it as oracle user SCOTT

      declare

      a varchar2(200);

      b varchar2(200);

      begin

      dbms_java.set_output(20000);

      a:=dbms_java.set_property('com.sun.management.jmxremote.authenticate', 'false');

      dbms_java.start_jmx_agent('12345', 'false', 'false');

      end;

      Got the following java exception:

      java.util.MissingResourceException: Can't find bundle for base name sun.management.resources.agent, locale en_US
           at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
           at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:726)
           at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)
           at sun.management.Agent.initResource(Agent.java:270)
           at sun.management.Agent.getText(Agent.java:280)
           at sun.management.Agent.error(Agent.java:257)
           at sun.management.Agent.error(Agent.java:251)
           at sun.management.Agent.premain2(Agent.java:107)
           at oracle.aurora.rdbms.JMXAgent.premain(JMXAgent.java:172)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at sun.management.Agent.startAgent(Agent.java:219)
           at oracle.aurora.rdbms.JMXAgent.startOJVMAgent(JMXAgent.java:248)
      java.lang.reflect.InvocationTargetException
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at sun.management.Agent.startAgent(Agent.java:219)
           at oracle.aurora.rdbms.JMXAgent.startOJVMAgent(JMXAgent.java:248)
      Caused by: java.lang.Error: Fatal: Resource for management agent is missing
           at sun.management.Agent.initResource(Agent.java:274)
           at sun.management.Agent.getText(Agent.java:280)
           at sun.management.Agent.error(Agent.java:257)
           at sun.management.Agent.error(Agent.java:251)
           at sun.management.Agent.premain2(Agent.java:107)
           at oracle.aurora.rdbms.JMXAgent.premain(JMXAgent.java:172)


      Questions:
      Does anybody now what should be the name of the the missing properties file ?
      What should it contain?
      Should it be loaded as a java resource or should it be stored in the file system under $ORACLE_HOME/javavm?


      kind regards

      Otto Bertalan