facebook

MVC SpringApp sample

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #221960 Reply

    Hi

    I have been working through the MVC SpringApp sample which works fine outside of the Eclipse IDE. I have now attempted to create this as a project within Eclipse so that I can try the debugging.

    Firstly there are two files log4j.properties and messages.properties that reside in the classes folder but it appears that this folder is not visible in the project. What are the implications if I put these in a new properties folder?

    Secondly when I try to navigate to the PriceIncrease page I get the following error:

    2004-12-29 16:56:47,554 INFO [org.springframework.web.servlet.DispatcherServlet] – <Initializing servlet ‘springapp’>
    2004-12-29 16:56:47,585 INFO [org.springframework.web.servlet.DispatcherServlet] – <Framework servlet ‘springapp’ init>
    2004-12-29 16:56:47,585 INFO [org.springframework.web.servlet.DispatcherServlet] – <Servlet with name ‘springapp’ will try to create custom WebApplicationContext context of class ‘org.springframework.web.context.support.XmlWebApplicationContext’ using parent context [null]>
    2004-12-29 16:56:47,585 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] – <Loading XML bean definitions from ServletContext resource [/WEB-INF/springapp-servlet.xml]>
    2004-12-29 16:56:47,726 ERROR [org.springframework.web.servlet.DispatcherServlet] – <Context initialization failed>
    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name ‘dataSource’ defined in ServletContext resource [/WEB-INF/springapp-servlet.xml]: Class that bean class [org.springframework.jdbc.datasource.DriverManagerDataSource] depends on not found; nested exception is java.lang.NoClassDefFoundError: javax/sql/DataSource

    Have checked that the rt.jar is included and has the DataSource class and it does. This is odd because the first page is fine. Can anyone offer any guidance on this.

    Thanks
    David

    #221965 Reply

    Greg
    Member

    For the properties files, whatever directory they are in the classes folder, you can mirror that directory and place them in the source folder for the web project. If they are in the root of the classes folder, you can place them in the root of the source folder and the Eclipse builder will just copy them to the output directory <webroot>/WEB-INF/classes.

    What appserver are you deploying to? As far as the spring app stuff, maybe someone else that reads these forums with some experience can jump in and help.

    #221977 Reply

    Thanks for your answer to my first question. Regarding the appserver I’m deploying to Tomcat 5

    #221990 Reply

    Scott Anderson
    Participant

    On the second issue, it appears that Spring is trying to load your datasource but can’t find javax.sql.DataSource on your server classpath. However, javax.sql.DataSource is in rt.jar so this is odd. I’d suspect the issue is the Tomcat configuration you’re using. Can you please check your configuration against the instructions in our Application Server Quickstart that is available in the included MyEclipse documentation or on the website in the Documentation section here:
    http://www.myeclipseide.com/ContentExpress-display-ceid-67.html

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: MVC SpringApp sample

You must be logged in to post in the forum log in