title: JNDI lookup failing when looking up JMS queue in WebLogic 10.3.5
body: <p>I'm new to JMS programming and am running into NameNotFoundException, even though, in looking at the Admin Console, it shows the JNDI name that is failing.</p>
  
  <p>The exception produced is:</p>
  
  <p><strong>javax.naming.NameNotFoundException: Unable to resolve 'tutorialqueue'. Resolved ''; remaining name 'tutorialqueue'
      at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
      at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:252)
      at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
      at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
      at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
      at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)</strong></p>
  
  <p>In the Admin Console, I see:</p>
  
  <p>Name - TutorialJmsConnectionFactory<br />
  Type - Connection Factory<br />
  JNDI Name - tutorialconnectionfactory  <br />
  Subdeployment - Default Targetting <br />
  Targets - AdminServer<br />
  <br /></p>
  
  <p>Name - TutorialJmsQueue<br />
  Type - Queue<br />
  JNDI Name - tutorialqueue<br /> 
  Subdeployment -<br />
  Targets - <br /></p>
  
  <p>The console shows the <em>tutorialqueue</em> JNDI name that the exception says it can't find.  Also, the tutorialconnectionfactory name WAS successfully found.  Might it have to do with the Subdeployment and/or Targets being blank?</p>
  
  <p>Here is the code where the lookup occurs/fails:</p>
  
  <pre><code>QueueConnectionFactory queueFactory = ( QueueConnectionFactory ) ic.lookup( "tutorialconnectionfactory" );
  QueueConnection queueConnection = queueFactory.createQueueConnection();
  QueueSession queueSession = queueConnection.createQueueSession( false , Session.AUTO_ACKNOWLEDGE );
  Queue queue = ( Queue ) ic.lookup( "tutorialqueue" );
  QueueSender sender = queueSession.createSender( queue );
  </code></pre>
  
  <p>Can anyone point me in the right direction?  TIA</p>