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
Wildfly configuration with DataSource
this is the first time I am trying to setup datasource in my Wildfly server. I tried to follow some tutorials which I found on Google but it still doesn’t work. I am working on a web service but I keep getting some errors when I deploy my .war file. Here is the latest log when app is deployed: persistence.xml
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
Cannot create JDBC driver of class ‘ ‘ for connect URL ‘null’ : I do not understand this exception
Why does it say null URL and gives a empty ‘ ‘ class in the exception when I have provided the database URL? I am trying to connect to a derby database via a servlet while using Tomcat. When the servlet gets run, I get the following exceptions: Servlet : What exception is this? Why do I get this exception?
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
jndi LDAPS custom HostnameVerifier and TrustManager
We are writing an application that shall connect to different LDAP servers. For each server we may only accept a certain certificate. The hostname in that certificate shall not matter. This is easy, when we use LDAP and STARTTLS, because we can use StartTlsResponse.setHostnameVerifier(..-) and use StartTlsResponse.negotiate(…) with a matching SSLSocketFactory. However we also need to support LDAPS connections. Java
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: I am aware of how to use a custom trust manager for SSL-enabled connections, but don’t know how to use one in connection with the JNDI API where I don’t manage the actual connection. That is,