You are not logged in.

#1 2009-11-11 18:09:00

versus
Member
Registered: 2009-11-11
Posts: 7

[solved]tomcat 5.5.27 and the infamous jsvc error: Cannot locate Java

Hey!
Title says nearly all. Just installed tomcat via pacman. Java is installed in /opt/java/.
Followed the Wiki guide (http://wiki.archlinux.org/index.php/Tomcat_and_Apache)
Tried alot of different paths:

/etc/rc.d/tomcat:

# Arguments for catalina
CATALINA_OPTS=
CATALINA_USER=chris
JAVA_HOME=/opt/java/
J2SDKDIR=/opt/java/
J2REDIR=/opt/java/jre/

When I sudo /etc/rc.d/tomcat start, it says: "4418 jsvc error: Cannot locate Java Home"

I reinstalled Java, restarted etc. The Wiki Article didn't look that complicated. wink
Any ideas are much appreciated!
Thanks, Chris

Last edited by versus (2009-11-11 19:17:07)

Offline

#2 2009-11-11 19:06:13

ajonat
Member
Registered: 2009-07-17
Posts: 38

Re: [solved]tomcat 5.5.27 and the infamous jsvc error: Cannot locate Java

have you tried loging out and loging in?
jdk installs /etc/profile.d/jdk.sh wich exports JAVA_HOME

Offline

#3 2009-11-11 19:06:22

kermana
Member
Registered: 2009-04-13
Posts: 60

Re: [solved]tomcat 5.5.27 and the infamous jsvc error: Cannot locate Java

Just tried to install from ground and it worked. Didn't follow the wiki. What I did is just install it with pacman.

The only change I did to /etc/rc.d/tomcat was to the -home arguement. Changed it to

"-home /opt/java \"

and thats it! /etc/rc.d/tomcat start should work fine then.

Last edited by kermana (2009-11-11 19:08:13)

Offline

#4 2009-11-11 19:19:24

versus
Member
Registered: 2009-11-11
Posts: 7

Re: [solved]tomcat 5.5.27 and the infamous jsvc error: Cannot locate Java

Args, I am such a fool.
I kept editing /etc/conf.d/tomcat and didn't change the path in /etc/rc.d/tomcat.
Now it works fer sure roll

Thank you both! smile

Offline

#5 2009-11-11 19:21:15

kermana
Member
Registered: 2009-04-13
Posts: 60

Re: [solved]tomcat 5.5.27 and the infamous jsvc error: Cannot locate Java

Also there are a couple things I just don't get in the wiki.  We tell tomcat where to find java by modifying  /etc/rc.d/tomcat but wiki says you also have to add it to /opt/tomcat/bin/catalina.sh which seems very very very unnecessary. I just tried this too, just add tomcat to daemons list and it should start fine on boot. I have never used apache/tomcat together and I am no expert but it seems like the wiki needs some serious editing. I might try to go over the wiki in the weekend.

Last edited by kermana (2009-11-12 02:13:06)

Offline

#6 2012-03-22 11:38:43

Aegidius
Member
From: Italy
Registered: 2011-06-29
Posts: 288
Website

Re: [solved]tomcat 5.5.27 and the infamous jsvc error: Cannot locate Java

kermana wrote:

Just tried to install from ground and it worked. Didn't follow the wiki. What I did is just install it with pacman.

The only change I did to /etc/rc.d/tomcat was to the -home arguement. Changed it to

"-home /opt/java \"

and thats it! /etc/rc.d/tomcat start should work fine then.

Hi all smile

I replaced the line

-java-home ${TOMCAT_JAVA_HOME} \

with this one

"-home /opt/java \"

in my /etc/rc.d/tomcat7 file but it does not work sad

Where I'm wrong???

Offline

Board footer

Powered by FluxBB