Announcement Announcement Module
Collapse
No announcement yet.
Running Spring Template project Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running Spring Template project

    I have a simple spring utility project I wrote a while ago. I run it from time to time to test things. To run it I normally select the project, then "Run As" then "Java Application" and the project starts running.

    Suddenly though, when I try to run, I get a progress bar indicating SpringSource is searching for types which can take up to a minute, then I get a window titled "Select Java Application" with an input text field for "Select type(? = any character, *= any string, TZ = TimeZone)" and a scrolling selection menu for "matching items" which contains selections such as
    • BundleCheck - Sun.jkernel
    • CGIHandler - sun.rmi.transport.proxi
    • ChangeFileEncryption - org.h2.tools
    • ...

    I'm not sure what to do with this pop up, and cancelling it cancels the run. So I can't get this program to run right now.

    Other Template programs are runing fine. Something happened with this one, I don't know what.
    Thanks for the help
    Mike

  • #2
    Hey Mike!

    It looks like Eclipse/STS has trouble identifying the main class for your project. What happens if you select an existing launch configuration and select the main class manually in there?

    -Martin

    Comment


    • #3
      Hi Martin,

      From the selection list in the "Select Java Application" window I selected "Spring.HibernateSample - com.apress.prospring3". SpringHibernateSample is the name of my main class and it's base package is com.apress.prosping3. When I do this it will run, however I must do this now each time to run where as before the project would just run.

      Thanks

      Comment


      • #4
        Something may have gotten corrupted in the launch configuration to run that particular project. Try deleting the launch configuration. The next time you try to run it a new one will be created.

        To delete launch configuration. Use the "Run >> Run Configurations ..." menu. Find the "Java Application" launch config for your project then delete it.

        Hopefully that will fix the problem.

        Kris

        Comment


        • #5
          Originally posted by Kris De Volder View Post
          Something may have gotten corrupted in the launch configuration to run that particular project. Try deleting the launch configuration. The next time you try to run it a new one will be created.

          To delete launch configuration. Use the "Run >> Run Configurations ..." menu. Find the "Java Application" launch config for your project then delete it.

          Hopefully that will fix the problem.

          Kris
          Thanks Kris, I tried to delete the launch config, I believe I found it and deleted it, it was re-created but the problem remains. I can run the project, I just have to keep selecting the configuration(?) each time.

          I'm also now getting a pop-up window for, I believe STS updates. I'm wondering if I should accept and if this might help.

          Thanks again
          Mike

          Comment


          • #6
            > I'm also now getting a pop-up window for, I believe STS updates. I'm wondering if I should accept and if this might help.

            I doubt that it will help. The "Run As >> Java Application" functionality is actually part of plain Eclipse. Nothing in the update should really be affecting that.

            I have not much of an idea what is going on. I'll make a guess...

            > I just have to keep selecting the configuration(?) each time.

            If you get a popup that asks you to select a configuration (not a main type!) then it means the launcher found more than one existing configuration for the thing you are trying to run. If that's happening, maybe you didn't actually delete the configuration as you think you did. Or maybe you did, but there's another one somewhere.

            Still sounds like something is weird with the launch config(s) for that particular project since your other projects don't have the problem.

            Try creating a new/empty workspace. Then import your problem project into that workspace. Try to run it there. If that works then something in your workspace metadata (launch configs or something else) is probably broken/corrupted. If it doesn't then maybe there's something specific about this project that triggers some buggy behavior.

            Kris

            Comment

            Working...
            X