-
Notifications
You must be signed in to change notification settings - Fork 41.1k
2.3.7 data.sql are not any longer exectued #24804
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 scripts are loaded from the classpath so it should make no difference if they're in We have numerous integration and smoke tests that rely on |
I tried to reproduce the issue with a simple project but didn't succeed. I digged little bit deeper and turned on the log level for our real project. I attach the logs to the issue. It seems like the data.sql are exectuted but they are not fetched from the DB. Data which was inserted and could be looked for:
Remark: The logs are up to the point where an JPARepostiory.findAll() was executed. Immediately afterwards a breakpoint was set and the logs ended. While in 2.3.6 the findAll() returned a list of 8 items the 2.3.7 version returned 0 items. Therefore I concluded that the data.sql were not executed. But perhaps the conclusion was too quick and the root cause is somewhere else. |
Thanks for the logs. Unfortunately, there's nothing in them that's an immediately obvious reason for the different behaviour. I'm not sure what logging you enabled, but the output doesn't seem to include any Spring Framework or Spring Boot code. For example, I'd expect to see logging from
This would suggest that the problem's somehow specific to your environment or to your main application's dependencies. The former will make it hard for us to diagnose the problem. The latter will too without a sample with which we can reproduce the problem. |
Sorry, I have no clue what kind of options I should enable. I did already on
Since they are not sufficient plz advice which one to set. |
That's a strange one too. Root-level debug logging should have been sufficient. I suspect you may have some configuration elsewhere that's overriding that configuration for all but Hibernate and handful of other loggers. Unfortunately, I can't tell if that's definitely the case without knowing more about your application and its configuration. I think we've reached the point where we need a sample that reproduces the problem to make some progress. |
The config of the logging is quite strange. The root level is not applied to the sub level - don't know if this is another issue? Anyway config like this included the information you've requested.
If you need other log levels (or format of the output) than plz advice. boot.2.3.7_jdbc_ROOT.log.gz As mentioned already. The easiest way to find the diff in the log is by search for PROPERTY_EXTENSION |
Thanks. On 2.3.6 the
There's no such log line with 2.3.7. This gives us something to focus on. The thread being As far as I can tell from the logs provided, the |
Just a few points from my side:
End of my general statement. Focusing of the issue: Please provide next time a specific You mentioned I should set a breakpoint in 2.3.7 - I did so. It stopped as well in 2.3.6. for the |
I did little bit of debugging by myself and set a breakpoint in org.springframework.context.support.AbstractApplicationContext line 361:
for
AND Digging further into
For the sake of completeness I included as well the log files with the following settings.
|
Thanks. #24497 isn't relevant here as it's regarding a change made in 2.4.x and this issue is occurring in 2.3.7. Let's keep this issue focussed on a single problem please. The missing
Can you please use the debugger to determine when the event hasn't been published? |
I don't understand what you are looking for. As mentioned before - the |
The event's published in a few different places depending on what sort of initialization is being used. The place that's of interest in this case is the one shown in the stack above: Lines 98 to 102 in aa15a1d
This is the code in Spring Boot 2.3.7 and it's the call to publishEventIfRequired that should trigger the publication of the event. |
Sorry if I'm persistent - but I still guess .... Well anyway.... In Spring Boot 2.3.7. I neither hit line 90, 93, 96 nor 99. While in Spring Boot 2.3.6. I hit all of them - before I hit So, what kind information you need next? |
That would suggest that the |
Sorry, but I doubt that the Why is the order changed from 2.3.6 ==> 2.3.7? Is this somehow related? Yeah, a sample would be great - but I have honestly no clue what to include and what to provide. |
The ordering should not have changed. The Unfortunately, I don't think I can justify spending any more time trying to help you based on the information that you're currently able to provide. The structure and components of an application are almost impossible to infer from log files alone. If you cannot provide a minimal sample that reproduces the problem, then perhaps you could provide access to the application itself via a private repository on GitHub or similar along with the steps to take to reproduce the problem? |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue. |
After upgrading from 2.3.6. to 2.3.7. the data.sql scripts are not any longer executed when starting test runs.
The scripts are located in src/test/resources
I've checked this and since I need to load data into my own properties I did it with
The text was updated successfully, but these errors were encountered: