GlassFish Starting Up Java SE Client - No Initial Context Exception

Posted by Marcel on Stack Overflow See other posts from Stack Overflow or by Marcel
Published on 2010-04-30T09:57:11Z Indexed on 2010/04/30 9:57 UTC
Read the original article Hit count: 314

Filed under:
|
|

Hi

I have developed a java se client that calls some session beans on a glassfish server. I connect to the bean remote interface like this.

context = new InitialContext();
em = (ICrudService) context.lookup("java:global/BackITServer/CrudServiceImpl");

This works fine from inside eclipse (gf-client on build path). When I export my project as a runnable jar and call it on the console with

java -jar BackItClient.jar

I get a NoInitialContextException. MMMM. I would very much appreciate some help.

Thank You

Greetings Marcel

PS: Do I really have to pack all the jars which gf-client is referencing into my jar?

© Stack Overflow or respective owner

Related posts about glassfish

Related posts about java