In an ejb after I look up a secured javax.sql.DataSource using its global JNDI name e.g. jdbc/MyDS (not resource reference) is there a way to get a connection via getConnection(). This is on WAS 8.5.5 and the data source has both a container managed and component managed authentication alias with “Mapping-configuration alias” of none and test connection is successful in
Tag: jndi
Spring boot app cannot get connection via jndi in weblogic
We have spring boot application (version => 2.4.3) that needs to run in weblogic 12.2.1.4.0. When we give url, name and password like below, it successfully deploy and can get connection, but when we deploy via jndi like below. It is getting error. How can we fix this? We already tried these links, but it is not solved our problem.
UserTransaction jndi lookup failed when using CompletableFuture
I have a code which does context lookup to get UserTransaction JNDI as ctx.lookup(“java:comp/UserTransaction”). When I run this code without using CompletableFuture, it works as expected. When working with CompletableFuture in async thread, it gives exception saying jndi lookup failed. I tried to check if I can get the required JNDI from global scope, but no luck. Answer The problem
Error when looking up data source name when deploying httpServlet to weblogic 12 server
I am trying to deploy an ear file to a Weblogic 12 server. The ear file contains a HttpServlet. During deployment, the HttpServlet is trying to initialize and fails with this error: Target state: deploy failed on Cluster javax.naming.NameNotFoundException: While trying to lookup ‘jdbc.’ didn’t find subcontext ‘jdbc’. Resolved ” at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1180) I tested the data source connection on the
Junit Testing JNDI InitialContext outside the application server
Please help me to mock the above code. Hi Tom Anderson I tried the below code But its giving error as: Please help me to test the code i just want connection from JNDI datasource Answer The orthodox thing to do here would be to change you code so that the Context is injected into it (by a dependency injection
EJB 3.0 test client working without maven but not with
here is my problem, I made an EJB with maven and 2 test clients, a test client without maven, only added jnp-client and the EJB to it’s class path, work like a charm a test client using MAVEN, added the EJB through the POM and jnp-client, does not work this is my EJB : it’s POM : this is my
how to accept self-signed certificates for JNDI/LDAP connections?
I need to connect to an LDAP directory over SSL. In non-production environments, we use self-signed certificates which, of course, fails to validate with: javax.naming.CommunicationException: simple …