-
1. Re: Minimal JBoss configuration
nphelps Sep 4, 2003 3:24 PM (in response to arabin)For the benefit of others: http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=
-
2. Re: Minimal JBoss configuration
raskiman Feb 18, 2004 5:13 AM (in response to arabin)Hi,
I want the same as arabin, but the url nphelps gave is not correct. Something is missing.
Thanks -
3. Re: Minimal JBoss configuration
mikefinn Feb 19, 2004 11:49 PM (in response to arabin)Why not start with the 'minimal' configuration out of the box, and add what you need (JMS)? JMX has to be there - it's the backbone of the server. Everything else is just modules that plug into JMX. Note: you will not get jmx-console, web-console, HTML adapter, etc, unless you have a web container running.
-
4. Re: Minimal JBoss configuration
shortpasta Mar 19, 2004 8:41 PM (in response to arabin)i have a very small jmx-based app to deploy.
since i'm such a fan of jboss, i figured i'd try the minimal configuration and then add a very small jmx-console to it.
so i made a my-jmx-console.sar, added the required jmx ri jars, and a jboss-service.xml where i start the com.sun.jdmk.comm.HtmlAdaptorServer and the system boots up.
i was so happy until i pointed a browser to it and i get this NPE:java.lang.NullPointerException at com.sun.jdmk.comm.HtmlMasterPage.buildPage(HtmlMasterPage.java:95) at com.sun.jdmk.comm.HtmlRequestHandler.processGetRequest(HtmlRequestHandler.java:336) at com.sun.jdmk.comm.HtmlRequestHandler.processRequest(HtmlRequestHandler.java:155) at com.sun.jdmk.comm.HtmlRequestHandler.doRun(HtmlRequestHandler.java:82) at com.sun.jdmk.comm.ClientHandler.run(ClientHandler.java:88) at java.lang.Thread.run(Thread.java:484)
now this works just fine and dandy in a stand-alone jmx app.... so i've try to get it to work, but the only way i can get a jmx-console running is to use the default configuration minus a couple of jars/sars/xmls.
it's a real shame that the ri jmx console can't work and instead we have to deploy 6Mb worth of default configuration, not to mention the runtime hit of running catalina just to get a jmx-console up!!!
has anyone been successful at this?
note: i've tried the following variations without success:
1. put jmx-ri jars in /lib instead of my sar
2. deploy with a loader-repository
3. deploy stand-alone components instead of a sar -
5. Re: Minimal JBoss configuration
starksm64 Mar 21, 2004 1:14 PM (in response to arabin)Undoubtedly a conflict between the two jmx implementations. The ri html adaptor should be runable without any jmx api jars so try extracting just the needed html adaptor classes. If its coupled to the ri jmx implementation then its not going to work. A minimal config for the jmx-console.war is not close to 64Mb so I don't know how your pulling that figure out of the air.
-
6. Re: Minimal JBoss configuration
shortpasta Mar 21, 2004 1:52 PM (in response to arabin)I tried what you suggested and now I get the exception.
11:39:34,843 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.4-RC1-watchdog-minimal/server/watchdog/deploy/syncvoice-jmx-con sole.sar/ org.jboss.deployment.DeploymentException: create operation failed for package file:/C:/jboss-3.2.4-RC1-watchdog-minimal/server/watchdog/deploy/sy ncvoice-jmx-console.sar/; - nested throwable: (org.jboss.deployment.DeploymentException: name is not a valid java type (or is a reserved word): c lass name; - nested throwable: (java.lang.IllegalArgumentException: name is not a valid java type (or is a reserved word): class name)) at org.jboss.deployment.SARDeployer.create(SARDeployer.java:226) at org.jboss.deployment.MainDeployer.create(MainDeployer.java:787) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:606) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45) at org.jboss.mx.server.Invocation.invoke(Invocation.java:70) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174) at $Proxy6.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45) at org.jboss.mx.server.Invocation.invoke(Invocation.java:70) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:825) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:360) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45) at org.jboss.mx.server.Invocation.invoke(Invocation.java:70) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174) at $Proxy4.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:250) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:833) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:643) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:606) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:590) at java.lang.reflect.Method.invoke(Native Method) at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:72) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:45) at org.jboss.mx.server.Invocation.invoke(Invocation.java:70) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:187) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:480) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:174) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:404) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311) at org.jboss.Main.boot(Main.java:144) at org.jboss.Main$1.run(Main.java:389) at java.lang.Thread.run(Thread.java:484)
The only 'name' I can guess this exception is related to is the attribute of mbean/attribute elements in jboss-service.xml.
I'll try a few more things today....
I'd like to clarify, I said 6Mb and not 64Mb.... can you imagine? =) -
7. Re: Minimal JBoss configuration
shortpasta Mar 21, 2004 4:01 PM (in response to arabin)finally got it to work. thanks scott for the idea to just deploy the html adaptor classes!
1. download jmx 1.2.1
2. put jmxtools.jar in server/minimal/lib
3. add this to server/minimal/deploy/user-service.xml:<mbean code="com.sun.jdmk.comm.HtmlAdaptorServer" name="adaptor:protocol=HTTP,port=8090"> <attribute name="Port">8090</attribute> </mbean>
to figure out what the problem was, i deployed a sar that looks like this:my-jmx-console.sar META-INF jboss-service.xml jmxtools.jar my-commons.jar
jboss-service.xml includes
1. my custom mbean MBeanManager
2. the sun html adaptor
my MBeanManager mbean makes sure that an MBeanServer exists, and as it turns out, when it was started, there was no MBeanServer, so my mbean ended up creating it.
the code looks something like this, and the only question left to answer is why was the MBeanServer missing.final List mBeanServerList = MBeanServerFactory.findMBeanServer (null); if (mBeanServerList == null || mBeanServerList.size () == 0) { MBeanServerFactory.createMBeanServer () }