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
Boot Dashboard build cannot locate files #1186
Comments
It smells a lot like then m2e issue consequences in Eclipse: #929. |
Thanks! Just installed I will keep you updated. (FYI : till now Cleaning the project and building from scratch didn't help) |
That is awesome, thanks for giving this a try. Would be extremely interesting to know whether this new m2e snapshot version solves this issue for you. Please keep us updated on that. |
Unfortunatlty it didn't work. FYI:
Description:
this works fine, and it was working well even before having updated m2e to the latest snapshot. This issue is a little bit frustrating because it doesnt occur all the time and it's complicated to provide the steps to reproduce it. |
Hmmm... 🤔 If you startup the application via the dashboard and the error message appears, could you take a look at the target output folder and its content to see if there is anything missing from it? Maybe some files missing in that folder that you would expect to be there? (like application.prpoerties, .class files for the mapstruct generated sources, etc.) That might point us in some direction. |
The files are all there, but somehow STS/Eclipse cannot find them. |
Just a little update on this, I can confirm that using this little app: https://www.petges.lu/download/ Anyway whould be nice to understand the cause ... |
This is quite puzzling. If I understand you correctly, you are changing the modification timestamp of the files with the tool you mentioned and then it works? Another test here could be to run the application from the command line instead of the boot dashboard to see if just running |
There is a |
I cannot find this button , can you give me more info where to find this? |
@navy1978 it is on the Java launch config not on the spring boot launch config (perhaps we should have it on the spring boot launch tab as well). |
Sorry I was busy and I had no time to test. In any case I didnt get what you were suggesting. If you wanted me to test the command executed by STS to launch the microservice, that Java launch config is not helping , I found an alternative way to see the command executed. Since I see the pid on the Eclipse console I can use this command in Window:
this returns the command executed by STS to launch the microservice. I can try to run this from command line next time I will have the the issue, if is what you were suggesting... |
Yes, if you run into the issue, it would be interesting to see if executing the command from the command line works while the IDE fails to launch the app. This is not meant as a workaround, just as another step in debugging this strange problem. |
Hi,
We encountered a perplexing issue while utilizing STS 4.21.0.
Although the system generally (99% of the time) functions smoothly, we intermittently encounter an error when attempting to start a microservice from the Boot Dashboard. The error message is as follows:
Field mapper in xxx.yy.MyService required a bean of type 'xxx.yy.MyMapper' that could not be found.
Our project employs mapstruct, and the necessary Mapper is generated and located within the directory:
target/generated-sources/annotations.
Interestingly, manually editing the file that cannot be found within STS resolves the issue temporarily, but the application subsequently fails to locate another required file.
Our suspicion is that the build process triggered when starting the microservice from the Dashboard becomes corrupted, resulting in an inability to locate these files.
Once this error occurs it doesn't go away (recompiling refreshing , maven update, restart of STS, whatever doesnt work), but strangely, executing the following command via the command line:
mvn spring-boot:run
Allows the microservice to start successfully. Upon stopping the service and returning to STS, starting the microservice from the Dashboard works flawlessly. It appears that executing the command via the command line initiates a process that somehow rectifies the issue.
It's worth noting that occasionally, instead of the previously mentioned error, we encounter the following:
This error suggests an inability to locate the application.properties file. Again it looks like the build cannot locate some files
Please be aware that this issue began occurring with the 4.21.0 version of STS, as we had no such problems with version 4.15.0.
Unfortunately I cannot provide the steps to reproduce this.
I hope what I described makes sense to you.
Thank you so much for your work!
The text was updated successfully, but these errors were encountered: