Announcement Announcement Module
No announcement yet.
Validations not working Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validations not working


    I have installed Spring IDE 1.2.2 with Eclipse 3.1.0 RC 3.
    I was able to add spring nature to the project, set spring
    configuration files in the project, view them in the
    "Spring Beans" view and see the graph.

    I was trying to test the validation mechanism of SpringIDE.
    So I changed a couple of entries in the spring configuration
    to generate errors but did not see any errors. When I click
    on a valid configuration in the Spring Bean view and select
    'Open Bean Class' the bean class is opened. When doing the
    same with a wrong configuration an error is not thrown since
    the class doesn't exist

    The main bean has a reference to "FileCopierOne" but there
    are no bean configurations with such an id. I have appended
    "NotFound" to an existing valid configuration to make it
    invalid. In the same configuration I have changed the class
    name to "springwork.FileCopier1NotFound". This class does
    not exist in the project and no errors are shown for this too.

    I checked the filters option under the problems tab. The
    Spring Bean Problem Marker and Spring Problem Marker
    are enabled. The filter does not hide errors from this

    Any help would be welcome.

    Here is the configuration :

    <bean id="FileOperatorBean" class="springwork.FileOperator">
    <constructor-arg index="0"><value>config\\filelocator-config.txt</value></constructor-arg>
    <constructor-arg index="1"><value>SlashCopier</value></constructor-arg>
    <property name="copierInstance"> <ref bean="FileCopierOne"/> </property>

    <bean id="FileCopierOneNotFound" class="springwork.FileCopier1NotFound">
    <property name="configFileName"><value>config\\fileCopier1.t xt</value></property>

    <bean id="FileCopierTwo" class="springwork.FileCopier2">
    <property name="configFileName"><value>config\\fileCopier2.t xt</value></property>


  • #2
    Re: Validations not working


    please check if the validator is available and activated via the project's properties page "Builders". Here a builder called "Spring Project Builder" (the validator :-)) should be listed and enabled.

    Then make sure that automatic building is enabled (the menu item "Project / Build Automatically" is checked). Otherwise you have to use the menu item "Project / Build Project" to trigger the validator.

    Ok, now let's check if the builder is running by opening a Spring beans config file (the ones decorated with a small 'S' and listed in the Spring beans view) with Eclipse's standard text editor via "Open With / Text Editor". This way we can assume that the valdiation errors are not created by your XML editor. Then invalidate the root tag <beans> and save the file. Now you should get a validation error 'Document root element "xxx" must match DOCTYPE root "beans"'. If this isn't the case then something is totally wrong with your setup of Spring IDE.

    I created an entry in Spring IDE's FAQ.



    • #3
      It works!!! Thank you


      The automatic build was disabled. I have
      enabled it and now works fine.