Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Eclipse debug behavior change when modifying datasources ( *.ds.xml) on 13.0 and eclipse 2023-03 version

    SmartClient Version: v13.0p_2023-04-25/PowerEdition Deployment (built 2023-04-25)

    Eclipse Version 2023-03.

    This is not directly a SmartGWT question, but not sure how to google an answer to this, and hoping you might have a suggestion. And yes I know changing two major revisions at the same time is not advisable.

    In this combination of versions of SmartGWT and eclipse when we make changes to datasources ( *.ds.xml ) we see that the changes are not automatically picked up in the deployed version running in eclipse under getty. Similarly changes in server side *.java code are not causing automatic recompiles in the browser. To get any of these changes into the running debugger we have to stop the server/getty in eclipse and re-run the configuration in eclipse and then reload the browser tab again. Like starting from scratch.

    Yes we have the Project -> Build Automatically setting of eclipse set.

    Automatic updates due to code changes (DS or .java) used to work in our older eclipse version (2018) and 12.1 SmartGWT.

    I suppose what I'm asking is this: is this an artifact of smartGWT 13.0 or of eclipse 2023-03, or both? Or do you have no comment?

    Click image for larger version

Name:	ProjectSettings.png
Views:	254
Size:	100.2 KB
ID:	270487


    #2
    I have followed all the suggestions in https://www.appsloveworld.com/eclips...ts-new-changes

    with no positive outcome.

    Comment


      #3
      This is really not our area of expertise, but, this is a great question for ChatGPT. We reframed it slightly and asked, and got the following suggestions, which seem worth looking at (see below).

      Note that we definitely haven't changed anything in SmartGWT which might conceivably have this effect. This is just one of those bizarre Eclipse problems, and we suspect that another dev who sets up the same environment won't have the problem (we've seen that kind of thing a lot).



      ---

      It seems you have an issue with automatic hot-reload of your code changes, specifically for your .ds.xml files and your server-side .java files, even though the "Build Automatically" setting is enabled in Eclipse.

      Here are a few things you could check to resolve the issue:
      1. Maven or Gradle settings: If you're using Maven or Gradle, make sure your configuration is properly set up for automatic reloading. In the case of Maven, the maven-eclipse-plugin should be correctly configured. For Gradle, ensure the 'eclipse' plugin is applied in your build.gradle file.
      2. Project Facets: Make sure the Dynamic Web Module facet is enabled and properly configured in your project properties. To do this, right-click on the project > Properties > Project Facets > check Dynamic Web Module.
      3. Clean and Update Project: Right-click on the project and select Clean, and then update the project (right-click > Maven > Update Project). Sometimes, the issue can be solved by simply cleaning and updating the project.
      4. Check the JRebel Plugin: If you're using JRebel for hot reloading, ensure it's correctly set up. You might need to update it to the latest version or reinstall if it's not working properly.
      5. Check Project's Deployment Assembly: Right-click on your project > Properties > Deployment Assembly. Check if all the dependencies and source files that need to be deployed are included.
      6. Server Configuration in Eclipse: Check the server configuration in Eclipse. Make sure the server is set to automatically publish changes. To do this, double click on the server in the Servers view, then under the "Publishing" section select the option "Automatically publish when resources change".

      Remember that for the changes in these settings to take effect, it might be necessary to restart Eclipse.

      Comment


        #4
        Thanks.

        I would be really interested in seeing how you phrased a question of this nature to chatGPT.

        So in chatGPT's list items 1, 4, 5, and 6 simply do not apply. I have run suggestion 3 many times and there is no change.

        Attempting to enable Project Facets, suggestion #2, completely messed up the eclipse workspace for the project, and even removing the Project facet did not fix those problems.

        Luckily I have another reference checkout of the repository from which I can find the .metadata and .project etc. of eclipse and see if I can get eclipse back up and running.

        Sorry for starting a wild goose chase here.

        Comment


          #5
          Sorry to hear about the Project Facets breaking things, but glad you had a backup!

          As far as additional steps, we're really reaching now, but:

          1) consider having another dev build an equivalent environment and see if the same thing occurs

          2) try to figure out whether Eclipse is actually doing the auto-rebuild but just not putting the resources into the right spot. For example, is there a CPU spike? Do compiled classes appear somewhere on disk and it's just the wrong spot? Or perhaps new compiled classes do appear in the expected spot, and it's Jetty not picking them up?

          3) look into whether there's some filesystem difference between the Eclipse project area and Jetty resource area - is one a network drive? Are permissions not set correctly when files are copied over, so Eclipse can't write there?

          As far as the previous reply, this is how we phrased things for ChatGPT. It's really just a slight variation on what you wrote; ChatGPT knows about SmartGWT and can write SmartGWT code, including some fairly advanced stuff (like novel, reusable components).

          I have a SmartGWT project using Eclipse Version 2023-03. In this combination of versions of SmartGWT and eclipse when we make changes to datasources ( *.ds.xml ) we see that the changes are not automatically picked up in the deployed version running in eclipse under Jetty. Similarly changes in server side *.java code are not causing automatic recompiles in the browser. To get any of these changes into the running debugger we have to stop the server/getty in eclipse and re-run the configuration in eclipse and then reload the browser tab again. Like starting from scratch. Yes we have the Project -> Build Automatically setting of eclipse set. Automatic updates due to code changes (DS or .java) used to work in our older eclipse version (2018) and 12.1 SmartGWT. What could be the problem here and what should I check?

          Comment


            #6
            Hi,

            1) Yes all 3 of us developers see the same eclipse behavior in different checkouts of the sources.
            2) requires much more intensive analysis, but good suggestions.
            3) when running on different hosts (linux) with the same version of eclipse and SmartGWT, but different file systems, even different data centers, we see the same behavior, i.e. requires a full configuration run to see changes.

            By the way, copying the .metadata directory and sub-directories from a working (i.e. eclipse not falsely detecting errors in various .xml files ) checkout of the repos to my broken checkout fixed the Projects Facets bug.

            That is an amazing example of chatGPT working. But our company does not allow us to use chatGPT, as it sees it as a potential security leak.

            Comment


              #7
              #2 might not be that intensive, for example, if you find the deployment directory (simple filesystem search if you don't already know it), then you could do a directory listing to see timestamps on files, make a change, wait for the recompile, and check the directory listing again. If the timestamps have changed, then you know that Eclipse is doing a recompile but Jetty just isn't picking it up.

              About ChatGPT, that's unfortunate, but the good news is that we plan to add automated AI responses on the forums here (not an automatic post - you'll just see the response separately).

              So you'll have AI available in that way, responding to questions you were going to post publicly anyway, hence not a security issue.

              Comment

              Working...
              X