LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-23-2012, 12:50 AM   #1
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
CATALINA_HOME environment variable has not been defined.


Scroll down to see the above error message:
Code:
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:266: package javax.mail does not exist
    [javac]         javax.mail.Authenticator auth = null;
    [javac]                   ^
    [javac]             InternetAddress ccAddr[]  = _convertRecipients(cc);
    [javac]             ^
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:287: cannot find symbol
    [javac] symbol  : class InternetAddress
    [javac] location: class org.opengts.util.SendMailArgs
    [javac]             InternetAddress bccAddr[] = _convertRecipients(bcc);
    [javac]             ^
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:296: package Message does not exist
    [javac]                 msg.setRecipients(Message.RecipientType.TO , toAddr);
    [javac]                                          ^
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:297: package Message does not exist
    [javac]                 msg.setRecipients(Message.RecipientType.CC , ccAddr);
    [javac]                                          ^
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:298: package Message does not exist
    [javac]                 msg.setRecipients(Message.RecipientType.BCC, bccAddr);
    [javac]                                          ^
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:302: cannot find symbol
    [javac] symbol  : class Multipart
    [javac] location: class org.opengts.util.SendMailArgs
    [javac]                     Multipart multipart = new MimeMultipart();
    [javac]                     ^
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:302: cannot find symbol
    [javac] symbol  : class MimeMultipart
    [javac] location: class org.opengts.util.SendMailArgs
    [javac]                     Multipart multipart = new MimeMultipart();
    [javac]                                               ^
    [javac] /usr/local/OpenGTS_2.4.5/src/org/opengts/util/SendMailArgs.java:304: cannot find symbol
    [javac] symbol  : class MimeBodyPart
    [javac] location: class org.opengts.util.SendMailArgs
    [javac]                         MimeBodyPart textBodyPart = new MimeBodyPart();
    [javac]                         ^
/util/SendMailArgs.java:392: cannot find symbol
    [javac] symbol  : class InternetAddress
    [javac] location: class org.opengts.util.SendMailArgs
    [javac]         return inetAddr.toArray(new InternetAddress[inetAddr.size()]);
    [javac]                                     ^
    [javac] 39 errors
    [javac] Compile failed; see the compiler error output for details.
     [echo] Compiling dbtools ... 
    [javac] Compiling 24 source files to /usr/local/OpenGTS_2.4.5/build
    [javac] Creating empty /usr/local/OpenGTS_2.4.5/build/org/opengts/dbtools/package-info.class

gtsutils.exceltools:

gtsutils.sigHandler:

gtsutils.optional:

gtsutils.jar:
     [echo] Creating gtsutils.jar ... 
     [copy] Copying 14 files to /usr/local/OpenGTS_2.4.5/build
      [jar] Building jar: /usr/local/OpenGTS_2.4.5/build/lib/gtsutils.jar

gtsutils:

CompileTime.java:
     [echo] Creating CompileTime module ...

gtsdb:
     [echo] Creating gtsdb.jar ...
    [javac] Compiling 110 source files to /usr/local/OpenGTS_2.4.5/build
    [javac] Creating empty /usr/local/OpenGTS_2.4.5/build/org/opengts/geocoder/tinygeocoder/package-info.class
.....
    [javac] Creating empty /usr/local/OpenGTS_2.4.5/build/org/opengts/db/package-info.class
     [copy] Copying 42 files to /usr/local/OpenGTS_2.4.5/build
      [jar] Building jar: /usr/local/OpenGTS_2.4.5/build/lib/gtsdb.jar
     [copy] Copying 1 file to /usr/local/OpenGTS_2.4.5/build/lib

optjars:

tomcat.home:

BUILD FAILED
/usr/local/OpenGTS_2.4.5/build.xml:111: CATALINA_HOME environment variable has not been defined.
        (make sure CATALINA_HOME is defined and exported to the list of environment variables)
Code:
anisha@linux-trra:/usr/local/OpenGTS_2.4.5> $CATALINA_HOME
bash: /home/anisha/openGTS17Nov/apache-tomcat-7.0.32/bin: is a directory

anisha@linux-trra:/usr/local/OpenGTS_2.4.5> $JAVA_HOME
bash: /home/anisha/openGTS17Nov/jdk1.6.0_26/bin: is a directory

anisha@linux-trra:/usr/local/OpenGTS_2.4.5> $PATH
bash: /home/anisha/qtsdk-2010.05/qt/bin/:/home/anisha/qtsdk-2010.05/bin:/home/anisha/openGTS17Nov/javamail-1.4.5/mail-1.4.jar:/usr/lib64/libreoffice/share/extensions/gdocs_2.1.0_modified/external_jars/activation.jar:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:
/home/anisha/openGTS17Nov/jdk1.6.0_26/bin:/home/anisha/openGTS17Nov/apache-ant-1.8.4/:
/home/anisha/openGTS17Nov/apache-tomcat-7.0.32/bin:/usr/local/OpenGTS_2.4.5/::/home/anisha/openGTS17Nov/javamail-1.4.5/mail.jar:/home/anisha/openGTS17Nov/apache-tomcat-7.0.32/lib: No such file or directory

anisha@linux-trra:/usr/local/OpenGTS_2.4.5>
From the installation guide of openGTS (w.r.t Tomcat):
Quote:
2.4.a) Linux users installing the downloaded Apache Tomcat:
It is recommended that the manual Tomcat installation be installed in the "/usr/local/" directory ('root'
access will be required to install into this directory).

The CATALINA_HOME environment variable should then be set to the following:
$ export CATALINA_HOME=/usr/local/apache-tomcat-x.xx.xx
Where "/usr/local/apache-tomcat-x.xx.xx" matches the name of the Tomcat installation directory.

It is recommended to also create a "tomcat" symbolic link in the "/usr/local/" directory which points to the
Tomcat installation, as follows:
# cd /usr/local
# ln -s $CATALINA_HOME tomcat

Within the Tomcat installation 'bin' directory (ie. "$CATALINA_HOME/bin"), make sure the execute
permissions bit is set on all ".sh" files. If not set, the following command will set the execution bit:
$ cd $CATALINA_HOME/bin
$ chmod a+x *.sh
If the execute bit is not set on these files, Tomcat "startup.sh" and "shutdown.sh" commands may not be
able to execute.
openSUSE 11.4 64 bit

Last edited by Aquarius_Girl; 11-23-2012 at 12:53 AM.
 
Old 11-23-2012, 01:55 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,062

Rep: Reputation: Disabled
Hi Anisha,

on my Slackware 13.37, /etc/profile.d/apache-tomcat.sh content's is:
Code:
#!/bin/sh
export CATALINA_HOME=/usr/share/tomcat
export CATALINA_BASE=/var/lib/tomcat
export CATALINA_TMPDIR=/var/tmp/tomcat
export CATALINA_LIBDIR=/usr/share/tomcat/lib
This is set up by the SlackBuild to make a package of Tomcat.

I know that you are using OpenSUSE not Slackware and installing openGTS not Tomcat but maybe this can give you some clue though.
 
Old 11-23-2012, 03:08 AM   #3
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Thanks for replying.

Code:
anisha@linux-trra:/etc/profile.d> cat tomcat.sh
CATALINA_HOME=/home/anisha/openGTS17Nov/apache-tomcat-7.0.32/
export CATALINA_HOME
PATH=$PATH:$CATALINA_HOME/bin
export PATH

anisha@linux-trra:/etc/profile.d>
Code:
anisha@linux-trra:~> cat ~/.profile
# Sample .profile for SuSE Linux
LD_LIBRARY_PATH=$TARGET_DIR/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

export JAVA_HOME=/home/anisha/openGTS17Nov/jdk1.6.0_26/bin
export ANT_HOME=/home/anisha/openGTS17Nov/apache-ant-1.8.4/
export CATALINA_HOME=/home/anisha/openGTS17Nov/apache-tomcat-7.0.32/
export GTS_HOME=/usr/local/OpenGTS_2.4.5/

export CLASSPATH=$CLASSPATH:~/openGTS17Nov/javamail-1.4.5/mail.jar:/home/anisha/openGTS17Nov/apache-tomcat-7.0.32/lib;

PATH=$PATH:$JAVA_HOME:$ANT_HOME:$CATALINA_HOME:$GTS_HOME:$CLASSPATH
export $PATH

anisha@linux-trra:~>
None of this helped.

The only thing which I have done differently is that I have not installed tomcat
in /usr/local/, instead in my home directory. Can that make a huge difference in this case?

Last edited by Aquarius_Girl; 11-23-2012 at 03:09 AM.
 
Old 11-23-2012, 04:05 AM   #4
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731

Original Poster
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
This is solved.

The problem was that I was compiling openGTS (in /usr/local) through sudo,
that's why it wasn't able to see my $CLASSPATH.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined xpucto Linux - Newbie 8 04-21-2020 02:26 PM
Why do I only see environment variable defined when using bash console acomber Linux - Newbie 4 03-10-2012 09:07 AM
Cannot start Tomcat and get "The BASEDIR environment variable is not defined correctl thomas2004ch Linux - Software 1 07-14-2010 05:07 AM
Replace variable with user defined variable ce124 Programming 10 04-13-2007 09:29 AM
# ./startup.sh Neither the JAVA_HOME nor the JRE_HOME environment variable is defined Niceman2005 Linux - Newbie 3 06-29-2005 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration