spring-boot-sample-tomcat-jndi | Spring Boot sample showing configuration of JNDI | Security library
kandi X-RAY | spring-boot-sample-tomcat-jndi Summary
kandi X-RAY | spring-boot-sample-tomcat-jndi Summary
Spring Boot sample showing configuration of JNDI in embedded Tomcat
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Bean factory bean
- The jndi data source bean
- Launch the sample Tomcat application
- Get data source
spring-boot-sample-tomcat-jndi Key Features
spring-boot-sample-tomcat-jndi Examples and Code Snippets
Community Discussions
Trending Discussions on spring-boot-sample-tomcat-jndi
QUESTION
I've hit a blocker while migrating a legacy Java application over to Spring Boot. Specifically, the application uses Apache CXF for SOAP web services that have operations for getting data from an Oracle database. The issue I'm seeing is that as soon as a JNDI lookup is attempted by the web service, then the following exception is thrown:
Name [java:comp/env/jdbc/myDataSource] is not bound in this Context. Unable to find [java:comp].
NamingException: javax.naming.NameNotFoundException: Name [java:comp/env/jdbc/myDataSource] is not bound in this Context. Unable to find [java:comp].
For reference, I checked in an example of the issue here: https://github.com/pmercer/spring-boot-sample-tomcat-jndi-cxf-ws
So, if anyone could point me to a working example and/or offer advice for resolving the issue, then it would be much appreciated.
Adding more details ...
Here's how the lookup is performed in the existing application, which is deployed as a .war file on an external Tomcat server ...
...ANSWER
Answered 2017-Aug-21 at 20:24I'm not sure why the direct JNDI lookups are failing when performed within the context of an Apache CXF SOAP web service call. However, lookups done using the JndiObjectFactoryBean bean are working, so that's what I'm going to run with.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spring-boot-sample-tomcat-jndi
You can use spring-boot-sample-tomcat-jndi like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the spring-boot-sample-tomcat-jndi component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page