Announcement Announcement Module
Collapse
No announcement yet.
Roo & STS 2.1.x Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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 127.0.0.1:6969
    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 [classpath:log4j.properties]
    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 [log4j.properties] cannot be resolved to URL because it does not exist
    at org.springframework.web.util.Log4jWebConfigurer.in itLogging(Log4jWebConfigurer.java:155)
    at org.springframework.web.util.Log4jConfigListener.c ontextInitialized(Log4jConfigListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3898)
    at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4393)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
    at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalin a.java:587)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:290)
    at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:415)
    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 log4j.properties 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:

    Code:
    mkdir ~/foo
    cd ~/foo
    roo-dev
    create project com.foo
    install jpa -provider HIBERNATE -database H2_IN_MEMORY
    new persistent class jpa -name Food
    add field boolean enabled
    new controller automatic -name com.foo.FoodController
    quit
    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?

    Comment


    • #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?

      Cheers,
      Marcel

      Comment


      • #4
        Marcel,

        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.

        HTH

        Christian

        Comment


        • #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.

          Cheers,
          Marcel

          Comment

          Working...
          X