Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Tomcat 5.5 from ebuild -- anyone? [SOLVED]

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
eealex
n00b
n00b
User avatar
Posts: 65
Joined: Fri Oct 29, 2004 4:05 am
Location: Japan

Tomcat 5.5 from ebuild -- anyone? [SOLVED]

  • Quote

Post by eealex » Thu Jul 06, 2006 7:13 am

Hi all,

my blog (which is based on http://pebble.sourceforge.net) now is not running well after I upgraded to Tomcat 5.5 (following the Tomcat upgrade guide http://www.gentoo.org/proj/en/java/tomcat-guide.xml). Below are some details I can tell:

What's happened:
Yesterday after emerge --sync I found that Tomcat 5.0.x became masked, and ~x86 version of Tomcat 5.5 is out. OK at the same time I also upgrade to use sun-jdk 1.5 as the Pebble 2.0 I mentioned requires that. After that the Tomcat is up, application is running but I cannot save my blog... After that I tried to downgrade to the Tomcat 5.0.28 but the same error occurs.

Problems I observed:
  • No log! I can't find my log anywhere in /var/log/tomcat-5.5
  • /etc/init.d/tomcat-5.5 restart always fail. But stop... wait (2 seconds), start is OK. This is minor problem anyway.
What I have done:
  • Change the /etc/conf.d/tomcat-5.5 by:
    • appended this to the CLASSPATH :/var/lib/tomcat-5.5/webapps/pebble/WEB-INF/lib/log4j.jar:acegi-security-1.0.0-RC2.jar
    • JAVA_HOME=/opt/sun-jdk-1.5.0.07 (surely I emerged the sun-jdk)
  • Deployed the web application pebble.war using Tomcat manager
At least I want some log so that I can give more details about the problem actually occured... anyone gets the idea? Thanks in advance.
Last edited by eealex on Fri Jul 07, 2006 5:03 am, edited 1 time in total.
Top
dashnu
l33t
l33t
Posts: 703
Joined: Wed Jul 21, 2004 10:49 pm
Location: Casco Maine
Contact:
Contact dashnu
Website

  • Quote

Post by dashnu » Fri Jul 07, 2006 4:09 am

check out http://tomcat.apache.org/tomcat-5.5-doc/logging.html

tomcat uses juli now by default.

FWIW I have the restart problem also..
write quit bang
Top
eealex
n00b
n00b
User avatar
Posts: 65
Joined: Fri Oct 29, 2004 4:05 am
Location: Japan

  • Quote

Post by eealex » Fri Jul 07, 2006 5:02 am

Hi dashnu,

Thank you for your reply. Anyway one stupid mistake I have made was that I should not hardcode the log4j.jar path in CLASSPATH within /etc/conf.d/tomcat-5.5. I started over again and make the stuff work.

Apart from the mistake I made and the restart issue the upgrade is fairly smooth now. Anyway just assumed this topic as solved... thanks again
Top
rem!x
n00b
n00b
Posts: 48
Joined: Mon Jul 12, 2004 7:15 am

Re: Tomcat 5.5 from ebuild -- anyone? [SOLVED]

  • Quote

Post by rem!x » Fri Jul 07, 2006 11:54 am

eealex wrote:Hi all,

my blog (which is based on http://pebble.sourceforge.net) now is not running well after I upgraded to Tomcat 5.5 (following the Tomcat upgrade guide http://www.gentoo.org/proj/en/java/tomcat-guide.xml). Below are some details I can tell:

What's happened:
Yesterday after emerge --sync I found that Tomcat 5.0.x became masked, and ~x86 version of Tomcat 5.5 is out. OK at the same time I also upgrade to use sun-jdk 1.5 as the Pebble 2.0 I mentioned requires that. After that the Tomcat is up, application is running but I cannot save my blog... After that I tried to downgrade to the Tomcat 5.0.28 but the same error occurs.

Problems I observed:
  • No log! I can't find my log anywhere in /var/log/tomcat-5.5
  • /etc/init.d/tomcat-5.5 restart always fail. But stop... wait (2 seconds), start is OK. This is minor problem anyway.
What I have done:
  • Change the /etc/conf.d/tomcat-5.5 by:
    • appended this to the CLASSPATH :/var/lib/tomcat-5.5/webapps/pebble/WEB-INF/lib/log4j.jar:acegi-security-1.0.0-RC2.jar
    • JAVA_HOME=/opt/sun-jdk-1.5.0.07 (surely I emerged the sun-jdk)
  • Deployed the web application pebble.war using Tomcat manager
At least I want some log so that I can give more details about the problem actually occured... anyone gets the idea? Thanks in advance.

hi!
do you have logs now?
i have a similar log problem with log4j and my webapp after upgrading tomcat.
its almost resolved thanks to #gentoo-java on freenode.
Top
eealex
n00b
n00b
User avatar
Posts: 65
Joined: Fri Oct 29, 2004 4:05 am
Location: Japan

  • Quote

Post by eealex » Fri Jul 07, 2006 12:45 pm

Hi,

Yes I got the log now. I deleted the log4j.jar in the webapps I am deploying, and the /etc/conf.d/tomcat-5.5 is basically the default one (except changing the JAVA_HOME to sun-jdk-1.5.0.07)
Top
dashnu
l33t
l33t
Posts: 703
Joined: Wed Jul 21, 2004 10:49 pm
Location: Casco Maine
Contact:
Contact dashnu
Website

  • Quote

Post by dashnu » Fri Jul 07, 2006 1:08 pm

You can still use log4j if you like, keeping it in webapps level - WEBINF directory of your webapp is ok. However an issues was found in the init script causing problems with log4j.

<snip from mail-list>
Change

CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:$(java-config -p commons-logging)"

to

CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/commons-logging-api.jar"
</snip>

Change that and you webapp should run as normal.
write quit bang
Top
eealex
n00b
n00b
User avatar
Posts: 65
Joined: Fri Oct 29, 2004 4:05 am
Location: Japan

  • Quote

Post by eealex » Fri Jul 07, 2006 1:50 pm

dashnu wrote: <snip from mail-list>
Change

CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:$(java-config -p commons-logging)"

to

CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/commons-logging-api.jar"
</snip>

Change that and you webapp should run as normal.
Do you mean the /etc/conf.d/tomcat-5.5 config file? If so the default CLASSPATH is pointing to ${CATALINA_LIBDIR}, and the ${CATALINA_LIBDIR} just refer to /usr/share/tomcat-5.5/server/lib

well all the jars inside the CATALINA_LIBDIR are just sim-link to somewhere else.. maybe a simlink pointing to common-logging-api should also be added? I am no expert in this classpath configuration anyway.
Top
dashnu
l33t
l33t
Posts: 703
Joined: Wed Jul 21, 2004 10:49 pm
Location: Casco Maine
Contact:
Contact dashnu
Website

  • Quote

Post by dashnu » Fri Jul 07, 2006 1:55 pm

no I mean /etc/init.d/tomcat-5.5 .. I would leave the system level jars alone.
write quit bang
Top
eealex
n00b
n00b
User avatar
Posts: 65
Joined: Fri Oct 29, 2004 4:05 am
Location: Japan

  • Quote

Post by eealex » Fri Jul 07, 2006 5:11 pm

Thank you. In my installation if I run the "problematic" java-config -p commons-logging:

Code: Select all

$ java-config -p commons-logging
/usr/share/commons-logging/lib/commons-logging.jar:/usr/share/commons-logging/lib/commons-logging-api.jar
And thus this refer to common-logging-api.jar outside Tomcat directory.... seems to me that the init script wants to make use library within /usr/share instead of inside Tomcat. Looks reasonable in some sense but just wonder why this creates problem....
If this is really a problem should a bug be filed?
Top
dashnu
l33t
l33t
Posts: 703
Joined: Wed Jul 21, 2004 10:49 pm
Location: Casco Maine
Contact:
Contact dashnu
Website

  • Quote

Post by dashnu » Fri Jul 07, 2006 6:29 pm

I worked with wltjr the guy who maintains the tomcat ebuild last night on IRC. He is going to fix it soon.
write quit bang
Top
penumbra2000
n00b
n00b
Posts: 4
Joined: Wed Aug 09, 2006 2:32 am

  • Quote

Post by penumbra2000 » Thu Aug 17, 2006 12:14 am

Hm. Still not fixed. Shall I forward a patch?
Always happy to help and/or be helped.
Top
kernelcowboy
Guru
Guru
User avatar
Posts: 391
Joined: Sat Feb 14, 2004 8:34 pm
Location: New Plymouth, New Zealand

  • Quote

Post by kernelcowboy » Wed Sep 20, 2006 10:52 pm

dashnu wrote:tomcat uses juli now by default.
Do we have a choice?

I had to remove the /etc/tomcat-5.5/logging.properties file, after adding all the
log4j stuff in common/lib and classes, in order to get these to go away.

Code: Select all

-rw-r--r-- 1 tomcat tomcat      0 Sep 21 10:35 manager.2006-09-21.log
-rw-r--r-- 1 tomcat tomcat      0 Sep 21 10:35 localhost.2006-09-21.log
-rw-r--r-- 1 tomcat tomcat      0 Sep 21 10:35 host-manager.2006-09-21.log
-rw-r--r-- 1 tomcat tomcat      0 Sep 21 10:35 catalina.2006-09-21.log
-rw-r--r-- 1 tomcat tomcat      0 Sep 21 10:35 admin.2006-09-21.log
I figured, with commons-logging, we would get log4j if it's in the classpath, or
util logging otherwise (since we are in at least a 1.4 VM)

I don't want any util logging, I'm used to log4j, and get confused quickly if there
are too many logs.
Top
wltjr
Retired Dev
Retired Dev
Posts: 73
Joined: Tue Jan 31, 2006 9:42 pm

  • Quote

Post by wltjr » Fri Sep 22, 2006 8:08 pm

There have been changes in Tomcat's logging. Covered in the link provided to Tomcat's site on the logging changes. Also mentoined in the Tomcat Guide.

log4j can be used snippted from the guide
"log4j.ar MUST be in the same directory as commons-logging.jar. The lowest classloader level they should be put in is common/lib. The recommended is shared/lib, or in a specific webapp's WEB-INF/lib directory."

Beyond that just refer to the log4j section of Tomcat's doc on logging in 5.5.

The logging changes were made to the init script some time back. Where both commons-logging-api.jar (server part) was loaded on the same level as commons-logging.jar (client) which is very bad, and caused all sorts of problems. Also recently there were problems with the Catalina's temp dir not being set at runtime. Fixed recently although I doubt it pertains to any of this.
Top
Post Reply

13 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic