Update:  I'm able to induce a different set of exceptions by making the
com.avnet.jboss package available via JAR at ../lib/ext.  Which doesn't make
a heckuva lot of sense to me, so I don't know if I'm further along now or
not...  The following exceptions are thrown at startup, and then the server
proceeds to shut itself down (choking on what looks like every destroy()
along the way).

Does this one look at all familiar to anybody?  Pleeeeeeeze?

Bill
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
....
[Service Control] Registered with server
[Configuration] Could not create MBean
Adaptor:name=html(com.avnet.jboss.SecureHtmlAdaptorServer)
[Configuration] java.lang.NullPointerException
[Configuration]         at
javax.management.MBeanInfo.<init>(MBeanInfo.java:116)
[Configuration]         at
javax.management.MBeanInfo.clone(MBeanInfo.java:132)
[Configuration]         at
com.sun.management.jmx.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:188
9)
[Configuration]         at
org.jboss.configuration.ConfigurationService.create(ConfigurationService.jav
a:341)
[Configuration]         at
org.jboss.configuration.ConfigurationService.loadConfiguration(Configuration
Service.java:271)
[Configuration]         at java.lang.reflect.Method.invoke(Native Method)
[Configuration]         at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Configuration]         at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Configuration]         at org.jboss.Main.<init>(Main.java:209)
[Configuration]         at org.jboss.Main$1.run(Main.java:121)
[Configuration]         at
java.security.AccessController.doPrivileged(Native Method)
[Configuration]         at org.jboss.Main.main(Main.java:117)
[Default] java.lang.NullPointerException
[Default]       at javax.management.MBeanInfo.<init>(MBeanInfo.java:116)
[Default]       at javax.management.MBeanInfo.clone(MBeanInfo.java:132)
[Default]       at
com.sun.management.jmx.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:188
9)
[Default]       at
org.jboss.configuration.ConfigurationService.load(ConfigurationService.java:
95)
[Default]       at
org.jboss.configuration.ConfigurationService.loadConfiguration(Configuration
Service.java:305)
[Default]       at java.lang.reflect.Method.invoke(Native Method)
[Default]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Default]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Default]       at org.jboss.Main.<init>(Main.java:209)
[Default]       at org.jboss.Main$1.run(Main.java:121)
[Default]       at java.security.AccessController.doPrivileged(Native
Method)
[Default]       at org.jboss.Main.main(Main.java:117)
[Default] java.lang.NullPointerException
[Default]       at javax.management.MBeanInfo.<init>(MBeanInfo.java:116)
[Default]       at javax.management.MBeanInfo.clone(MBeanInfo.java:132)
[Default]       at
com.sun.management.jmx.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:188
9)
[Default]       at
org.jboss.configuration.ConfigurationService.load(ConfigurationService.java:
95)
[Default]       at
org.jboss.configuration.ConfigurationService.loadConfiguration(Configuration
Service.java:305)
[Default]       at java.lang.reflect.Method.invoke(Native Method)
[Default]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Default]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Default]       at org.jboss.Main.<init>(Main.java:209)
[Default]       at org.jboss.Main$1.run(Main.java:121)
[Default]       at java.security.AccessController.doPrivileged(Native
Method)
[Default]       at org.jboss.Main.main(Main.java:117)
[Default] JBoss 2.2.2 Started in 0m:20s
....
[Service Control] Could not destroy DefaultDomain:service=Mail
[Service Control] javax.management.RuntimeMBeanException: RuntimeException
thrown in operation destroy
[Service Control]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1640)
[Service Control]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Service Control]       at
org.jboss.util.ServiceControl.destroy(ServiceControl.java:172)
[Service Control]       at java.lang.reflect.Method.invoke(Native Method)
[Service Control]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Service Control]       at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Service Control]       at
org.jboss.util.Shutdown.shutdownServices(Shutdown.java:96)
[Service Control]       at org.jboss.util.Shutdown$1.run(Shutdown.java:56)
....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----Original Message-----
From: Bruyn, Bill [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 31, 2001 10:57 AM
To: '[EMAIL PROTECTED]'
Subject: [JBoss-user] Secured JMX server (port 8082)


So I'm trying to secure the JMX server on port 8082 by subclassing
com.sun.jdmk.comm.HtmlAdaptorServer, as outlined by Thomas Hagedorn in
archived post
http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg05501.html.
Has anyone else been able to do so succesfully (using this method or
otherwise)?

All I did was build the necessary classes (which required just a little
modification to get compiled), 

  com.avnet.jboss.SecureHtmlAdaptorServer
  com.avnet.jboss.SecureHtmlAdaptorMBean
  com.avnet.jboss.SecureHtmlAdaptorController
  com.avnet.jboss.SecureHtmlAdaptorControllerMBean

put them on the modified JBOSS_CLASSPATH (where projects contains the
com/avnet structure)

 
JBOSS_CLASSPATH=:run.jar:../lib/crimson.jar:/usr/java/jdk1.3/lib/tools.jar:.
./lib/jmxri.jar:/home/developer/projects

and modified jboss.jcml like so:
  
<!--  replace HtmlAdaptor with custom subclass
  <mbean code="com.sun.jdmk.comm.HtmlAdaptorServer"
name="Adaptor:name=html"> 
 -->
  <mbean code="com.avnet.jboss.SecureHtmlAdaptorServer"
name="Adaptor:name=html">
    <attribute name="MaxActiveClientCount">10</attribute>
    <attribute name="Parser" />
    <attribute name="Port">8082</attribute>
  </mbean>

but for some reason, the attached Exception is thrown.  Why shouldn't the
superclass be found?  It works when it's the one that gets started (i.e.,
change mbean code attribute back to "com.sun.jdmk.comm.HtmlAdaptorServer")
Can anyone help?

Thanks,

Bill Bruyn
Programmer / Analyst
Application Services, Avnet ISD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
....
[Service Control] Registered with server
[Configuration] Could not create MBean
Adaptor:name=html(com.avnet.jboss.SecureHtmlAdaptorServer)
[Configuration] java.lang.NoClassDefFoundError:
com/sun/jdmk/comm/HtmlAdaptorServer
[Configuration]         at java.lang.ClassLoader.defineClass0(Native Method)
[Configuration]         at
java.lang.ClassLoader.defineClass(ClassLoader.java:486)
[Configuration]         at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
[Configuration]         at
java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
[Configuration]         at
java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[Configuration]         at
java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[Configuration]         at
java.security.AccessController.doPrivileged(Native Method)
[Configuration]         at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[Configuration]         at
java.lang.ClassLoader.loadClass(ClassLoader.java:297)
[Configuration]         at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
[Configuration]         at
java.lang.ClassLoader.loadClass(ClassLoader.java:290)
[Configuration]         at
java.lang.ClassLoader.loadClass(ClassLoader.java:253)
[Configuration]         at
com.sun.management.jmx.MBeanServerImpl.findClass(MBeanServerImpl.java:2466)
[Configuration]         at
com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:499)
[Configuration]         at
org.jboss.configuration.ConfigurationService.create(ConfigurationService.jav
a:340)
[Configuration]         at
org.jboss.configuration.ConfigurationService.loadConfiguration(Configuration
Service.java:271)
[Configuration]         at java.lang.reflect.Method.invoke(Native Method)
[Configuration]         at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Configuration]         at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Configuration]         at org.jboss.Main.<init>(Main.java:209)
[Configuration]         at org.jboss.Main$1.run(Main.java:121)
[Configuration]         at
java.security.AccessController.doPrivileged(Native Method)
[Configuration]         at org.jboss.Main.main(Main.java:117)
[Service Control] Initializing 24 MBeans
....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to