java - Debugging with Tomcat -



java - Debugging with Tomcat -

i trying test (spring-based) war wrote , deploying tomcat_home/webapps/ , starting tomcat. after min or obvious war not running (because should consuming messages off activemq queue...and not). @ standard output console , see:

info: deploying web application archive optimizer.war log4j:warn no appenders found 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 org.apache.catalina.core.standardcontext startinternal severe: error listenerstart jan 19, 2012 10:54:20 org.apache.catalina.util.sessionidgenerator createsecurerandom info: creation of securerandom instance session id generation using [sha1prng] took [184] milliseconds. jan 19, 2012 10:54:20 org.apache.catalina.core.standardcontext startinternal severe: context [/optimizer] startup failed due previous errors

here 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 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"> <!-- display name of 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 1 i'd know how create app/tomcat more verbose can see what's going on here (and please note, tomcat console , corresponding catalina.log sources have debugging... can't run eclipse workbench because there no main entry point, web.xml).

i suspect failing in web.xml or perhaps spring config file. , wouldn't mind debugging config file if sort of indication in logs/error messages preventing app starting up.

any ideas/hints/suggestions start process of figuring out whats going wrong enormously appreciated! in advance!

you can run entire application within ide if want, instead of launching tomcat externally. however, run issue working off war file, rather .class files (compiled in workspace). additionally, not testing if tomcat causing deployment errors either.

i don't remember offhand tomcat error file is, there other log files can check out in tomcat/log directory provide little additional information.

to launch tomcat in eclispe, need create new java runtime configuration. specify main class org.apache.catalina.startup.bootstrap programme arguments: [-config ] start vm args: see fit, perhaps -xmx512m, etc... working directory (i point tomcat/work directory, if memory serves).

you need add together tomcat jars (found in tomcat/lib , tomcat/bin) classpath under bootstrap entries).

once that, should able launch tomcat java app within eclipse, , can debug step step exact process.

note: i'm providing config info memory. don't remember path workspace.

java spring debugging tomcat

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -