title: javax.naming.NameNotFoundException: Unable to resolve 'MyDB'. Resolved '' Weblogic 12.1.3. c
body: <p>While migrating from Tomcat to Weblogic 12.1.3 I got this exception <code>javax.naming.namenotfoundexception while trying to look up</code> 
  then I have tried the following :
  <a href="https://stackoverflow.com/questions/21355945/namenotfoundexception-while-trying-to-lookup-jdbc-only-when-publishing-from-e">NameNotFoundException: While trying to lookup &#39;jdbc&#39; only when publishing from Eclipse Kepler but not Indigo</a>
  and
  <a href="https://stackoverflow.com/questions/16218663/how-to-access-jndi-data-source-defined-in-weblogic-10-3-6">How to access JNDI data source defined in weblogic 10.3.6</a></p>
  
  <p>I got the in titled error now </p>
  
  <p>My lookup code</p>
  
  <pre><code>ds = (DataSource) initContext.lookup("MyDB");
  </code></pre>
  
  <p>in weblogic <strong>JNDI Name</strong> </p>
  
  <pre><code>MyDB
  </code></pre>
  
  <p>Any help please?</p>