Closed dwi-mfbcs closed 9 months ago
Please try the following steps:
Thanks @tomix26 - I have ensured the settings that you suggested. I even explicitly set the lazy initialization to true. Unfortunately, still experiencing the same issue. Is there any debugging that you can suggest?
I would suggest placing a breakpoint at the location where the exception is thrown. Then, examine the call stack and go through the methods where new Spring beans are being created (like in the doCreateBean
method). This way, you can trace back to the bean that is forcing the initialization of all database providers, including those that shouldn't normally be initialized. It's likely related to a direct dependency on a database provider in your project or possibly a bean postprocessor that disrupts the lazy initialization of spring beans in general. However, I expect it should not be caused by any bean from the embedded database library.
Thank you @tomix26 - it turns out it's a subtle mistake on my part. I was referencing an internal library with a wrong version (0.0.1.13 instead of 0.1.13, duh..). My apology for causing trouble here.
Ok, thanks for letting me know.
I’m experiencing problem with running unit tests that involve spinning up an embedded database (postgres).
In this case, I specifies that I want to use specific provider (ZONKY).
However it seems that it asks for all data providers being instantiated.
Example of error (in this case it asks for the
opentable
provider that I don’t ask):Version of libraries being used:
Am I missing something here? Looking for help with resolving this issue..