I need help.
The Glassfish Admin Console screen below shot below shows that I've set up three JMS Destination Resources. All are identical except for the names. But my JNDI lookup from a local java client (Glassfish is also local) can only see the first two. Client code and console out put is below screen shot.
I don't even know where to look to begin figuring out why one and two work, and three doesn't. Can anyone suggest anything. This should be as basic as it get's. All three are identically set up. None have any additional properties set. I really need help or direction.
CODE:
public class SrackOverflow1 {
public static void main(String[] args) {
Properties env = new Properties();
env.put ("java.naming.factory.initial", "com.sun.jndi.fscontext.RefFSContextFactory");
env.put ("java.naming.provider.url","file:///C:/glassfish4/mq/opt/java/my_broker");
try {
Context jndiContext = (Context) new InitialContext(env);
Queue queueOne = (Queue) jndiContext.lookup("jms/goSendQueue");
System.out.println("queueOne ok:\n" + queueOne);
Queue queueTwo = (Queue) jndiContext.lookup("jms/goReceiveQueue");
System.out.println("\nqueueTwo ok:\n" + queueTwo);
Queue queueThree = (Queue) jndiContext.lookup("jms/goTestQueue");
System.out.println("\nqueueThree ok:\n" + queueThree);
} catch (NamingException e) {
System.out.println("\nThrew Naming Exception\nerror msg: " + e.getMessage() +"\n");
e.printStackTrace();
}
}
CONSOLE:
queueOne ok:
Sun Java System MQ Destination
getName(): goSendQueuq
Class: com.sun.messaging.Queue
getVERSION(): 3.0
isReadonly(): false
getProperties(): {imqDestinationName=goSendQueuq, imqDestinationDescription=A Description for the Destination
Object}
queueTwo ok:
Sun Java System MQ Destination
getName(): goReceiveQueue
Class: com.sun.messaging.Queue
getVERSION(): 3.0
isReadonly(): false
getProperties(): {imqDestinationName=goReceiveQueue, imqDestinationDescription=A Description for the Destinati
on Object}
Threw Naming Exception
error msg: jms/goTestQueue
javax.naming.NameNotFoundException: jms/goTestQueue
at com.sun.jndi.fscontext.RefFSContext.getObjectFromBindings(RefFSContext.java:400)
at com.sun.jndi.fscontext.RefFSContext.lookupObject(RefFSContext.java:327)
at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.america3.testclasses.SrackOverflow1.main(SrackOverflow1.java:21)