Tomcat installation problem

Need help with C, C++, perl, python, etc?

Tomcat installation problem

Postby elisman » 2005-10-27 18:42

Hey,

I just downloaded Tomcat 5.5 Core binaries from the Apache Homepage, and tried to install the Unix Daemon as written in the Documentation.

autoconf worked fine.
./configure worked fine.
make failed with many errors.

How to fix this?
The errors are below.
Many thanks,


Code: Select all
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ autoconf
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ chmod 777 configure
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ echo $JAVA_HOME
/usr/lib/fjsdk
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ ./configure
*** Current host ***
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking for javac... /usr/lib/fjsdk/bin/javac
checking wether the Java compiler (/usr/lib/fjsdk/bin/javac) works... yes
checking for jar... /usr/lib/fjsdk/bin/jar
gcc flags added
*** Writing output files ***
configure: creating ./config.status
config.status: creating Makefile
config.status: creating Makedefs
config.status: creating native/Makefile
*** All done ***
Now you can issue "make"
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ make
make -C native all
make[1]: Entering directory `/usr/java/apache-tomcat-5.5.12/bin/jsvc-src/native'
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c jsvc-unix.c -o jsvc-unix.o
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c arguments.c -o arguments.o
arguments.c: In function 'arguments':
arguments.c:251: warning: unused variable 'temp'
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c debug.c -o debug.o
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c dso-dlfcn.c -o dso-dlfcn.o
dso-dlfcn.c:51: warning: function declaration isn't a prototype
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c dso-dyld.c -o dso-dyld.o
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c help.c -o help.o
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c home.c -o home.o
gcc -g -O2 -DOS_LINUX -DDSO_DLFCN -DCPU=\"i386\" -I/usr/lib/fjsdk/include -I/usr/lib/fjsdk/include/linux -Wall -Wstrict-prototypes -c java.c -o java.o
java.c:22:17: error: jni.h: No such file or directory
java.c:35: error: syntax error before '*' token
java.c:35: warning: type defaults to 'int' in declaration of 'jvm'
java.c:35: warning: data definition has no type or storage class
java.c:36: error: syntax error before '*' token
java.c:36: warning: type defaults to 'int' in declaration of 'env'
java.c:36: warning: data definition has no type or storage class
java.c:37: error: syntax error before 'cls'
java.c:37: warning: type defaults to 'int' in declaration of 'cls'
java.c:37: warning: initialization makes integer from pointer without a cast
java.c:37: warning: data definition has no type or storage class
java.c:42: error: syntax error before '*' token
java.c:42: warning: function declaration isn't a prototype
java.c: In function 'shutdown':
java.c:43: error: 'reload' undeclared (first use in this function)
java.c:43: error: (Each undeclared identifier is reported only once
java.c:43: error: for each function it appears in.)
java.c: At top level:
java.c:49: warning: function declaration isn't a prototype
java.c: In function 'java_init':
java.c:91: warning: implicit declaration of function 'jint'
java.c:91: error: 'symb' undeclared (first use in this function)
java.c:91: error: 'JavaVM' undeclared (first use in this function)
java.c:91: error: syntax error before ',' token
java.c:92: error: 'JNINativeMethod' undeclared (first use in this function)
java.c:93: error: 'JavaVMOption' undeclared (first use in this function)
java.c:93: error: 'opt' undeclared (first use in this function)
java.c:95: error: 'JavaVMInitArgs' undeclared (first use in this function)
java.c:95: error: syntax error before 'arg'
java.c:97: error: syntax error before 'ret'
java.c:122: warning: implicit declaration of function 'dso_error'
java.c:180: error: 'arg' undeclared (first use in this function)
java.c:180: error: 'JNI_VERSION_1_2' undeclared (first use in this function)
java.c:191: error: syntax error before ')' token
java.c:223: error: 'ret' undeclared (first use in this function)
java.c:232: error: invalid type argument of '->'
java.c:234: warning: comparison between pointer and integer
java.c:241: error: 'nativemethod' undeclared (first use in this function)
java.c:245: error: invalid type argument of '->'
java.c: In function 'JVM_destroy':
java.c:256: error: 'jclass' undeclared (first use in this function)
java.c:256: error: syntax error before 'system'
java.c:257: error: 'jmethodID' undeclared (first use in this function)
java.c:263: error: invalid type argument of '->'
java.c:272: error: 'method' undeclared (first use in this function)
java.c:272: error: invalid type argument of '->'
java.c:279: error: invalid type argument of '->'
java.c:279: error: 'jint' undeclared (first use in this function)
java.c:279: error: syntax error before 'exit'
java.c:283: error: invalid type argument of '->'
java.c: In function 'java_load':
java.c:290: error: 'jclass' undeclared (first use in this function)
java.c:290: error: syntax error before 'stringClass'
java.c:291: error: 'jstring' undeclared (first use in this function)
java.c:293: error: 'jobjectArray' undeclared (first use in this function)
java.c:294: error: 'jmethodID' undeclared (first use in this function)
java.c:295: error: 'jboolean' undeclared (first use in this function)
java.c:302: error: 'className' undeclared (first use in this function)
java.c:302: error: invalid type argument of '->'
java.c:310: error: 'stringClass' undeclared (first use in this function)
java.c:310: error: invalid type argument of '->'
java.c:317: error: 'stringArray' undeclared (first use in this function)
java.c:317: error: invalid type argument of '->'
java.c:325: error: 'currentArgument' undeclared (first use in this function)
java.c:325: error: invalid type argument of '->'
java.c:331: error: invalid type argument of '->'
java.c:336: error: 'method' undeclared (first use in this function)
java.c:336: error: invalid type argument of '->'
java.c:342: error: 'ret' undeclared (first use in this function)
java.c:342: error: invalid type argument of '->'
java.c: In function 'java_start':
java.c:354: error: 'jmethodID' undeclared (first use in this function)
java.c:354: error: syntax error before 'method'
java.c:355: error: 'jboolean' undeclared (first use in this function)
java.c:361: error: 'method' undeclared (first use in this function)
java.c:361: error: invalid type argument of '->'
java.c:367: error: 'ret' undeclared (first use in this function)
java.c:367: error: invalid type argument of '->'
java.c: In function 'java_sleep':
java.c:381: error: 'jclass' undeclared (first use in this function)
java.c:381: error: syntax error before 'clsThread'
java.c:382: error: 'jmethodID' undeclared (first use in this function)
java.c:391: error: 'clsThread' undeclared (first use in this function)
java.c:391: error: invalid type argument of '->'
java.c:396: error: 'method' undeclared (first use in this function)
java.c:396: error: invalid type argument of '->'
java.c:402: error: invalid type argument of '->'
java.c:402: error: 'jlong' undeclared (first use in this function)
java.c:402: error: syntax error before 'wait'
java.c: In function 'java_stop':
java.c:407: error: 'jmethodID' undeclared (first use in this function)
java.c:407: error: syntax error before 'method'
java.c:408: error: 'jboolean' undeclared (first use in this function)
java.c:414: error: 'method' undeclared (first use in this function)
java.c:414: error: invalid type argument of '->'
java.c:420: error: 'ret' undeclared (first use in this function)
java.c:420: error: invalid type argument of '->'
java.c: In function 'java_version':
java.c:432: error: 'jmethodID' undeclared (first use in this function)
java.c:432: error: syntax error before 'method'
java.c:438: error: 'method' undeclared (first use in this function)
java.c:438: error: invalid type argument of '->'
java.c:444: error: invalid type argument of '->'
java.c: In function 'java_check':
java.c:450: error: 'jstring' undeclared (first use in this function)
java.c:450: error: syntax error before 'className'
java.c:451: error: 'jmethodID' undeclared (first use in this function)
java.c:452: error: 'jboolean' undeclared (first use in this function)
java.c:459: error: 'className' undeclared (first use in this function)
java.c:459: error: invalid type argument of '->'
java.c:468: error: 'method' undeclared (first use in this function)
java.c:468: error: invalid type argument of '->'
java.c:474: error: 'ret' undeclared (first use in this function)
java.c:474: error: invalid type argument of '->'
java.c: In function 'java_destroy':
java.c:486: error: 'jmethodID' undeclared (first use in this function)
java.c:486: error: syntax error before 'method'
java.c:487: error: 'jboolean' undeclared (first use in this function)
java.c:493: error: 'method' undeclared (first use in this function)
java.c:493: error: invalid type argument of '->'
java.c:499: error: 'ret' undeclared (first use in this function)
java.c:499: error: invalid type argument of '->'
make[1]: *** [java.o] Error 1
make[1]: Leaving directory `/usr/java/apache-tomcat-5.5.12/bin/jsvc-src/native'
make: *** [native/all] Error 2
User avatar
elisman
 
Posts: 4
Joined: 2005-10-26 18:26

Postby lacek » 2005-10-28 13:00

It seems you downloaded the source, not the binaries.
Download the binaries from http://tomcat.apache.org/download-55.cgi and unpack the file to a place you want.
Edit the 'catalina.sh' script provided with Tomcat, export the JAVA_HOME and CATALINA_HOME variables to point to the java installation and the tomcat directory. You may create a symlink to /usr/local/bin, pointing to this catalina.sh, to make it more convenient to run and stop tomcat.
If you done, you need to call 'catalina.sh start' to start tomcat and 'catalina.sh stop' to stop it.

However, if you still want to compile it, the problem is that make can't find 'jni.h', which is included in the Java suite. It is in $JAVA_HOME/include. You'll have to pass this directory as an extra include dir to the configure process.
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Re: Tomcat installation problem

Postby jspilon » 2006-08-29 18:57

elisman wrote:Hey,

I just downloaded Tomcat 5.5 Core binaries from the Apache Homepage, and tried to install the Unix Daemon as written in the Documentation.

autoconf worked fine.
./configure worked fine.
make failed with many errors.

How to fix this?
The errors are below.
Many thanks,


Code: Select all
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ autoconf
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ chmod 777 configure
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ echo $JAVA_HOME
/usr/lib/fjsdk
elisei@pluto:/usr/java/apache-tomcat-5.5.12/bin/jsvc-src$ ./configure



you should use this configure command:
changing the path to your jvm

Code: Select all
./configure --with-java=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06
jspilon
 
Posts: 71
Joined: 2006-08-29 15:33
Location: Canada

Configuration of Tomcat after installation

Postby DebianUser_HH » 2006-12-06 21:59

Hello everybody.

lacek wrote:Edit the 'catalina.sh' script provided with Tomcat,


I've got a question at this place: what should one edit in catalina.sh? It looks running "out-of-box" on my configuration.

lacek wrote:export the JAVA_HOME and CATALINA_HOME variables to point to the java installation and the tomcat directory. You may create a symlink to /usr/local/bin, pointing to this catalina.sh, to make it more convenient to run and stop tomcat.
If you done, you need to call 'catalina.sh start' to start tomcat and 'catalina.sh stop' to stop it.


I did the symlink, and it works perfectly. For "root"-user only. When I try to start/stop the service as ordinary user, it works too (at least, it gives positive messages), but afterwards it throws an exception "FileNotFound" (cannot open file). How can I fix it? Should I create a new group for it - group of users who are allowed to read/write those XML files?

And I have another issue, which really puzzles me: today I installed first Apache server on my machine, then Tomcat, and finally I removed (via Synaptic) Apache server. When I address localhost:8080, I see the Tomcat start page - everything is OK. But when I enter just localhost, I see exactly the same page I saw when I had Apache installed. :o Hmmm... Can anybody explain it? Does Tomcat emulate Apache server? Funny is that this page recommends me to configure Apache using folder /etc/apache, which does not exist... :?: Any ideas?


Thanks in advance,
Andrey
Software:
WinXP Pro + Debian Lenny

Hardware:
IBM Thinkpad T43p Centrino 2.13GHz / 2 GB RAM / 80 GB
DebianUser_HH
 
Posts: 90
Joined: 2006-04-30 19:44
Location: Hamburg/Germany


Return to Programming

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable