public static void main(String[] args) {
Echo ec = null;
EchoHome ech = null;
try
{
javax.naming.Context ctx = new javax.naming.InitialContext();
}
catch (javax.naming.NamingException ne )
{
System.out.println("NamingException Exception: " +
ne.getMessage());
}
catch (Exception e)
{
System.out.println("Some error!");
}
}
}
I'm getting the following exception:
java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/GlobalORBExists
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:385)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:259)
at
com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCt
xFactory.java:166)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:98)
at com.ibm.ws.naming.util.WsnInitCtx.<init>(WsnInitCtx.java:79)
at
com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory
.java:137)
at
com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnIniti
alContextFactory.java:80)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.<init>(InitialContext.java:187)
at TestEchoBeanApp.main(TestEchoBeanApp.java:20)
Exception in thread "main"
Can someone give any hints?
Thanks,
Casey
In order to run an Application Client successfully and avoid the
problem outlined in this thread, you must create an Application Client
run configuration manually for that application client. To do this,
click the down arrow of the run button (little running man or how you
usually run something in WSAD) and select the "Run..." option. On the
dialog box that pops up, you will see the "WebSphere v5 Application
Client" option in the left-hand tree pane (usually at the bottom of
the list). Click on this and click the "New" button. Select your
enterprise application project from the "Enterprise Application" drop
down list and enter any command line arguments and classpath additions
in the appropriate places. When you have done this, you can run your
application client project successfully.
I hope this helps out there, it seems to be a pretty common (and
frustrating!) problem.