Skip to content
Advertisement

Tag: jndi

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

Advertisement