File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invoke EJB in Eclipse2 plugin

 
Haiqi Liang
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I developed a session EJB in WSAD5 and deployed it on Websphser application
server 4.0. Now I'm developing a client application to invoke the remote
methods in Eclipse2 environment.
In my implementation, I developed a client EJB delegate, so that the client
application can access the EJB via the delegate. It comes with:
1) when I develop my client application as a standalone java application in
Eclipse2, and my client application uses the EJB delegate to access remote
methods, it works fine.
2) when I develop my client application as a Eclipse2 plugin, my client
application uses the EJB delegate to access remote methods. Whenever I test
my plugin in Eclipse workbench, it doesn't work, with the following error:
javax.naming.NoInitialContextException: Cannot instantiate class:
com.ibm.websphere.naming.WsnInitialContextFactory. Root exception is
java.lang.ClassNotFoundException:
com.ibm.websphere.naming.WsnInitialContextFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:513)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:441)
at java.lang.ClassLoader.loadClass(ClassLoader.java:445)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:220)
at
com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:57)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:661)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.<init>(InitialContext.java:207)
at TestPlugin.actions.SampleAction.run(SampleAction.java:53)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:210)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:
180)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(Action
ContributionItem.java:407)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent(ActionCont
ributionItem.java:361)
at
org.eclipse.jface.action.ActionContributionItem.access$0(ActionContributionI
tem.java:352)
at
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent(A
ctionContributionItem.java:47)Initial context succeed...
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:827)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1529)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1291)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1256)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1239)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.jav
a:775)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:432)
at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)
I'm sure that i have add corresponding jars in my classpath and runtime
paths, including j2ee.jar, websphere.jar, ivjejb35.jar, etc.
Does anyone encounter the same problem in your development as mine? Is this
an Eclipse plugin bug?
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Websphere (mostly because I have not a CLUE . . . )
[ November 06, 2002: Message edited by: Cindy Glass ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic