Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

How to get an application client proj. to run

瀏覽次數:1 次
跳到第一則未讀訊息

Casey

未讀,
2003年5月30日 上午11:26:192003/5/30
收件者:
Hi, I'm using WSAD 5 and when I run the following code:
public class TestEchoBeanApp {

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


Dave

未讀,
2003年6月4日 上午11:31:082003/6/4
收件者:
This is just a follow up for people who read this thread and are
encountering the same problem. The context is using an Application
Client project in WSAD 5 the exception below is thrown when attempting
to run the Application Client. The cause of this problem is that, by
default, an Application Client is not set up correctly to be run as an
Application Client. That may sound a little silly and it certainly
is, but it seems that there is a wrinkle in the Application Client
setup.

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.

0 則新訊息