How did you initial the JNDI Context,I think you should init JNDI Context like following.
"java.naming.factory.initial" should be specified glassfish's initialContextFactory;
Can you try it...
----------------------
Properties env = new Properties();
env.setProperty("", "");
env.put("java.naming.factory.initial",
"glassfish's initialContextFactory");
try {
Context jndiContext = new InitialContext(env);
jndiContext.lookup("you source name");