Sts4: STS4 Eclipse: Failed to refresh live data from process 18225

Created on 20 Apr 2020  路  15Comments  路  Source: spring-projects/sts4

Hello,

I'm running the stand alone STS4 based on Eclipse, and straight out of the box I get this error when I run a basic Hello World Sprinb Boot webapp.
Screenshot from 2020-04-19 15-25-18

Is there something that requires configuration? or am I doing something wrong?

Most helpful comment

Glad to hear that this works just fine when you have the actuators on the project, that is good news.

As mentioned above, you can disable the automatic process tracking in the preferences and instead manually enable this for a running spring boot application. That way you would avoid the error message for projects without actuators.

All 15 comments

You are doing nothing wrong. The tooling tries to show live hover information for your app: https://github.com/spring-projects/sts4/wiki/Live-Application-Information

But for some reason the tooling fails to make a connection to that running process. Do you have actuators on the project? And how did you start the app?

In case you are not interested in the automatic enablement of this live hover mechanism, you can just ignore this message.

You could also disable the automatic tracking of processes via Preferences -> Language Server -> Spring Language Server -> Spring Boot Language Server -> Spring Boot Java and deselect the Live Information - Automatic Process Tracking. Even if you disabled the automatic tracking, you can display the live information manually, as described here: https://github.com/spring-projects/sts4/wiki/Live-Application-Information#managing-live-data-connections-new-in-441

Hope this helps!

Hi Martin, thanks for your reply.

My application is a HelloWorld, I picked Spring Web MVC, thymeleaf, jpa and h2 database. As far as I can tell I don't have actuators, but I'm still a beginner, so that's why I asked if I was missing something.

image

image

This is literally all I have, and I'm starting the application by right clicking the project and selecting "run as... Spring Boot App" right after it starts it tries to connect to the process without success.

Good to know it is safe to ignore the error, I was confused by it, I previously used Eclipse 2019-12 with STS4 plugin and I don't remember seeing the error, so now that I moved to standalone STS4 I was confused if there was some setup I was missing.

Yes, it is absolutely safe to ignore the error and we will probably change that message dialog in the future anyway to not annoy or confuse users too much.

As a quick check, can you add the spring-boot-actuators module to your project to see if you can get the live hovers to work for your project? Would be interesting. And if not, maybe attach your project somewhere for us as an example to took at and think about possible improvements for those settings?

Adding spring-boot-actuators stopped the message entirely and looks like it is working as it should.

Screenshot from 2020-04-23 20-35-38

Perhaps if there are no actuators in the project there should not be any attempt to connect to a process? To prevent having to display an error message when it should not be required? Although it looks useful, I may include in my future projects! :)

Glad to hear that this works just fine when you have the actuators on the project, that is good news.

As mentioned above, you can disable the automatic process tracking in the preferences and instead manually enable this for a running spring boot application. That way you would avoid the error message for projects without actuators.

Yes, it is absolutely safe to ignore the error and we will probably change that message dialog in the future anyway to not annoy or confuse users too much.

As a quick check, can you add the spring-boot-actuators module to your project to see if you can get the live hovers to work for your project? Would be interesting. And if not, maybe attach your project somewhere for us as an example to took at and think about possible improvements for those settings?

It is good if you mention the _dependency_ block we need to add to the pom.xml
Thanks.

I added

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

to my pom.xml and that stopped the error message.

Please keep in mind that you should only use the Spring Boot Actuators if you want to use this live information feature or other things the actuators are good for. Adding actuators to your project only and exclusively to get rid of this error message would be wrong. In that case, please note that you can disable the automatic process tracking in the preferences, which would avoid this error message as well - and still allow you to manually connect the live hover mechanism to the project.

I disabled the automatic process tracking since I'm just learning and have no real use for Actuator just yet, I think this should be disabled unless actuator is enabled in the project either by the spring boot project creation wizard or by manual insertion by the user.

I agree, sounds like a very good point and idea how to improve this. Will take a look.

I added a check to avoid this automatic process connection for projects that don't have the spring boot actuators on their classpath. Should make this a lot smoother and avoids the error message coming up for projects without actuators.

Hello, I am seeing the error message again. I have my STS4 installation updated up to the latest release

image

It is again, a Spring Boot project without actuators. Let me know if you need any feedback or any help with debugging.

Hey @alexmex90, I double checked this with the latest snapshot build and it seems to work fine for my case, so it looks like my case is somewhat different from your case. Can you create a small sample project that reproduces the behavior? That would be awesome.

Not sure what happened, I was not able to replicate the issue.

I created two Spring Boot project, without anything, and other with Spring Web, none of which triggered the issue. I went to the project that triggered the issue initially and it didn't come up, so I guess everything's fine, if something new comes up, I will let you know.

Cheers!

@alexmex90 Ok, sounds good to me. Thanks for double-checking.

Was this page helpful?
0 / 5 - 0 ratings