Announcement Announcement Module
Collapse
No announcement yet.
In my Spring Project BeanFactory and XmlBeanFactory classes are not resolved Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • In my Spring Project BeanFactory and XmlBeanFactory classes are not resolved

    Hi All,
    I manged to install SpringIDE 2.0.0.v200705150600 and WST 1.5.4 using Eclipse Callisto and http://springide.org/updatesite_dev/ site on JDK 5. Its installed correctly. Then I created a new Spring Project and add my bean classes and bean config file. Then I added my simple client file as follows. However my project can not resolve BeanFactory and XmlBeanFactory classes. They should come with the spring.jar. I thought Spring IDE plugin automatically add that jar to my project. I can build my project only if I manually add the spring.jar from springframework2.xx_HOME/dist/spring.jar.
    Is it because somthing wrong with Spring IDE or have I missed configuring somthing. I expect spring IDE to add this jar without me configuring it which is pretty bad
    Can some one clarify this.
    Thanks,
    Nalaka


    import org.springframework.core.io.FileSystemResource;;
    import org.springframework.beans.factory.BeanFactory;
    import org.springframework.beans.factory.xml.XmlBeanFacto ry;

    public class HelloApp {
    public static void main(String[] args) throws Exception {
    BeanFactory factory = new XmlBeanFactory(new FileSystemResource("hello.xml"))
    GreetingService greetingService = (GreetingService) factory.getBean("greetingService");
    greetingService.sayGreeting();
    }
    }
    Last edited by nalaka; Jun 2nd, 2007, 01:33 AM.

  • #2
    I expect Spring IDE to add this jar without me configuring it which is pretty bad
    No, Spring IDE does not add anything to your projects classpath. Can you please tell me why it is "bad" that Spring IDE doesn't add the spring jars. Do you actually want a tool that is so invasive that it will determine your projects dependencies (spring jar file, version of spring jar file)?

    Spring IDE does not care about the spring version being used: you can use 1.2.x, 2.0 or even 2.1. So you as a developer have the freedom of choice.

    Christian

    Comment


    • #3
      Yes I got your valid point. . It would have been better that being documented in the user guide. May be its documented yet the point is not found by me.
      Thanks.
      - Nalaka

      Originally posted by cdupuis View Post
      No, Spring IDE does not add anything to your projects classpath. Can you please tell me why it is "bad" that Spring IDE doesn't add the spring jars. Do you actually want a tool that is so invasive that it will determine your projects dependencies (spring jar file, version of spring jar file)?

      Spring IDE does not care about the spring version being used: you can use 1.2.x, 2.0 or even 2.1. So you as a developer have the freedom of choice.

      Christian

      Comment

      Working...
      X