title: How to use JNDI DataSource provided by WebLogic 12.2.1 in Spring?
body: <p>I created a JNDI connection with the following Values:</p>
  
  <p>i selected <code>Generic Data Source</code> option</p>
  
  <p><strong>Name</strong>: jdbc/sampleDataSource</p>
  
  <p><strong>JNDI Name</strong>: jdbc/sampleDataSource</p>
  
  <p><strong>Spring Config File:</strong></p>
  
  <p><code>&lt;jee:jndi-lookup id="dataSource" jndi-name="jdbc/sampleDataSource" /&gt;</code></p>
  
  <p>I'm getting below error.</p>
  
  <pre><code>Error An error occurred during activation of changes, please see the log for details.
  Error javax.naming.NameNotFoundException: While trying to lookup 'jdbc.sampleDataSource' didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/sampleDataSource'
  Error While trying to lookup 'jdbc.sampleDataSource' didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/sampleDataSource' 
  </code></pre>
  
  <p>I was unable to resolve it. 
  How do i configure in Spring 4.
  Any addition jar file is required. Please help on this.</p>