-
Notifications
You must be signed in to change notification settings - Fork 41.2k
JNDI lookup fails with keys ending ":" in IBM Liberty during application startup #6460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The placeholder in String json = environment.resolvePlaceholders(
"${spring.application.json:${SPRING_APPLICATION_JSON:}}"); AFAICT, there's no need for the second @remesh22 We can fix that one in Spring Boot, but the other two belong to Spring Cloud. Can you please open a separate issue for |
I was wrong above. The second colon is required in order to provide a default value for when the An alternative would be
|
@remesh22 I can't reproduce the problem using your sample application. I've tried with both 8.5.5.3 and 16.0.0.2. Here's the log from 16.0.0.2:
Can you please provide the precise steps and versions that are required to reproduce the problem? |
The application will start up even though we get lot of errors in ffdc location.Please check the log at servers/defaultserver/logs/ffdc. I am using version 8.5.5.9 |
Thanks. There are more failures than you mention. I see a
Now that I can see the failures, I can also see that I was wrong (again) when I said that changing the look up would fix the error. For example, three of the errors above are produced while resolving Spring Framework's |
As of Spring Framework 4.3, you can set a Spring property (system property or entry in a spring.properties file) "spring.jndi.ignore", e.g. |
Thanks for the info jhoeller. I am using version 1.3.5 right now and i will migrate to 1.4 when it is released. |
@remesh22 can you please try now? You can use Spring Framework 4.3 with your current setup, just override the |
Tried with updating the spring version to 4.3.1and also tried with 1.4.0.RC1. Getting the same error and also application.properties complain that 'spring.jndi.ignore' is an unknown property. |
That must be in a file called spring.properties or via a system property. This is a spring framework override. Can you try that please? |
FYI, I'm looking into this tonight for a potential quick fix in 4.3.2 still... Maybe there's a simple enough rule for the framework not to try clearly invalid JNDI names to begin with. |
See https://jira.spring.io/browse/SPR-14518 for the above-mentioned effort towards ignoring invalid JNDI names to begin with. |
I tried with system property and it's working fine. |
Thanks, that's great to know since it validates our assumptions. I've also finished SPR-14518 in the meantime, so those warnings on Liberty should not happen out of the box anymore either as of Spring Framework 4.3.2. |
I am facing a weird issue with containers other than Tomcat(spring boot 1.3.5). The issue is with
StandardServletEnvironment
which includesJNDIDatasource
as one of the property source.Spring is by default looking for some jndi properties ending with ":" at the end of the property. The lookup is failing for the following properties
etc
Here is the sample application.
demo_ibm.zip
The text was updated successfully, but these errors were encountered: