I'm trying to learn about Spring using SpringSource Tool Suite. I haven't had much successful experience with either at this stage.
So far I've been able to install STS and create a new project, but haven't gotten much further. The problem seems to occur when running the application on the tc Server. I'll run through the steps I've taken and perhaps someone can point out where I'm going wrong. For the record, I'm using Ubuntu 11.10.
Here's where the big trouble begins.
http://localhost:8080/springmvc/
Console output:
Nov 3, 2011 4:21:29 PM com.springsource.tcserver.security.PropertyDecoder <init>
INFO: tc Runtime property decoder using memory-based key
Nov 3, 2011 4:21:30 PM com.springsource.tcserver.security.PropertyDecoder <init>
INFO: tcServer Runtime property decoder has been initialized in 924 ms
Nov 3, 2011 4:21:32 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 3, 2011 4:21:32 PM com.springsource.tcserver.serviceability.rmi.JmxSocketListener init
INFO: Started up JMX registry on 127.0.0.1:6969 in 368 ms
Nov 3, 2011 4:21:32 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3809 ms
Nov 3, 2011 4:21:32 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 3, 2011 4:21:32 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: VMware vFabric tc Runtime 2.6.1.RELEASE/7.0.20.B.RELEASE
Nov 3, 2011 4:21:32 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor springmvc.xml from /home/luke/springsource/vfabric-tc-server-developer-2.6.1.RELEASE/spring-insight-instance/conf/Catalina/localhost
Nov 3, 2011 4:21:33 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:springmvc' did not find a matching property.
Nov 3, 2011 4:21:33 PM com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader start
INFO: Context [localhost|springmvc] will not be woven
Nov 3, 2011 4:21:34 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
at java.lang.Class.getConstructor0(Class.java:2716)
at java.lang.Class.newInstance0(Class.java:343)
at java.lang.Class.newInstance(Class.java:325)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4660)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
... 14 more
Nov 3, 2011 4:21:34 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Nov 3, 2011 4:21:34 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Nov 3, 2011 4:21:34 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [227] milliseconds.
Nov 3, 2011 4:21:34 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/springmvc] startup failed due to previous errors
Nov 3, 2011 4:21:34 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor insight.xml from /home/luke/springsource/vfabric-tc-server-developer-2.6.1.RELEASE/spring-insight-instance/conf/Catalina/localhost
Nov 3, 2011 4:21:41 PM com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader start
INFO: Context [localhost|insight] will not be woven
Nov 3, 2011 4:21:42 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Nov 3, 2011 4:22:00 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Nov 3, 2011 4:22:11 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'Spring MVC Dispatcher Servlet'
Nov 3, 2011 4:22:18 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory manager
Nov 3, 2011 4:22:18 PM com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader start
INFO: Context [localhost|manager] will not be woven
Nov 3, 2011 4:22:18 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
Nov 3, 2011 4:22:18 PM com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader start
INFO: Context [localhost|ROOT] will not be woven
Nov 3, 2011 4:22:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Nov 3, 2011 4:22:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 46286 ms
Any help in deciphering this, figuring out a solution and pointing out what I'm doing wrong here in what seems like a very simple use case of STS, would be greatly appreciated.
ditto Ralph.
selected the top level project, went to
Run As > Maven Clean
Run As > Maven Install
Run As > Run on Server
and it went through correctly. I'm not sure why it was failing on the first place though, or why installing it twice fixes it.