[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.technology.ejb-orm] Re: Eclipse Plugin and EJB 3.0


That is because of eclipse plugin classloader mechanism.

You need to set the thread classloader before your call initialcontext (I think).
Also look into buddy classloading.


I don't have the exact details, but I remember someone creating a sourceforge
project showing how this is done (using Eclipse RCP as an J2EE client) -
just cant remember the name anymore.


/max

We are trying to connect our Eclipse plug-in to our application server using EJB 3.0.

Currently, we can lookup the server as a stand-alone application (client side), but when we attempt to lookup the server from our plugin, we get a NamingException and a ClassNotFoundException

We do have a dependency between two projects: our plugin project (client side) and our server project (server side), via a remote interface. Please, if anyone could help us that would be great.
If we resolve our problem, we will reply to this group.


Here is a snippet of the code we use (for example) on the client side, where HelloWorld is the remote interface to the app server:

this snippet works for the stand alone app, but not for the plug-in.

try { Context context = new InitialContext();
System.out.println("This is the test "+HelloWorld.class.getName());
HelloWorld hw = (HelloWorld) context.lookup(HelloWorld.class.getName());

hw.sayHello();
} catch (Exception e) {
e.printStackTrace();
}


Cheers, Jim and Rob




-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/