Hi
 
The solution is simple you just forgot to pass an URL String as a parameter to the lLocalServer.createMBean()
method call because the AutoDeployer has NO default constructor. Please use the following method:
 
public ObjectInstance createMBean(

    String pClassName,

    ObjectName pName,

    String[] pParams,

    String[] pSignature

)

In this call pass the parameter you specified in the invoke() call later on.

Have fun - Mad Andy

----- Original Message -----
From: Niranjani
Sent: Friday, October 13, 2000 4:51 AM
Subject: [jBoss-Dev] autodeployer

hello
I used the testclient program and tried to load the AutoDeployer MBean also with the Logger and ConnectorFactory already loaded and started by Andreas in the program.When i added AutoDeployer Mbean , it says the constructor is not found.Could any of you please look into the code and tell me what is wrong.
 
excerpt from TestClient.java
 
 
final ObjectInstance auto = lLocalServer.createMBean("org.jboss.ejb.AutoDeployer",new ObjectName("Default Domain : name=AutoDeployer"));
 
try {
lLocalServer.invoke(auto.getObjectName(),"addURLs",new Object[]{"e:/jboss/deploy/interest.jar"},new String[]{"java.lang.String"});
}
catch(Throwable rex) {
rex.printStackTrace();
}
 
Error  that i got during runtime :
 
 TestClient.main(), caught: javax.management.ReflectionException, targetjava.lang.NoSuchMethodException:No such constructor
javax.management.ReflectionException
 at com.sun.management.jmx.MBeanServerImpl.internal_instantiate(MBeanServerImpl.java:2113)
 at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:374)
at TestClient.main(TestClient.java:16)
 
 
ps: i have included the jboss.jar in the classpath. I want to invoke the method addURLs(String urllist) in AutoDeployer class.Please help if you know.
regards
Niranjani

Reply via email to