Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    "Can't find marker file for webRoot" while using mvn tomcat:run

    Hello,
    I'm developing a maven based springframework-jpa application. When I run

    Code:
    mvn tomcat:run
    the application loads showing a "Can't find marker file for webRoot" error in the log, when I load the host-page a NPE is thrown.


    Code:
    === 2012-12-18 15:19:41,303 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (v8.3_2012-11-20/EVAL Deployment 2012-11-20) - Initialization Complete
    === 2012-12-18 15:19:41,305 [main] ERROR ISCInit - Can't find marker file for webRoot: /home/lrkwz/cargill/cargill-parent/cargill-ordermanagement/src/main/webapp/applicationScaffold/sc for configured/autodetected webRoot - if you moved the 'isomorphic' directory, please set isomorphicPathRootRelative in server.properties to the new location and restart the servlet engine.
    === 2012-12-18 15:19:41,305 [main] INFO  ISCInit - WebRoot auto-detection failed - using container IO
    
    (...)
    
    === 2012-12-18 15:21:22,664 [80-2] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Base
    === 2012-12-18 15:21:22,665 [80-2] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework is already initialized
    === 2012-12-18 15:21:22,707 [80-2] INFO  PoolManager - SmartClient pooling disabled for 'order_DataSource' objects
    Problem loading builtinTypes.xml
    Exception when loading from __USE_CONTAINER__/applicationScaffold/sc/system/schema/builtinTypes.xml:
    java.lang.NullPointerException
    	at com.isomorphic.io.ISCFile.lastModified(ISCFile.java:419)
    	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:131)
    	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:74)
    	at com.isomorphic.store.ProcessedFileCache.getObjectFromFile(ProcessedFileCache.java:138)
    	at com.isomorphic.xml.XML.getXMLDocument(XML.java:255)
    any suggestions?

    #2
    The error message means what it says - that file should be present, and if it isn't, your Maven script isn't doing the equivalent of the installation instructions.

    As a hint, invoking the GWT compiler is what causes those files to be copied in the deployment directory, from inside smartgwtee.jar.

    Comment


      #3
      Originally posted by Isomorphic View Post
      The error message means what it says - that file should be present, and if it isn't, your Maven script isn't doing the equivalent of the installation instructions.

      As a hint, invoking the GWT compiler is what causes those files to be copied in the deployment directory, from inside smartgwtee.jar.
      I execute

      Code:
      > mvn package
      first; this creates the file
      Code:
      > find -name  builtinTypes.xml
      ./target/cargill-ordermanagement-0.1.0.BUILD-SNAPSHOT/applicationScaffold/sc/system/schema/builtinTypes.xml
      but I still get the error message

      Code:
      > mvn tomcat:run
      [INFO] Scanning for projects...
      [INFO]                                                                         
      [INFO] ------------------------------------------------------------------------
      [INFO] Building cargill-ordermanagement 0.1.0.BUILD-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ cargill-ordermanagement >>>
      [INFO] 
      [INFO] --- aspectj-maven-plugin:1.2:compile (default) @ cargill-ordermanagement ---
      [INFO] 
      [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ cargill-ordermanagement ---
      [debug] execute contextualize
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] Copying 7 resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ cargill-ordermanagement ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO] 
      [INFO] <<< tomcat-maven-plugin:1.1:run (default-cli) @ cargill-ordermanagement <<<
      [INFO] 
      [INFO] --- tomcat-maven-plugin:1.1:run (default-cli) @ cargill-ordermanagement ---
      [INFO] Running war on http://localhost:8080/cargill-ordermanagement
      [INFO] Using existing Tomcat server configuration at /home/lrkwz/cargill/cargill-parent/cargill-ordermanagement/target/tomcat
      Dec 20, 2012 9:57:35 AM org.apache.catalina.startup.Embedded start
      INFO: Starting tomcat server
      Dec 20, 2012 9:57:36 AM org.apache.catalina.core.StandardEngine start
      INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/home/lrkwz/.m2/repository/ch/qos/logback/logback-classic/1.0.7/logback-classic-1.0.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/home/lrkwz/.m2/repository/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      Dec 20, 2012 9:57:36 AM org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring root WebApplicationContext
      ISC: Configuring log4j from: file:/home/lrkwz/cargill/cargill-parent/cargill-ordermanagement/target/cargill-ordermanagement-0.1.0.BUILD-SNAPSHOT/WEB-INF/classes/log4j.isc.config.xml
      Dec 20, 2012 9:57:41 AM org.apache.catalina.core.ApplicationContext log
      INFO: Initializing Spring FrameworkServlet 'realanywhere'
      === 2012-12-20 09:57:42,510 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework initialization called from com.isomorphic.base.Init
      === 2012-12-20 09:57:42,513 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework - Initializing
      === 2012-12-20 09:57:42,521 [main] INFO  ConfigLoader - Attempting to load framework.properties from CLASSPATH
      === 2012-12-20 09:57:42,680 [main] INFO  ConfigLoader - Successfully loaded framework.properties from CLASSPATH at location: jar:file:/home/lrkwz/.m2/repository/com/smartgwt/isomorphic_core_rpc/3.1/isomorphic_core_rpc-3.1.jar!/framework.properties
      === 2012-12-20 09:57:42,680 [main] INFO  ConfigLoader - Attempting to load project.properties from CLASSPATH
      === 2012-12-20 09:57:42,681 [main] INFO  ConfigLoader - Unable to locate project.properties in CLASSPATH
      === 2012-12-20 09:57:42,692 [main] INFO  ConfigLoader - Successfully loaded isc_interfaces.properties from CLASSPATH at location: jar:file:/home/lrkwz/.m2/repository/com/smartgwt/isomorphic_core_rpc/3.1/isomorphic_core_rpc-3.1.jar!/isc_interfaces.properties
      === 2012-12-20 09:57:42,692 [main] INFO  ConfigLoader - Attempting to load server.properties from CLASSPATH
      === 2012-12-20 09:57:42,698 [main] INFO  ConfigLoader - Successfully loaded server.properties from CLASSPATH at location: file:/home/lrkwz/cargill/cargill-parent/cargill-ordermanagement/target/cargill-ordermanagement-0.1.0.BUILD-SNAPSHOT/WEB-INF/classes/server.properties
      === 2012-12-20 09:57:42,705 [main] INFO  Logger - Logging system started.
      === 2012-12-20 09:57:42,706 [main] INFO  ISCInit - Isomorphic SmartClient/SmartGWT Framework (v8.3_2012-11-20/EVAL Deployment 2012-11-20) - Initialization Complete
      === 2012-12-20 09:57:42,709 [main] ERROR ISCInit - Can't find marker file for webRoot: /home/lrkwz/cargill/cargill-parent/cargill-ordermanagement/src/main/webapp/applicationScaffold/sc for configured/autodetected webRoot - if you moved the 'isomorphic' directory, please set isomorphicPathRootRelative in server.properties to the new location and restart the servlet engine.
      === 2012-12-20 09:57:42,709 [main] INFO  ISCInit - WebRoot auto-detection failed - using container IO
      Dec 20, 2012 9:57:42 AM org.apache.coyote.http11.Http11Protocol init
      INFO: Initializing Coyote HTTP/1.1 on http-8080
      Dec 20, 2012 9:57:42 AM org.apache.coyote.http11.Http11Protocol start
      INFO: Starting Coyote HTTP/1.1 on http-8080
      what's wrong with this?

      Thank you.

      PS Dont' mind the double log binding :-)

      PPS the app deployed in tomcat works ...
      PPPS the app run by
      Code:
      mvn gwt:run
      works ...
      Last edited by lrkwz; 20 Dec 2012, 08:48.

      Comment


        #4
        Looking at your logs, the real webroot is probably:

        file:/home/lrkwz/cargill/cargill-parent/cargill-ordermanagement/target/cargill-ordermanagement-0.1.0.BUILD-SNAPSHOT
        .. but the webroot Tomcat is telling us doesn't match:

        === 2012-12-20 09:57:42,709 [main] ERROR ISCInit - Can't find marker file for webRoot: /home/lrkwz/cargill/cargill-parent/cargill-ordermanagement/src/main/webapp/applicationScaffold/sc for configured/autodetected webRoot
        At a glance, it looks like something about 'mvn tomcat:run' makes Tomcat mis-report the webroot as the directory where you keep your source code.

        FYI we detect webroot via the standard approach (servletContext.getRealPath("/")). Webroot can also be manually set in server.properties (see docs in that file).

        Comment

        Working...
        X