Announcement Announcement Module
Collapse
No announcement yet.
Spring Roo on STS 3.1 not giving Run as Run on Server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Roo on STS 3.1 not giving Run as Run on Server

    I just downloaded and installed STS 3.1 on win 7 64bit Java 1.7.0_05

    I used Roo Shell...

    Code:
      / __ \/ __ \/ __ \ 
      / /_/ / / / / / / / 
     / _, _/ /_/ / /_/ /  
    /_/ |_|\____/\____/    1.2.2.RELEASE [rev 7d75659]
    
    Java 1.7
    Welcome to Spring Roo. For assistance press CTRL+SPACE or type "hint" then hit ENTER.
    roo> 
    required --database: The database to support; no default value
    
    required --provider: The persistence provider to support; no default value
    roo> jpa setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE 
    Created SPRING_CONFIG_ROOT\database.properties
    Updated SPRING_CONFIG_ROOT\applicationContext.xml
    Created SRC_MAIN_RESOURCES\META-INF\persistence.xml
    Updated ROOT\pom.xml [added dependencies org.hsqldb:hsqldb:1.8.0.10, org.hibernate:hibernate-core:3.6.9.Final, org.hibernate:hibernate-entitymanager:3.6.9.Final, org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final, commons-collections:commons-collections:3.2.1, org.hibernate:hibernate-validator:4.2.0.Final, javax.validation:validation-api:1.0.0.GA, cglib:cglib-nodep:2.2.2, javax.transaction:jta:1.1, org.springframework:spring-jdbc:${spring.version}, org.springframework:spring-orm:${spring.version}, commons-pool:commons-pool:1.5.6, commons-dbcp:commons-dbcp:1.3]
    roo> entity jpa --class ~.model.Share
    Created SRC_MAIN_JAVA\com\smart\eload\daas\model
    Created SRC_MAIN_JAVA\com\smart\eload\daas\model\Share.java
    Created SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_Configurable.aj
    Created SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_ToString.aj
    Created SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_Jpa_ActiveRecord.aj
    Created SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_Jpa_Entity.aj
    ~.model.Share roo> field string sessionID
    Updated SRC_MAIN_JAVA\com\smart\eload\daas\model\Share.java
    Created SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_JavaBean.aj
    ~.model.Share roo> field string shareID
    Updated SRC_MAIN_JAVA\com\smart\eload\daas\model\Share.java
    Updated SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_JavaBean.aj
    ~.model.Share roo> field string provider
    Updated SRC_MAIN_JAVA\com\smart\eload\daas\model\Share.java
    Updated SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_JavaBean.aj
    ~.model.Share roo> field string valueXML
    Updated SRC_MAIN_JAVA\com\smart\eload\daas\model\Share.java
    Updated SRC_MAIN_JAVA\com\smart\eload\daas\model\Share_Roo_JavaBean.aj
    ~.model.Share roo> web mvc setup
    Created ROOT\src\main\webapp\WEB-INF\spring
    Created ROOT\src\main\webapp\WEB-INF\spring\webmvc-config.xml
    Created ROOT\src\main\webapp\WEB-INF\web.xml
    Updated ROOT\src\main\webapp\WEB-INF\spring\webmvc-config.xml
    Created ROOT\src\main\webapp\images
    Created ROOT\src\main\webapp\images\add.png
    Created ROOT\src\main\webapp\images\banner-graphic.png
    Created ROOT\src\main\webapp\images\create.png
    Created ROOT\src\main\webapp\images\delete.png
    Created ROOT\src\main\webapp\images\favicon.ico
    Created ROOT\src\main\webapp\images\list.png
    Created ROOT\src\main\webapp\images\resultset_first.png
    Created ROOT\src\main\webapp\images\resultset_last.png
    Created ROOT\src\main\webapp\images\resultset_next.png
    Created ROOT\src\main\webapp\images\resultset_previous.png
    Created ROOT\src\main\webapp\images\show.png
    Created ROOT\src\main\webapp\images\springsource-logo.png
    Created ROOT\src\main\webapp\images\update.png
    Created ROOT\src\main\webapp\styles
    Created ROOT\src\main\webapp\styles\alt.css
    Created ROOT\src\main\webapp\styles\standard.css
    Created ROOT\src\main\webapp\WEB-INF\classes
    Created ROOT\src\main\webapp\WEB-INF\classes\alt.properties
    Created ROOT\src\main\webapp\WEB-INF\classes\standard.properties
    Created ROOT\src\main\webapp\WEB-INF\layouts
    Created ROOT\src\main\webapp\WEB-INF\layouts\default.jspx
    Created ROOT\src\main\webapp\WEB-INF\layouts\layouts.xml
    Created ROOT\src\main\webapp\WEB-INF\views
    Created ROOT\src\main\webapp\WEB-INF\views\header.jspx
    Created ROOT\src\main\webapp\WEB-INF\views\menu.jspx
    Created ROOT\src\main\webapp\WEB-INF\views\footer.jspx
    Created ROOT\src\main\webapp\WEB-INF\views\views.xml
    Created ROOT\src\main\webapp\WEB-INF\views\dataAccessFailure.jspx
    Created ROOT\src\main\webapp\WEB-INF\views\index-template.jspx
    Created ROOT\src\main\webapp\WEB-INF\views\index.jspx
    Created ROOT\src\main\webapp\WEB-INF\views\resourceNotFound.jspx
    Created ROOT\src\main\webapp\WEB-INF\views\uncaughtException.jspx
    Created ROOT\src\main\webapp\WEB-INF\tags\form
    Created ROOT\src\main\webapp\WEB-INF\tags\form\create.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\dependency.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\find.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\list.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\show.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\update.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\checkbox.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\column.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\datetime.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\display.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\editor.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\input.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\reference.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\select.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\simple.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\table.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\form\fields\textarea.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\menu
    Created ROOT\src\main\webapp\WEB-INF\tags\menu\category.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\menu\item.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\menu\menu.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\util
    Created ROOT\src\main\webapp\WEB-INF\tags\util\language.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\util\load-scripts.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\util\pagination.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\util\panel.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\util\placeholder.tagx
    Created ROOT\src\main\webapp\WEB-INF\tags\util\theme.tagx
    Created ROOT\src\main\webapp\WEB-INF\i18n
    Created ROOT\src\main\webapp\WEB-INF\i18n\messages.properties
    Created ROOT\src\main\webapp\images\en.png
    Updated ROOT\src\main\webapp\WEB-INF\i18n\application.properties
    Updated ROOT\src\main\webapp\WEB-INF\web.xml
    Updated ROOT\pom.xml [added dependencies org.springframework:spring-webmvc:${spring.version}, org.springframework.webflow:spring-js-resources:2.2.1.RELEASE, commons-digester:commons-digester:2.1, commons-fileupload:commons-fileupload:1.2.2, javax.servlet.jsp.jstl:jstl-api:1.2, org.glassfish.web:jstl-impl:1.2, javax.el:el-api:1.0, joda-time:joda-time:1.6, javax.servlet.jsp:jsp-api:2.1, commons-codec:commons-codec:1.5; updated project type to war; added dependency org.apache.tiles:tiles-jsp:2.2.2]
    Updated SRC_MAIN_WEBAPP\WEB-INF\views\footer.jspx
    ~.model.Share roo> web mvc all --package ~.web
    Created SRC_MAIN_JAVA\com\smart\eload\daas\web
    Created SRC_MAIN_JAVA\com\smart\eload\daas\web\ShareController.java
    Updated SRC_MAIN_WEBAPP\WEB-INF\spring\webmvc-config.xml
    Created SRC_MAIN_JAVA\com\smart\eload\daas\web\ApplicationConversionServiceFactoryBean.java
    Created SRC_MAIN_WEBAPP\WEB-INF\views\shares
    Created SRC_MAIN_WEBAPP\WEB-INF\views\shares\views.xml
    Updated SRC_MAIN_WEBAPP\WEB-INF\views\shares\views.xml
    Updated SRC_MAIN_WEBAPP\WEB-INF\i18n\application.properties
    Created SRC_MAIN_JAVA\com\smart\eload\daas\web\ApplicationConversionServiceFactoryBean_Roo_ConversionService.aj
    Created SRC_MAIN_JAVA\com\smart\eload\daas\web\ShareController_Roo_Controller.aj
    Created SRC_MAIN_WEBAPP\WEB-INF\views\shares\list.jspx
    Created SRC_MAIN_WEBAPP\WEB-INF\views\shares\show.jspx
    Created SRC_MAIN_WEBAPP\WEB-INF\views\shares\create.jspx
    Updated SRC_MAIN_WEBAPP\WEB-INF\views\menu.jspx
    Created SRC_MAIN_WEBAPP\WEB-INF\views\shares\update.jspx
    ~.web roo>
    All looks fine to me...

    The problem...right click on the project and Run As... does NOT show Run on Server.

    Right click on the running tcServer and Add Remove says there are no resources that can be added or removed.

  • #2
    I tried Run As Maven Install...

    I tried Run As Maven Install...

    Code:
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
    [INFO] Scanning for projects...
    [INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building DAAS 0.1.0.BUILD-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- aspectj-maven-plugin:1.2:compile (default) @ DAAS ---
    [INFO] 
    [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ DAAS ---
    [debug] execute contextualize
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 4 resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.4:compile (default-compile) @ DAAS ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO] 
    [INFO] --- aspectj-maven-plugin:1.2:test-compile (default) @ DAAS ---
    [INFO] 
    [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ DAAS ---
    [debug] execute contextualize
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] skip non existing resourceDirectory C:\Users\Ollie\Documents\workspace-sts-3.1.0.RELEASE\DAAS\src\test\resources
    [INFO] 
    [INFO] --- maven-compiler-plugin:2.4:testCompile (default-testCompile) @ DAAS ---
    [INFO] No sources to compile
    [INFO] 
    [INFO] --- maven-surefire-plugin:2.12:test (default-test) @ DAAS ---
    [INFO] Surefire report directory: C:\Users\Ollie\Documents\workspace-sts-3.1.0.RELEASE\DAAS\target\surefire-reports
    
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    
    Results :
    
    Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
    
    [INFO] 
    [INFO] --- maven-war-plugin:2.2:war (default-war) @ DAAS ---
    [INFO] Packaging webapp
    [INFO] Assembling webapp [DAAS] in [C:\Users\Ollie\Documents\workspace-sts-3.1.0.RELEASE\DAAS\target\DAAS-0.1.0.BUILD-SNAPSHOT]
    [INFO] Processing war project
    [INFO] Copying webapp resources [C:\Users\Ollie\Documents\workspace-sts-3.1.0.RELEASE\DAAS\src\main\webapp]
    [INFO] Webapp assembled in [1141 msecs]
    [INFO] Building war: C:\Users\Ollie\Documents\workspace-sts-3.1.0.RELEASE\DAAS\target\DAAS-0.1.0.BUILD-SNAPSHOT.war
    [INFO] WEB-INF\web.xml already added, skipping
    [INFO] 
    [INFO] --- maven-install-plugin:2.3.1:install (default-install) @ DAAS ---
    [INFO] Installing C:\Users\Ollie\Documents\workspace-sts-3.1.0.RELEASE\DAAS\target\DAAS-0.1.0.BUILD-SNAPSHOT.war to C:\Users\Ollie\.m2\repository\com\smart\eload\daas\DAAS\0.1.0.BUILD-SNAPSHOT\DAAS-0.1.0.BUILD-SNAPSHOT.war
    [INFO] Installing C:\Users\Ollie\Documents\workspace-sts-3.1.0.RELEASE\DAAS\pom.xml to C:\Users\Ollie\.m2\repository\com\smart\eload\daas\DAAS\0.1.0.BUILD-SNAPSHOT\DAAS-0.1.0.BUILD-SNAPSHOT.pom
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 13.824s
    [INFO] Finished at: Sat Nov 17 07:42:41 CST 2012
    [INFO] Final Memory: 11M/105M
    [INFO] ------------------------------------------------------------------------
    No change still no "Run on Server"

    Comment


    • #3
      Manual Deploy works

      After the maven install, I took the DAAS-0.1.0.BUILD-SNAPSHOT.war and opened the manager application on tcServer and deployed the war file manually.

      That works!

      Attachment

      How do I fix STS 3.1 to recognize this as a web application?
      Attached Files

      Comment


      • #4
        I added another Tomcat 6 server to STS 3.1 and tested a manual deploy there too and still works...but no Run as run on server.

        Comment


        • #5
          Facets not getting updated from Roo Shell

          I wnt to Project Properties and looked at Project Facets...none were checked.

          So I checked Java and Dynamic Web Module and JavaScrpt facets.

          I had to do a Maven Update project to sync it up, but now I get Run as run on server and it works. There are errors...
          Code:
          SEVERE: Servlet.service() for servlet jsp threw exception
          java.lang.IllegalStateException: getOutputStream() has already been called for this response
          	at org.apache.catalina.connector.Response.getWriter(Response.java:639)
          	at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:214)
          The application runs fine, but that's another matter I think...


          Attachment
          Attached Files

          Comment

          Working...
          X