Hi Jaroslav, 

I have compiled the JSVC daemon on SUSE Linux Enterprise Server 11 SP2 (x64) on 
the IBM JDK, like you are trying to do. 

I would suggest that if your make of jsvc was successful.  It would be 
beneficial to see the error that your jsvc command is throwing.  The daemon 
does rely on some extra Java resources that should be loaded via the -classpath 
argument.  When starting Tomcat with JSVC, are you directing JSVC to load its 
class files?   

Here is one of my working configurations: 

 JAVA_OPTS="$JAVA_OPTS 
"-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" 
"-Djava.util.logging.config.file="/etc/tomcat6/logging.properties" 
TOMCAT_MIN_HEAP=2048m   #use a minimum heap of 2GB 
TOMCAT_MAX_HEAP=3072m   #use a maximum heap of 3GB 
CATALINA_OPTS="${DEBUG_OPTS} -XX:MaxPermSize=256m -Xms$TOMCAT_MIN_HEAP 
-Xmx$TOMCAT_MAX_HEAP" 
TOMCAT_USER=tomcat 
CLASSPATH=/usr/lib64/jvm/java/lib/tools.jar:/usr/share/java/commons-logging-api.jar:$CATALINA_HOME/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar
 

        /sbin/startproc $JSVC_BIN \ 
            -user $TOMCAT_USER \ 
            -jvm $JSVC_JVM \ 
            -home $JAVA_HOME \ 
            -pidfile $JSVC_PID \ 
            -outfile $CATALINA_BASE/logs/catalina.out \ 
            -errfile $CATALINA_BASE/logs/catalina.out \ 
            $JAVA_OPTS $CATALINA_OPTS \ 
            -classpath $CLASSPATH \ 
            -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ 
            
-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties \ 
            -Dcatalina.home=$CATALINA_BASE \ 
            -Dcatalina.base=$CATALINA_BASE \ 
            -Djava.io.tmpdir=$CATALINA_BASE/temp \ 
            org.apache.catalina.startup.Bootstrap "$@" start
 




---------------------------------------
Kenneth J. Erard
Application Specialist II
Information Technology Service
College Hall 210, Toledo Campus
567.661.2096 (Office) (08:00 AM to 05:00 PM)
419.419.8492 (Mobile) 
kenneth_er...@owens.edu


>>> Jaroslav Fikker<fik...@atlas.cz> 5/23/2013 4:37 AM >>>
Hello everybody.

I encountered a problem with compilation of Unix daemon (jsvc) against IBM Java 
from Tomcat 7.0.40. I used these commands:

cd /opt/tomcat/bin
tar xvfz commons-daemon-native.tar.gz
cd commons-daemon-1.0.x-native-src/unix
/configure

and I got this output:
*** Current host ***
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-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
checking for strip... strip
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking for JDK os include directory... Cannot find jni_md.h in 
/usr/lib/jvm/java-1.6.0-ibm.x86_64/
configure: error: You should retry --with-os-type=SUBDIR

I found information that the reason is: IBM java uses 
$JAVA_HOME/include/jniport.h instead of $JAVA_HOME/include/jni_md.h in Oracle 
java. When I created a link jni_md.h to jniport.h I can successfully compile 
jsvc but when I try to start Tomcat server I have a problem with class loading 
(Java class not found).

Is there some fix or recommendation for compilation Tomcat Unix daemon with IBM 
Java? Thank you very much for your help.

Best regards,

J. Fikker.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to