Announcement Announcement Module
No announcement yet.
Roo & STS 2.1.x Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo & STS 2.1.x

    When running a simple Roo project (just created a blank project) from STS (to tc Server part of distribution) I get the following error:

    23-mei-2009 12:45:44 org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:test' did not find a matching property.
    23-mei-2009 12:45:44 com.springsource.tcserver.serviceability.Serviceab ilityLifecycleListener init
    INFO: Configuring dead lock monitor for tcServer with a check interval of 60 seconds.
    23-mei-2009 12:45:45 com.springsource.tcserver.serviceability.rmi.JmxSo cketListener init
    INFO: Started up JMX registry on
    23-mei-2009 12:45:45 org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    23-mei-2009 12:45:45 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 997 ms
    23-mei-2009 12:45:45 com.springsource.tcserver.serviceability.Serviceab ilityLifecycleListener start
    INFO: The tc Server serviceability listener has started.
    23-mei-2009 12:45:45 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    23-mei-2009 12:45:45 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: SpringSource tc Server/6.0.19.A
    23-mei-2009 12:45:46 org.apache.catalina.core.ApplicationContext log
    INFO: Set web app root system property: 'test.root' = [D:\Spring\tc-server-6.0.19.A\wtpwebapps\test\]
    23-mei-2009 12:45:46 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing log4j from []
    23-mei-2009 12:45:46 org.apache.catalina.core.StandardContext listenerStart
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
    java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [] cannot be resolved to URL because it does not exist
    at itLogging(
    at org.springframework.web.util.Log4jConfigListener.c ontextInitialized(
    at org.apache.catalina.core.StandardContext.listenerS tart(
    at org.apache.catalina.core.StandardContext.start(Sta
    at org.apache.catalina.core.ContainerBase.start(Conta
    at org.apache.catalina.core.StandardHost.start(Standa
    at org.apache.catalina.core.ContainerBase.start(Conta
    at org.apache.catalina.core.StandardEngine.start(Stan
    at org.apache.catalina.core.StandardService.start(Sta
    at org.apache.catalina.core.StandardServer.start(Stan
    at org.apache.catalina.startup.Catalina.start(Catalin
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De
    at java.lang.reflect.Method.invoke(
    at org.apache.catalina.startup.Bootstrap.start(Bootst
    at org.apache.catalina.startup.Bootstrap.main(Bootstr
    23-mei-2009 12:45:46 org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
    log4j:WARN Please initialize the log4j system properly.
    23-mei-2009 12:45:47 org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    23-mei-2009 12:45:47 org.apache.catalina.core.StandardContext start
    SEVERE: Context [/test] startup failed due to previous errors
    23-mei-2009 12:45:47 org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    23-mei-2009 12:45:47 org.apache.catalina.core.ApplicationContext log
    INFO: Shutting down log4j
    23-mei-2009 12:45:47 org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    23-mei-2009 12:45:47 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2378 ms

    There is a empty file in src/main/resources after ceating the project.

  • #2
    I'm having trouble reproducing this problem, but I am trying to do so with the latest trunk build (rev 57 to be precise).

    Here is what I type:

    mkdir ~/foo
    cd ~/foo
    create project
    install jpa -provider HIBERNATE -database H2_IN_MEMORY
    new persistent class jpa -name Food
    add field boolean enabled
    new controller automatic -name
    mvn tomcat:run
    I can then visit http://localhost:8080/foo without any problems. A manual inspection of src/main/webapp/WEB-INF/web.xml also shows no reference to Log4J.

    This might have been corrected in some of our post-A2 work.

    Would you mind sharing which commands you use to create the project, and we will confirm the problem no longer exists in M1 trunk?


    • #3
      Hi Ben,

      When creating a new Roo project from within STS 2.1.0.M1 the Log4jConfigListener is configured in web.xml. This is unexpected as I understand from your reply?

      When I create a project outside STS (using Roo-1.0.0.A2) then the Log4jConfigListener is NOT configured.

      I don't know how the integration between STS and Roo works but I guess it's not looking to ROO_HOME to use templates to create the web.xml.
      So it looks like some Roo version is embedded in STS? Would it be possible to change the Roo version used by STS?



      • #4

        We will fix the project template that currently ships with 2.1.0.M1 and make sure that it works nicely with - in fact requires to run - the 'create project' command. STS 2.1.0.M1 uses an older Roo version. To keep STS and Roo in sync and to allow users to use their external Roo installation the upcoming STS 2.1.0.M2 will allow users to point to an external Roo installation and use this within STS.

        Sorry for the inconvenience. You can easily create a project outside STS and then import as Maven project or by running mvn eclipse:eclipse and importing as normal project.




        • #5
          Thanks for reply Christian,

          No problem, I will just create project outside STS and then import (in fact did that already).
          Good to hear this will be resolved in future versions.