Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I solved it the following way: hope this helps others having the same issue/problem afterwards...</p> <pre><code>protected Connection getConnection() { try { if (connection == null || connection.isClosed()) { if (dataSource == null) { // impliziter Initial Context von WebLogic ApplicationServer Environment java.util.Hashtable environment = new java.util.Hashtable(); environment.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"); Context wlsic = new InitialContext(environment); showJndiContext( wlsic, "", ""); // logischer JNDI Rootcontext der Serverkomponente, kann mehrfach verwendet werden Context ctx = (Context) wlsic.lookup("java:comp/env"); showJndiContext( ctx, "", ""); // weiter mit Resourcenpfad dataSource = (DataSource) ctx.lookup("MY_SQL_DS"); } connection = dataSource.getConnection(); } } catch (NamingException ne) { ne.printStackTrace(); log.error(ne); } catch (SQLException sqlEx) { sqlEx.printStackTrace(); log.error(sqlEx.getMessage()); } return connection; } public static void showJndiContext(Context ctx, String name, String space) { if (null == name) name = ""; if (null == space) space = ""; try { NamingEnumeration en = ctx.list(name); while (en.hasMoreElements()) { String delim = (null != name &amp;&amp; 0 &lt; name.length()) ? "/" : ""; NameClassPair nc = (NameClassPair) en.next(); System.out.println(space + name + delim + nc); if (40 &gt; space.length()) showJndiContext(ctx, nc.getName(), " " + space); } } catch (javax.naming.NamingException ex) { //System.out.println( ex ); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload