-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Can't use JNDI test context (SimpleNamingContext) with Hibernate 5.2 #22732
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
This is to be expected, since the Javadoc for
Thus, any of the methods related to Does Simple-JNDI work for you? |
Yes I used Simple-JNDI now. But don't you think this feature would be useful and suitable in Spring? It could be implemented based on the Simple-JNDI NameParser. |
Frankly, I'd rather deprecate And for any JNDI needs, there are projects such as Simple-JNDI indeed. Nothing wrong with using those. |
If the project maintainer don't want, who am I to disagree. Thank you. |
Please note that the mock JNDI support will be officially deprecated in Spring Framework 5.2 (see #22779). |
Got it. I am using JNDI to create unit tests for legacy J2EE apps. |
Affects:
spring-test
5.1.6.RELEASEI am trying to create datasources to bind them in JNDI to run my JUnit tests.
When I do a
lookup()
it works, as the code bellow:But when running Hibernate, it throws an exception:
Stack trace
This happens because the mock is incomplete.
SimpleNamingContext
class has unimplemented methods, so we can't use it with Hibernate 5.2.The text was updated successfully, but these errors were encountered: