[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Problem with Log4J & Tomcat

Posted on 2009-07-14
12
Medium Priority
?
606 Views
Last Modified: 2013-12-02
HI,

I have a web application which is using :
1. Apache Tomcat 6
2. Hibernate 3.2 with Annotations.
3. Struts 1.2

When I try to start my tomcat (with my web app deployed), The following error/warning messages is being displayed.
Also tomcat hangs for around 5 minutes then.

I have updated my log4j version to 1.2.15, still the problem is not rectified.

Waiting for your suggestions.
Thanks
Sandeep
C:\Tomcat60\bin>tomcat6
Jul 15, 2009 9:53:45 AM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.16.
Jul 15, 2009 9:53:45 AM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], ra
ndom [true].
Jul 15, 2009 9:53:46 AM org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 15, 2009 9:53:46 AM org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
Jul 15, 2009 9:53:46 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1224 ms
Jul 15, 2009 9:53:46 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 15, 2009 9:53:46 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Jul 15, 2009 9:53:47 AM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive e2cwebr3.war
log4j:WARN No appenders could be found for logger (org.apache.struts.util.Proper
tyMessageResources).
log4j:WARN Please initialize the log4j system properly.

Open in new window

0
Comment
Question by:sandeep1984
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
  • +2
12 Comments
 
LVL 20

Assisted Solution

by:a_b
a_b earned 200 total points
ID: 24856436
0
 
LVL 92

Assisted Solution

by:objects
objects earned 400 total points
ID: 24856496
you're missing the log4j configuration file
and its not the cause of your slow startup
0
 
LVL 6

Expert Comment

by:jwenting
ID: 24856534
It's not an error anyway, it's a warning. Log4J will still work, it just won't do any output redirection and layout you might have wanted.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Author Comment

by:sandeep1984
ID: 24856539
Then, what might be the reason?
Please suggest me the solution.
0
 
LVL 92

Expert Comment

by:objects
ID: 24856591
you haven't provided sufficient details to determine cause
0
 
LVL 2

Author Comment

by:sandeep1984
ID: 24856596

Can you please specify What are the details required??
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
ID: 24857129
You need to configure the log4j config file (which *is* present btw) so that key components (Hibarnate,Struts) are given appenders. This might well reveal the cause of your slow startup. Here's an example of Hibernate log4j config:

http://ideoplex.com/id/386/controlling-hibernate-output-with-log4j
0
 
LVL 92

Expert Comment

by:objects
ID: 24857142
> Can you please specify What are the details required??

check your other tomcat logs (eg. localhost log)
0
 
LVL 2

Author Comment

by:sandeep1984
ID: 24858040
In my struts-config.xml
I have given
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
                               "http://struts.apache.org/dtds/struts-config_1_2.dtd">

Id I remove DOCTYPE, tomcat works fine.
Is DOCTYPE necessary? Why it is used?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 24858095
I would imagine the cause is different. The DOCTYPE should be there. It's there in all mine and i have no problems
0
 
LVL 2

Accepted Solution

by:
sandeep1984 earned 0 total points
ID: 24858197
The problem is solved.
Thanks to all.

I have downloaded struts-config_1_2.dtd and kept it in web-inf.

Changed DOCTYPE to :

<!DOCTYPE struts-config PUBLIC
                  "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
                  "struts-config_1_2.dtd">

Thanks Again.
0
 
LVL 92

Expert Comment

by:objects
ID: 24858374
good work, it would have been timing out trying to resolve that
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question