-
1. Re: Standard MBean interface and class packaging
adrian.brock Apr 10, 2002 1:10 PM (in response to mikeandtalisha)Hi,
You should read the class name as fully qualified unless
it says otherwise ;-)
Notice is marked RFE (Request for Enhancement) rather
than bug.
What is your simple fix? How does it cope with the
following?
package one;
import two.MyClassMBean;
import three.MyClassMBean;
public class MyClass
implements two.MyClassMBean, three.MyClassMBean;
A bit pathological, but I think this is why the
RFE is in the delayed section.
I suspect that if/when the spec resolves it, the
example above will give a NotCompliantMBeanException.
Regards,
Adrian -
2. Re: Standard MBean interface and class packaging
pcallies Apr 18, 2002 11:00 AM (in response to mikeandtalisha)Have the requirements for exposing a management interface changed from JBoss 2 to JBoss 3? In JBoss 2 I didn't have to marry my code to JBoss code to create a manageable service. I just had to expose the Service methods I wanted to implement.
I have developed a service (EDIProcessFactory) that implements an interface (EDIProcessFactoryMBean) that contains the following methods:
public void start() throws Exception;
public void stop() throws Exception;
public void setLogfileName(String filename);
public void setConfigKey(String key);
The class and the interface are in the same package.
I added a *-service.xml file to the deploy directory that looks like this:
com.mckhboc.realtime.common.edi.interface.gateway.starInbound
starin.log
I get a NotCompliantMBeanException stating "Class does not expose a management interface".
I'm using the 3.0 source code I checked out last weekend. -
3. Re: Standard MBean interface and class packaging
adrian.brock Apr 18, 2002 1:48 PM (in response to mikeandtalisha)Strange,
The Log4JService and Security MBeans do the same.
You are sure you have
EDIProcessFactory
implements EDIProcessFactoryMBean
The message you are receiving implies this is not the
case?
Regards,
Adrian -
4. Re: Standard MBean interface and class packaging
pcallies Apr 18, 2002 2:21 PM (in response to mikeandtalisha)Pretty sure:
package com.mckhboc.realtime.common.edi.process;
<bunch of imports>
public class EDIProcessFactory implements EDIProcessFactoryMBean {
package com.mckhboc.realtime.common.edi.process;
public interface EDIProcessFactoryMBean { -
5. Re: Standard MBean interface and class packaging
pcallies Apr 18, 2002 7:04 PM (in response to mikeandtalisha)I looked further up in my log file and I found the following. Why would JBoss have trouble opening my jar file? I created it using the standard jar command and saved it in JBoss's lib directory.
2002-04-18 18:01:19,551 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/lib/edi.jar
2002-04-18 18:01:19,551 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/lib/edi.jar
2002-04-18 18:01:19,601 DEBUG [org.jboss.system.UnifiedClassLoader] New UCL with url file:/C:/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/C/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/lib/edi.jar/11.edi.jar
2002-04-18 18:01:19,621 DEBUG [org.jboss.deployment.JARDeployer] no xmls found
2002-04-18 18:01:19,621 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.JARDeployer@711404
2002-04-18 18:01:19,641 DEBUG [org.jboss.deployment.MainDeployer] found 7 subpackages of file:/C:/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/lib/edi.jar
2002-04-18 18:01:19,641 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: njar:file:/C:/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/C/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/lib/edi.jar/11.edi.jar^/com/mckhboc/realtime/common/edi/1015280596488_temp.jar
2002-04-18 18:01:19,641 DEBUG [org.jboss.system.UnifiedClassLoader] New UCL with url njar:file:/C:/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/C/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/lib/edi.jar/11.edi.jar^/com/mckhboc/realtime/common/edi/1015280596488_temp.jar
2002-04-18 18:01:19,691 WARN [org.jboss.deployment.JARDeployer] looking inside jar failed; ignoring
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:110)
at java.util.jar.JarFile.(JarFile.java:115)
at java.util.jar.JarFile.(JarFile.java:57)
at sun.net.www.protocol.jar.URLJarFile.(URLJarFile.java:52)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:41)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:61)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:88)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:72)
at org.jboss.deployment.JARDeployer.accepts(JARDeployer.java:133)
at org.jboss.deployment.MainDeployer.findDeployer(MainDeployer.java:711)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:564)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:582)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:505)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:447)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy3.deploy(Unknown Source)
at org.jboss.deployment.SARDeployer.parseXMLClasspath(SARDeployer.java:499)
at org.jboss.deployment.SARDeployer.init(SARDeployer.java:190)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:575)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:505)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:480)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:462)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:447)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:319)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:213)
at org.jboss.Main.boot(Main.java:138)
at org.jboss.Main$1.run(Main.java:371)
at java.lang.Thread.run(Thread.java:484)
2002-04-18 18:01:19,841 DEBUG [org.jboss.deployment.MainDeployer] No deployer found for url: njar:file:/C:/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/C/jboss-tip/jboss-all/build/output/jboss-3.0.0beta2/lib/edi.jar/11.edi.jar^/com/mckhboc/realtime/common/edi/1015280596488_temp.jar -
6. Re: Standard MBean interface and class packaging
pcallies Apr 18, 2002 7:27 PM (in response to mikeandtalisha)Sorry for the bombardment of postings, but I just deployed this service successfully in JBoss 2.4.4.
-
7. Re: Standard MBean interface and class packaging
adrian.brock Apr 19, 2002 11:20 AM (in response to mikeandtalisha)I can't tell you what is wrong with the jar,
the error isn't very informative.
Are you using different accounts? Might this be an
authority problem?
Have you tried creating the jar again? Or running
jar -tf your.jar
Regards,
Adrian