i've got tomcat 4.1.24 LE + apache2 2.1.0 cvs + mod_jk2 all behaving nicely for 'out of process' Tomcat.
however, when I try to launch tomcat 'in process', it fails, and the catalina.out log shows:
INFO: Starting Coyote HTTP/1.1 on port 8080
[Sat Mar 29 18:07:59 2003] ( info ) [jk_config_file.c (320)] cfg.update() Updating config /etc/apache2/workers2.properties 0 1048989584
[Sat Mar 29 18:07:59 2003] ( info ) [jk_config_file.c (331)] config.setConfig(): Reading properties /etc/apache2/workers2.properties 27
[Sat Mar 29 18:07:59 2003] ( info ) [jk_logger_file.c (224)] Level DEBUG 0
[Sat Mar 29 18:07:59 2003] ( info ) [jk_logger_file.c (184)] Initializing log file stderr
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)] jni.guessJvmDll() failed /Library/Java/Home/jre/bin/classic/libjvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)] jni.guessJvmDll() failed /Library/Java/Home/jre/bin/client/jvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)] jni.guessJvmDll() failed /Library/Java/Home/jre/lib/i386/classic/libjvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)] jni.guessJvmDll() failed /Library/Java/Home/jre/lib/i386/client/libjvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (463)] jni.guessJvmDll() failed /Library/Java/Home/jre/bin/classic/jvm.so
[Sat Mar 29 18:07:59 2003] ( info ) [jk_vm_default.c (468)] jni.guessJvmDll() failed
[Sat Mar 29 18:07:59 2003] (error ) [jk_vm_default.c (496)] vm.init(): no jvm_dll_path, will use LD_LIBRARY_PATH libjvm.so
[Sat Mar 29 18:07:59 2003] (error ) [jk_vm_default.c (246)] Can't load native library libjvm.so : cannot create object file image or add lib
[Sat Mar 29 18:07:59 2003] (emerg ) [jk_vm_default.c (507)] jni.loadJvm() Error - can't load jvm dll
[Sat Mar 29 18:07:59 2003] (error ) [jk_workerEnv.c (229)] workerEnv.initChannel() init failed for channel.jni:jni
[Sat Mar 29 18:07:59 2003] ( info ) [jk_worker_jni.c (239)] workerJni.Init() Skipping initialization for the -1 13086
[Sat Mar 29 18:07:59 2003] (error ) [jk_workerEnv.c (193)] workerEnv.initWorkers() init failed for worker.jni:onStartup
[Sat Mar 29 18:07:59 2003] ( info ) [jk_worker_jni.c (239)] workerJni.Init() Skipping initialization for the -1 13086
[Sat Mar 29 18:07:59 2003] (error ) [jk_workerEnv.c (193)] workerEnv.initWorkers() init failed for worker.jni:onShutdown
now, i'm not terribly surprised by this ..... cuz OSX's jvm can be found at:
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Libraries/libjvm .dylib
i've tried a clean build with LDFLAGS set to:
setenv LDFLAGS "-ldl -F/System/Library/PrivateFrameworks -framework JavaVM"
but no dice ..... same error
a quick peek in "jk_vm_default.c" shows that the jni.guessJvmDll checks are only for ".so" libs
noting the "will use LD_LIBRARY_PATH libjvm.so ", and i naivelely added /System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Libraries/ to my LD_LIBRARY_PATH and tried again -- even with a symbolic link from libjvm.dylib to libjvm.so, its still failing with the same errors.
clearly, i'm missing something .....
any help/ideas?
for reference, here are my jk2.properties & workers2.properties:
========================================================================= ############################################# # /etc/local/tomcat/conf/jk2.properties #############################################
#Minimum JNI configuration is the simplest one to make the Tomcat working #from inside the web server as inprocess. The only comunication channel used #is JNI. The JK2 will register all the native calls by itself, so there is #no need to specify the native library on Java side.
#handler.list=apr,channelSocket,channelJni,request handler.list=apr,request,container,channelJni shm.file=/usr/local/tomcat/work/jk2.shm tomcatAuthentication=true channelSocket.port=8009
# Tomcat: in process; native libs will be reg'd by JK2 # If not then it has to be the absolute path of the jkjni dynamic library. apr.jniModeSo=inprocess # jkjni dynamic library: either in java.library.path, or absolute path apr.NativeSo=/usr/libexec/apache2/jkjni.so
# Tomcat: out of process
# jtc=/usr/local/tomcat-connectors
# apr.NativeSo=${jtc}/jk/build/jk2/apache2/jkjni.so# Or you can use the mod_jk2 directly # apr.jniModeSo=/usr/libexec/apache2/mod_jk2.so =========================================================================
========================================================================= ############################################# ## /etc/apache2/workers2.properties - #############################################
#################### # Global Settings ####################
[logger] level=DEBUG
[config:] file=/etc/apache2/conf/workers2.properties debug=0 debugEnv=0
[uriMap:] info=Maps the requests. Options: debug debug=0
[workerEnv:] info=Global server options timing=1 debug=0 # Default Native Logger (apache2 or win32 ) # can be overriden to a file logger, useful # when tracing win32 related issues #logger=logger.file:0
[shm]
info=Scoreboard. Required for reconfiguration and status with multiprocess servers
file=/var/log/shm.file
size=1048576
debug=0
disabled=0
[vm:] #info=Parameters used to load a JVM in the server process OPT=-Djava.class.path=/usr/local/tomcat/bin/tomcat-jni.jar;/usr/local/tomca t/server/lib/catalina.jar OPT=-Dtomcat.home=/usr/local/tomcat OPT=-Dcatalina.home=/usr/local/tomcat OPT=-Xmx128M
#################### # Load Balancing ####################
#[lb:lb] #info=Default load balancer. #debug=0
#[lb:lb_1] #info=A second load balancer. #debug=0
#################### # Channel Definitions ####################
# JNI channel [channel.jni:jni] info=The jni channel, used if tomcat is started inprocess
# TCP socket channel [channel.socket:localhost:8009] info=Ajp13 forwarding over socket port=8009 host=127.0.0.1 debug=0 #tomcatId=localhost:8009
#[channel.socket:localhost:8019] #info=A second tomcat instance. #debug=0 #tomcatId=localhost:8019 #lb_factor=1 #group=lb #group=lb_1 #disabled=0
# UNIX socket channel
[channel.un:/usr/local/tomcat/work/jk2.socket]
tomcatId=localhost:8009
debug=0#################### # Worker Definitions ####################
# define "status" worker [status:status] info=Status worker, displays runtime informations
# define "ajp13" worker
[ajp13:localhost:8009]
#channel=channel.un:/usr/local/tomcat/work/jk2.socket
channel=channel.socket:localhost:8009# JNI worker startup handler
[worker.jni:onStartup]
info=Command to be executed by the VM on startup. This one will start tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=start
stdout=/var/log/apache2/tomcat_jni.log
stderr=/var/log/apache2/tomcat_jni.log
# JNI worker shutdown handler
[worker.jni:onShutdown]
info=Command to be executed by the VM on shutdown. This one will stop tomcat.
class=org/apache/jk/apr/TomcatStarter
ARG=stop
#################### # URI mappings ####################
# status applications [uri:/status/*] group=status:status
[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:status# uriEnv.setAttribute() the worker directive is deprecated. Use 'group' instead.
# /Library/WebServer/webapps
[uri:/*.jsp]
group=ajp13:localhost:8009
#group=ajp13:/usr/local/tomcat/work/jk2.socket
debug=0
[uri:/*/servlets/]
group=ajp13:localhost:8009
debug=0 [uri:/manager/*]
group=ajp13:localhost:8009
debug=0 [uri:/examples/*]
group=ajp13:localhost:8009
debug=0 [uri:/struts-blank/*]
group=ajp13:localhost:8009
debug=0 [uri:/struts-example/*]
group=ajp13:localhost:8009
debug=0 [uri:/struts-template/*]
group=ajp13:localhost:8009
debug=0 [uri:/struts-upload/*]
group=ajp13:localhost:8009
debug=0 [uri:/struts-validator/*]
group=ajp13:localhost:8009
debug=0 [uri:/tiles-documentation/*]
group=ajp13:localhost:8009
debug=0 [uri:/struts-documentation/*]
group=ajp13:localhost:8009
debug=0 [uri:/struts-exercise-taglib/*]
group=ajp13:localhost:8009
debug=0#[uri:127.0.0.1:8003]
#info=Example virtual host. Make sure myVirtualHost is in /etc/hosts to test it
#alias=myVirtualHost:8003
#[uri:127.0.0.1:8003/ex]
#info=Example webapp in the virtual host. It'll go to lb_1 ( i.e. localhost:8019 )
#context=/ex
#group=lb_1
#[uri:/examples] #info=Example webapp in the default context. #context=/examples #debug=0
#[uri:/examples1/*] #info=A second webapp, this time going to the second tomcat only. #group=lb_1 #debug=0
# Map the Tomcat examples webapp to the Web server uri space #[uri:/examples/*] #info=Map the whole webapp =========================================================================
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
