Results 1 to 4 of 4

Thread: How to use Spring 3.0.6 with STS 2.7.2 ?

  1. #1
    Join Date
    Oct 2011
    Posts
    2

    Default How to use Spring 3.0.6 with STS 2.7.2 ?

    Hello,
    I am newbie to Spring and STS.

    How can I use Spring 3.0.6 with STS 2.7.2 ?
    STS 2.7.2 provides Spring 3.0.5 by default but I need 3.0.6 to use Spring Security 3.0.7 because of its dependency.

    I created a new Spring MVC (hello world) project with STS and changed <org.springframework-version> property in pom.xml from 3.0.5.RELEASE to 3.0.6.RELEASE.
    Although I am not sure this approach was correct or not, the new version was automatically downloaded and installed into the local maven repository.
    But the problem is, tcServer cannot start with this new project when I restart the server.

    I got just one dialog message: "Server VMware vFabric tc Server Developer Edition v2.6 was unable to start within 120 seconds. If the server requires more time, try increasing the timeout in the server editor."

    Thank you in advance,

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

    Default

    Hi!

    You are going the right way, changing the dependency of the template project in the pom.xml from 3.0.5 to 3.0.6 is enough to update the project to use Spring 3.0.6. This is unrelated from the Spring version that is inside the STS distribution, because that is just the Spring framework STS uses internally.

    When you changed the dependency to 3.0.6 in the pom.xml and start tc Server, what do you see on the console? Does tc Server start and just needs more than 120 seconds to start? If so, you can increase the timeout as mentioned in the message dialog. I don't know exactly why tc Server should take such a long time to startup, but who knows...

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

  3. #3
    Join Date
    Oct 2011
    Posts
    2

    Default

    Thank you Martin,

    After I increased timeout to 600 seconds, tc Server has become able to start. Here is the console log. When I got an error before changing timeout, console log was always ended at "Initializing Spring root WebApplicationContext".
    I am running STS on ubuntu 10.04 with sun jdk 1.6.0_26.

    -------------------------------------------------------
    Oct 6, 2011 7:08:00 PM com.springsource.tcserver.security.PropertyDecoder <init>
    INFO: tc Runtime property decoder using memory-based key
    Oct 6, 2011 7:08:00 PM com.springsource.tcserver.security.PropertyDecoder <init>
    INFO: tcServer Runtime property decoder has been initialized in 445 ms
    Oct 6, 2011 7:08:01 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    Oct 6, 2011 7:08:01 PM com.springsource.tcserver.serviceability.rmi.JmxSo cketListener init
    INFO: Started up JMX registry on 127.0.0.1:6969 in 86 ms
    Oct 6, 2011 7:08:01 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1193 ms
    Oct 6, 2011 7:08:01 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Oct 6, 2011 7:08:01 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: VMware vFabric tc Runtime 2.6.0.RELEASE/7.0.19.A.RELEASE
    Oct 6, 2011 7:08:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor insight.xml from /home/mkiadmin/springsource/vfabric-tc-server-developer-2.6.0.RELEASE/spring-insight-instance/conf/Catalina/localhost
    Oct 6, 2011 7:08:01 PM com.springsource.insight.collection.tcserver.ltw.T omcatWeavingInsightClassLoader start
    INFO: Context [localhost|insight] will not be woven
    Oct 6, 2011 7:08:02 PM org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    Oct 6, 2011 7:10:59 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
    INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [168,333] milliseconds.
    Oct 6, 2011 7:10:59 PM org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring FrameworkServlet 'Spring MVC Dispatcher Servlet'
    Oct 6, 2011 7:11:01 PM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor SimpleMVC.xml from /home/mkiadmin/springsource/vfabric-tc-server-developer-2.6.0.RELEASE/spring-insight-instance/conf/Catalina/localhost
    Oct 6, 2011 7:11:02 PM org.apache.catalina.startup.SetContextPropertiesRu le begin
    WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SimpleMVC' did not find a matching property.
    Oct 6, 2011 7:11:02 PM com.springsource.insight.collection.tcserver.ltw.T omcatWeavingInsightClassLoader start
    INFO: Context [localhost|SimpleMVC] will not be woven
    Oct 6, 2011 7:11:02 PM org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started
    INFO : org.springframework.web.context.support.XmlWebAppl icationContext - Refreshing Root WebApplicationContext: startup date [Thu Oct 06 19:11:02 JST 2011]; root of context hierarchy
    INFO : org.springframework.beans.factory.xml.XmlBeanDefin itionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/root-context.xml]
    INFO : org.springframework.beans.factory.support.DefaultL istableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@51a745fc: defining beans []; root of factory hierarchy
    INFO : org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 172 ms
    Oct 6, 2011 7:11:02 PM org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring FrameworkServlet 'appServlet'
    INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'appServlet': initialization started
    INFO : org.springframework.web.context.support.XmlWebAppl icationContext - Refreshing WebApplicationContext for namespace 'appServlet-servlet': startup date [Thu Oct 06 19:11:02 JST 2011]; parent: Root WebApplicationContext
    INFO : org.springframework.beans.factory.xml.XmlBeanDefin itionReader - Loading XML bean definitions from ServletContext resource [/WEB-INF/spring/appServlet/servlet-context.xml]
    INFO : org.springframework.context.annotation.ClassPathBe anDefinitionScanner - JSR-330 'javax.inject.Named' annotation found and supported for component scanning
    INFO : org.springframework.beans.factory.annotation.Autow iredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
    INFO : org.springframework.beans.factory.support.DefaultL istableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@7133919a: defining beans [org.springframework.web.servlet.mvc.annotation.Def aultAnnotationHandlerMapping#0,org.springframework .format.support.FormattingConversionServiceFactory Bean#0,org.springframework.web.servlet.mvc.annotat ion.AnnotationMethodHandlerAdapter#0,org.springfra mework.web.servlet.handler.MappedInterceptor#0,org .springframework.web.servlet.mvc.HttpRequestHandle rAdapter,org.springframework.web.servlet.resource. ResourceHttpRequestHandler#0,org.springframework.w eb.servlet.handler.SimpleUrlHandlerMapping#0,org.s pringframework.web.servlet.view.InternalResourceVi ewResolver#0,homeController,org.springframework.co ntext.annotation.internalConfigurationAnnotationPr ocessor,org.springframework.context.annotation.int ernalAutowiredAnnotationProcessor,org.springframew ork.context.annotation.internalRequiredAnnotationP rocessor,org.springframework.context.annotation.in ternalCommonAnnotationProcessor]; parent: org.springframework.beans.factory.support.DefaultL istableBeanFactory@51a745fc
    INFO : org.springframework.web.servlet.mvc.annotation.Def aultAnnotationHandlerMapping - Root mapping to handler 'homeController'
    INFO : org.springframework.web.servlet.handler.SimpleUrlH andlerMapping - Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.Resource HttpRequestHandler#0'
    INFO : org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'appServlet': initialization completed in 452 ms
    Oct 6, 2011 7:11:03 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory ROOT
    Oct 6, 2011 7:11:03 PM com.springsource.insight.collection.tcserver.ltw.T omcatWeavingInsightClassLoader start
    INFO: Context [localhost|ROOT] will not be woven
    Oct 6, 2011 7:11:03 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory manager
    Oct 6, 2011 7:11:03 PM com.springsource.insight.collection.tcserver.ltw.T omcatWeavingInsightClassLoader start
    INFO: Context [localhost|manager] will not be woven
    Oct 6, 2011 7:11:03 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    Oct 6, 2011 7:11:03 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 181766 ms
    -------------------------------------------------------

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,638

    Default

    Hey!

    Glad to hear its now working. No idea why that tc Server instance takes so long for startup...
    It that behavior keeps the same every time you start the server, you could ask the people on the tc server forum for help, I guess. Maybe they know more details about this.

    Cheers,
    -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
  •