Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7071495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:41:41+00:00 2026-05-28T05:41:41+00:00

I am trying to test a (Spring-based) WAR I just wrote and am deploying

  • 0

I am trying to test a (Spring-based) WAR I just wrote and am deploying it to TOMCAT_HOME/webapps/ and then starting tomcat. After a minute or so it is obvious the WAR is not running (because it should be consuming messages off an ActiveMQ queue…and its not). I look at the standard output from the console and see:

INFO: Deploying web application archive Optimizer.war
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
23 [Thread-2] INFO org.apache.camel.spring.handler.CamelNamespaceHandler - OSGi environment not detected.
Jan 19, 2012 10:54:20 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jan 19, 2012 10:54:20 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [184] milliseconds.
Jan 19, 2012 10:54:20 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Optimizer] startup failed due to previous errors

Here is my log4j.properties file:

log4j.rootLogger=INFO
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%c] [%t] (%F:%L) %-5p %c %x - %m%n
log4j.logger.org.milyn=INFO
log4j.logger.org.exolab.castor=INFO
log4j.logger.org.castor.core=INFO
log4j.logger.org.apache.commons.digester=INFO
log4j.logger.org.apache=INFO
log4j.logger.org.springframework=INFO
log4j.logger.com.ibatis=INFO
log4j.logger.java.sql.Connection=INFO
log4j.logger.java.sql.PreparedStatement=INFO
log4j.logger.java.sql.ResultSet=INFO
log4j.logger.java.sql.Statement=INFO

And here is my web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns    /j2ee/web-app_2_4.xsd"
    version="2.4">

    <!-- The display name of this web application -->
    <display-name>Optimizer</display-name>

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/optimizer-config.xml</param-value>
    </context-param>

    <listener>
        <listener-class>
            org.springframework.web.context.ContextLoaderListener
        </listener-class>
    </listener>
</web-app>

For one I’d like to know how to make my app/Tomcat more verbose so I can see what’s really going on here (and please note, the Tomcat console and corresponding catalina.log are the only sources I have for debugging… can’t run this from Eclipse workbench because there is no main entry point, just web.xml).

I suspect something is failing in web.xml or perhaps my Spring config file. And I wouldn’t mind debugging my config file if I could just get any sort of indication in the logs/error messages as to what is preventing my app from starting up.

Any ideas/hints/suggestions as to start the process of figuring out whats going wrong are enormously appreciated! Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:41:41+00:00Added an answer on May 28, 2026 at 5:41 am

    You can actually run the entire application from within your IDE if you want, instead of launching Tomcat externally. However, you then run into the issue that you are to working off your war file, but rather from your .class files (compiled in your workspace). Additionally, you are not testing if Tomcat is causing any deployment errors either.

    I don’t remember offhand what the Tomcat error file is, but there are other log files you can check out in the tomcat/log directory as well that will provide with a little additional information.

    To launch Tomcat in eclispe, you need to create a new Java runtime configuration.
    Specify main class as org.apache.catalina.startup.Bootstrap
    Program Arguments: [-config ] start
    VM Args: as you see fit, but perhaps -Xmx512m, etc…
    Working Directory (I usually point to the Tomcat/work directory, if memory serves).

    You will also need to add the Tomcat jars (found in tomcat/lib and tomcat/bin) to the classpath under Bootstrap entries).

    Once you do that, you should be able to launch tomcat as a java app from within Eclipse, and then you can actually debug step by step the exact process.

    NOTE: I’m providing this config information from memory. I don’t remember the exactly path for workspace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

just trying to test for equality in this piece of code, but getting a
Im trying to test my successfully creates a new user after login (using authlogic).
I'm trying to test out Spring Annotations to see how they work with some
I trying spring 3 mvc this package is org.spring.test and code is @Controller @RequestMapping(/welcome)
My problem is I'm trying to make a console based chess game. Starting off
I'm trying to access an external webservice from Spring 3.1 based application. I want
I'm trying to do something in a console app for a test (based on
Easy question this time. I'm trying to test whether or not a string does
I have a string which is like this: this is "a test" I'm trying
I trying to test an AccountController that uses DotNetOpenAuth but I am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.