Announcement Announcement Module
Collapse
No announcement yet.
Spring Beans Config Selection: No entries available Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Beans Config Selection: No entries available

    How to reproduce:

    1) I downloaded Eclipse 3.3 (Europa) from:
    http://www.eclipse.org/downloads/dow...nux-gtk.tar.gz

    2) I downloaded SpringIDE 2.0 (said in the annoucement to be compatible with Europa) from:
    http://springide.org/updatesite/spri...0706271108.zip

    3) I installed SpringIDE as a local update site, I can see that it is installed, all of the usual SpringIDE dialogs and views are present.

    4) In a brand new workspace, I created a new dummy project containing nothing.

    5) I copied/pasted a valid applicationContext.xml from another project. Note that this other project is a valid Spring application that loads perfectly at runtime.

    6) I added the Spring nature to this project.

    7) Now I want to add applicationContext.xml as a config file. To do so, I right-click on the project, click "Properties", "Spring", "Beans support", in the "Config Files" tab I click on "Add...". The "Spring Beans Config Selection" window pops up.


    The problem: Impossible to add the config file "applicationContext.xml". The "Spring Beans Config Selection" is mostly greyed out, with a red sign saying "No entries available". All I have is the "type filter text" widget and a help button, both of which are useless.

    In my previous Eclipse/SpringIDE environment I could select/unselect beans files at will. I thought it could be a problem with my applicationContext.xml, so I simplified it, and the problem is reproduced even with such a simple one :

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>
    <!-- Empty -->
    </beans>
    Did I do anything wrong ?
    Do you need more details on how to reproduce it ?
    Is it a bug in SpringIDE ?

    Thanks a lot and keep up the good work,
    Nicolas RAOUL.
    http://nrw.free.fr

  • #2
    Similar issues. Is there a autorial anywhere that explains how to use Spring IDE to develop a new project (not an existing one).?

    Thanks

    Comment


    • #3
      Originally posted by Raoul_Nicolas View Post
      5) I copied/pasted a valid applicationContext.xml from another project. Note that this other project is a valid Spring application that loads perfectly at runtime.
      Did you copy the Spring config file to the project's classpath?
      Did you refresh the corresponding directory in Eclipse's workspace?

      Originally posted by Raoul_Nicolas View Post
      7) Now I want to add applicationContext.xml as a config file. To do so, I right-click on the project, click "Properties", "Spring", "Beans support", in the "Config Files" tab I click on "Add...". The "Spring Beans Config Selection" window pops up.

      The problem: Impossible to add the config file "applicationContext.xml". The "Spring Beans Config Selection" is mostly greyed out, with a red sign saying "No entries available". All I have is the "type filter text" widget and a help button, both of which are useless.
      This error message is shown if the dialog isn't able to pick up any non-java workspace resource (with the file extension defined in the "Beans support" tab) from the project's classpath. "Non-java resource" means the corresponding file has to be part of the Eclipse workspace (technilly spoken this file has to be accessible as an instance of IResource via Eclipse's PlatformRuntime). This excludes all resources defined via classpath containers, e.g. the java runtime libraries or WTP's webapp libraries.

      Originally posted by Raoul_Nicolas View Post
      In my previous Eclipse/SpringIDE environment I could select/unselect beans files at will. I thought it could be a problem with my applicationContext.xml, so I simplified it, and the problem is reproduced even with such a simple one :

      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
      <beans>
      <!-- Empty -->
      </beans>
      Spring IDE doesn't care about the content of a config file. Only the aforementioned file extension is used for filtering unwanted non-java resources.

      Comment


      • #4
        Torsten: you are right, this is a classpath problem.

        The root of the problem is that SpringIDE won't work if your project was not created as a "Java project" but just as a "Project", which is top of the list in the "New Project Wizard".

        Which is really odd, because I don't think of my project as a "Java Project", it is not about Java code, it is just a Spring Beans Config file, some JARs, and a basic WEB-INF directory.

        A basic project (not a "Java Project") does not seem to have such thing as a classpath.

        So, now I will fix the project to make it a Java project, in order to use SpringIDE again. :-)

        Another odd thing is that our project had stayed unchanged in CVS for years and SpringIDE used to work fine with it. So it looks like a change in Eclipse/SpringIDE behaviour. I updated the SpringIDE documentation accordingly:

        http://springide.org/project/wiki/SpringideGuide
        http://springide.org/project/wiki/SpringProject
        http://springide.org/project/wiki/SpringProjectNature

        Danke sehr Torsten und viel Erfolg :-)
        Nicolas RAOUL
        http://nrw.free.fr

        Comment


        • #5
          Hi,

          I checked the problem and found that we have removed support for plain projects during 2.0 development by accident (see here). I opened ticket #660 for this.

          Christian

          Comment


          • #6
            Hi Christian,

            Thanks for fixing this bug so quickly !!! That's impressive !
            I just tried the last nightly build, and it works like a charm :-)

            For those having the same problem, the build I just tested can be found at :
            http://springide.org/bamboo/download...tesite_nightly
            It can be installed just as easily as a release.

            Thanks a lot !
            Nicolas.

            Comment

            Working...
            X