on 11-30-2005 3:43 PM
Hi,
I've got problems using JMX from within an iView. I try to connect to the local MBeanServer using the following code:
[code]
public void doProcessBeforeOutput() throws PageException {
Form myForm = this.getForm();
...
// Get connection to MBeanServer
InitialContext ctx;
try {
ctx = new InitialContext();
Object objref = ctx.lookup("jmx");
MBeanServer conn = (MBeanServer)objref;
} catch (NamingException e) {
e.printStackTrace();
}
[/code]
The lookup returns an object of type "com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain" which should implement
the Interface "MBeanServer". Anyhow I get the following error while trying to cast the returned object to type MBeanServer:
[code]
at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:969)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:343)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable$1$DoDispatchRequest.run(AsyncIncludeRunnable.java:377)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.core.async.AsyncIncludeRunnable.run(AsyncIncludeRunnable.java:390)
at com.sapportals.portal.prt.core.async.ThreadContextRunnable.run(ThreadContextRunnable.java:164)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:729)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.NoClassDefFoundError: javax/management/MBeanServer
at com.top_logic.sap.JMXTestiView$JMXTestiViewDynPage.doProcessBeforeOutput(JMXTestiView.java:46)
at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:123)
at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
... 7 more
[/code]
I set the "tc/jmx"-library as "Additional Library" using the Right-Mouse-Click-Context-Menu on the Project Node in Netweaver
Developer Studio...
What else needs to be done to get jmx working in an iView-Environment?
Thanks in advance
Thorsten Wittmann
Hello Thorsten,
Did you specify sharing reference to jmx service? Check http://help.sap.com/saphelp_erp2004/helpdata/en/88/bdfc3f48ecc742e10000000a1550b0/frameset.htm
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.