Results 1 to 7 of 7

Thread: STS SpringMVC Template Project Problems

  1. #1
    Join Date
    May 2012
    Posts
    4

    Default STS SpringMVC Template Project Problems

    Hi all,

    I've downloaded and installed the STS today and am having problems creating a SpringMVC Template project.

    I create my project, clean it, build it and get the following errors in Eclipse...

    1. ArtifactTransferException: Failure to transfer org.springframework:spring-webmvc:jar:3.1.0.RELEASE from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework:spring-webmvc:jar:3.1.0.RELEASE from/to central (http://repo1.maven.org/maven2): No response received after 60000

    2. Class 'org.springframework.web.servlet.view.InternalReso urceViewResolver' not found [config set: chrisbeech/web-context]

    3. Missing artifact org.springframework:spring-webmvc:jar:3.1.0.RELEASE

    4. The container 'Maven Dependencies' references non existing library 'C:\Users\IBM_ADMIN\.m2\repository\org\springframe work\spring-webmvc\3.1.0.RELEASE\spring-webmvc-3.1.0.RELEASE.jar'

    I'm new to Spring, but not to Eclipse or Java and realise that the problem is because it's missing a jar file - the question is, how can I get STS to download a copy of that file?

    Failing that, where can I download it myself?

    Thanks,

    Chris

    PS I've tried cleaning the project again, and updating via Right click on the project > Maven > Update dependencies but nothing's working!

  2. #2
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    Looks like Maven wasn't able to download that artifact... :-(

    As a last resort, you could wipe out your local Maven repository. This usually triggers Maven to download everything again and this helps quite often in those wired situations. Just delete the content of the .m2 directory.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  3. #3
    Join Date
    May 2012
    Posts
    4

    Default

    Thanks for that Martin, it's solved one of my problems - although now I get the following....

    Error occured processing XML 'Unable to load schema mappings from location [META-INF/spring.schemas]'. See Error Log for more details

    ...for the /src/main/webapp/WEB-INF/spring/root-context.xml and /src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml.

    Any ideas?

    Chris

  4. #4
    Join Date
    May 2012
    Posts
    4

    Default

    Ok, so deleting the project and creating a new one solved that one.

    I'm now trying to deploy the sample project onto the embedded vFabric TC server and get the following exception during startup....

    SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListe ner
    java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Cla ss.java:2389)
    at java.lang.Class.getConstructor0(Class.java:2699)
    at java.lang.Class.newInstance0(Class.java:326)
    at java.lang.Class.newInstance(Class.java:308)
    at org.apache.catalina.core.DefaultInstanceManager.ne wInstance(DefaultInstanceManager.java:125)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4715)
    at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5273)
    at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:897)
    at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:873)
    at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:615)
    at org.apache.catalina.startup.HostConfig.deployDescr iptor(HostConfig.java:649)
    at org.apache.catalina.startup.HostConfig$DeployDescr iptor.run(HostConfig.java:1581)
    at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.jav a:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextExce ption
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1701)
    at org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1546)
    ... 20 more


    ...what's irritating here is that I haven't done anything other than i) download and install STS ii) create a template project iii) add the project to the vFabric server iv) start the server - but it's causing me so many problems!!

    Chris

  5. #5
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    Good to hear that the Maven problems are solved. I hope you see all the required libs showing up when you expand the "Maven Dependencies" entry in your package explorer. Do they?

    And can you try to do a clean build of the project after creation? There is a wired race condition somewhere in the builder code that we haven't solved yet and that sometimes causes the project not being built correctly.

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  6. #6
    Join Date
    May 2012
    Posts
    4

    Default

    Yeah, I tried a clean build (a couple of times) but it still doesn't find that class.....

  7. #7
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hey!

    But you have a node in your project called "Maven Dependencies" when you look at it in your package explorer and that node includes all the Spring libs when you expand it?

    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •