Results 1 to 10 of 10

Thread: STS installed webapp will not run, looks to be setp ok

Hybrid View

  1. #1

    Default STS installed webapp will not run, looks to be setp ok

    I am using STS with Maven to build some webapp's.
    I am just starting here, so I am onto my second webapp. Whilst the first webapp is all fine, I cannot get my second one to "behave".
    Initially, when I used Run As -> Run On Server and selected the Spring TC container which came with STS, it would deploy fine. However, the WEB-INF/lib folder would always be missing from the deployed folder (in my case <spring-tc-folder>/wtpwebapps/<webappname>) so I got some errors. My first webapp did not have this problem, but anyway...
    I have now managed to get the WEB-INF lib folder to deploy, but the webapp will not start, and I cannot find any reason why.
    Under the wtpwebapps/webappname folder I can see all of the correct files/folders. In conf/server.xml I can see a Context element added to the <Host> element which points to the wtpwebapps/webappname folder. When I start tc (from STS -> start), I get no errors showing in the console, but the webapp is not running. I still have no problem with the first webapp.

    Looking for pointers where to begin diagnosing this. There is no "system" style log file being created in the sts/logs folder, so all I have is the STS console output and that does not contain anything useful.

    Finally! If I take the war file built by maven and add it to the webapps folder (after removing the wtpwebapps stuff), then it runs fine, so it's just something I am missing in the STS "run as" facility.
    And, I have compared every setting I can think of between the 2 webapps / STS .settings files and cannot work out why one works and one does not

  2. #2
    Join Date
    Apr 2010
    Posts
    4

    Default

    I am having the same problem. Only solution i've found is to uninstall and reinstall sts and tcserver.

    It appears the tool suite isn't mature enough to work reliably, it may be best to switch to ant scripts to install your webapps.

  3. #3

    Default

    I worked out that my specific problem was that the WEB-INF/lib folder was not being copied to the wtpwebapps folder, everything else was fine.
    I am using the maven plugin and a maven project builder, so the webapp depends on 2 other eclipse projects that build out as jars, and these jars WERE copied across, the maven-dependent jars were not copied.

    This did happen again, but some kind of magic maven-clean, maven-install, maven-package, eclipse-clean-projects, eclipse-refresh madness eventually seems to get it back in sync.

  4. #4

    Default

    How did you get WEB-INF/lib to deploy? I've got an STS web app, and when I add it to a tcServer instance, nothing is published to WEB-INF/lib. This is STS 2.3.2

  5. #5

    Default

    Ah, I found my problem. The pom didn't have the compiler plugin, and therefore source level was set to 1.3 by default. I put in the usual compiler plugin with 1.6 and then the maven builder started working!

  6. #6
    Join Date
    Oct 2010
    Posts
    1

    Default

    Quote Originally Posted by dynamite149 View Post
    I am having the same problem. Only solution i've found is to uninstall and reinstall sts and tcserver.

    It appears the tool suite isn't mature enough to work reliably, it may be best to switch to ant scripts to install your webapps.
    Unfortunately the tool suite is indeed a POS right now.. Try with any server you want.. it'll come up with some f'ed up response on why its not able to do its job.

  7. #7
    Join Date
    Aug 2004
    Location
    Duesseldorf, Germany
    Posts
    1,210

    Default

    All,

    whenever you find your WEB-INF/lib directory to be empty and you are using Maven from STS, please update the project configuration as follow: right-click the project -> Maven -> Update Project Configuration.

    This usually fixes the invalid project configuration and will enable correct deployment.

    Please let me know if that doesn't solve the issue.

    Christian
    Christian Dupuis
    SpringSource, a division of VMware
    Lead, SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/cdupuis

  8. #8
    Join Date
    May 2007
    Location
    Boston Area, MA, USA
    Posts
    10

    Default

    How about when I'm missing *some* of the files I expect to see in my WEB-INF/lib? If I package my application from the Maven command line everything is great. Somehow my openjpa JAR and a couple others are being excluded from the automatic build w/in STS, however.

    I'm testing with Virgo Web Server, and would like to be able to deploy my application directly from STS into my embedded Virgo Web Server.

    It's a Spring, OpenJPA, and Flex/BlazeDS configured web application. STS is version 2.5.1 and Maven is 3.0.

    Thanks!

  9. #9
    Join Date
    May 2007
    Location
    Boston Area, MA, USA
    Posts
    10

    Default

    Just a quick follow-up. After resolving an internal error when attempting to 'Update Project Configuration' I was able to see the missing JAR files in WEB-INF/lib.

    Only this time they had an additional .jar extension attached to them (e.g. openjpa-2.0.1.jar.jar).

    Ideas?

    Thanks.

  10. #10
    Join Date
    Oct 2010
    Posts
    6

    Default

    Quote Originally Posted by jason.m.hanna View Post
    How about when I'm missing *some* of the files I expect to see in my WEB-INF/lib? If I package my application from the Maven command line everything is great. Somehow my openjpa JAR and a couple others are being excluded from the automatic build w/in STS, however.

    I'm testing with Virgo Web Server, and would like to be able to deploy my application directly from STS into my embedded Virgo Web Server.

    It's a Spring, OpenJPA, and Flex/BlazeDS configured web application. STS is version 2.5.1 and Maven is 3.0.

    Thanks!
    Thanks for sharing!













    ___________________
    Công ty du hoc Tân Đại Dương là trung tâm tu van du hoc hàng đầu Vietnam .Chúng tôi cung cấp các dịch vụ du hoc singapore,thông tin hoc bong du hoc
    Công ty du hoc Tân Đại Dương là trung tâm tu van du hoc hàng đầu Vietnam .Chúng tôi cung cấp các dịch vụ du hoc singapore,thông tin hoc bong du hoc and noi that fami or noi that 190

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •