how to run Application Client(AWT) for EJB using eclipse? [message #180272] |
Fri, 29 September 2006 09:08  |
Eclipse User |
|
|
|
Originally posted by: udaykanth.rapeti.gmail.com
hi,
i am new to elcipse and i found many tutorials on ejb's using
eclipse but i still got a doubt, how to run a Application Client program
which uses EJB's using Eclipse+JBoss and also plz tell me how to execute
that client application on other computer which connects to its server.
Thank you in advance.........
|
|
|
|
Re: how to run Application Client(AWT) for EJB using eclipse? [message #180987 is a reply to message #180591] |
Fri, 06 October 2006 02:02   |
Eclipse User |
|
|
|
Originally posted by: udaykanth.rapeti.gmail.com
Thank you very much for your response,
when i run my client application using
'RunAs->JavaApplication ' i am getting an exception.....................
the below is my code in main function.....
PLZ NOTE: i used Xdoclet for creating Ejb......
temp.user.MyUser user=null;
try{
System.out.println("Calling EJB....\n<br>");
temp.user.MyUserHome muhome=temp.user.MyUserUtil.getHome();
System.out.println("Ccreating EJB....\n<br>");
/* mbtest=mbhome.create();*/
user=muhome.create(0, "dfhdfh", "62125049", "10","gr");
System.out.println(user.getId()+"<br>");
}catch(Exception exception)
{
System.out.println("Error :"+exception.getLocalizedMessage());
exception.printStackTrace();
}
The below is my output.............,
Calling EJB....
<br>
Error :Need to specify class name in environment or system property, or as
an applet parameter, or in an application resource file:
java.naming.factory.initial
javax.naming.NoInitialContextException: Need to specify class name in
environment or system property, or as an applet parameter, or in an
application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManag er.java:640)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext .java:243)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialCo ntext.java:280)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at temp.user.MyUserUtil.lookupHome(MyUserUtil.java:22)
at temp.user.MyUserUtil.getHome(MyUserUtil.java:42)
at Main.main(Main.java:13)
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08054 seconds