I am not sure if this solution is relevant to your problem, but you could try something like this
ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(this.class);
// Code that calls "new InitialContext()"
...
} finally {
Thread.currentThread().setContextClassLoader(oldCL);
}
This works fine inside Eclipse plugin ;-)
Stefan Groschupf wrote:
--Hi guys, I run in a problem with RMIConnectorImpl in the jmx/connector/rmi package. When I use the RMIConnetor in project I get a exception: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory. Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory That happens at line 578: InitialContext ctx = new InitialContext(); When I replace this lines with: NamingContextFactory f = new NamingContextFactory(); Context ctx = f.getInitialContext(System.getProperties()); Thank it looks like it working fine for me. Can somebody give me a hint, what I can do, instead create a custom jmx-connector package? Something like assign the RMIConnectorImpl my own Context?
Igor Fedorenko
Think smart. Think automated. Think Dynamics.
www.thinkdynamics.com
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development
