Forum OpenACS Q&A: Re: Re: nsjk2 module

Collapse
4: Re: Re: nsjk2 module (response to 3)
Posted by Nick Carroll on
Hi Dossy,

I managed to compile nsjk2. However when I startup the openacs config.tcl file with the extras needed to configure nsjk2, I get the following error in the log file...

[14/Dec/2004:14:07:26][3272.16384][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsjk2.so'
[14/Dec/2004:14:07:26][3272.16384][-main-] Notice: nsjk2: initialized nsjk2 environment
[14/Dec/2004:14:07:26][3272.16384][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsjavatclbridge.so'
[14/Dec/2004:14:07:26][3272.16384][-main-] Notice: nsjavatclbridge initializing
[14/Dec/2004:14:07:26][3272.16384][-main-] Notice: nsjk2: initialized on 'openacs'
[14/Dec/2004:14:07:26][3272.16384][-main-] Error: Ns_GetJvmEnv: global JVM handle is NULL.
[14/Dec/2004:14:07:26][3272.16384][-main-] Error: Ns_Jk2AddJavaCmds: Unable to access JVM
[14/Dec/2004:14:07:26][3272.16384][-main-] Error:

The settings in my config file for nsjk2 are...

# nsjk2 configuration

ns_section ns/module/nsjk2
ns_param serverroot $env(TOMCAT_HOME)

ns_section ns/server/${server}/modules
ns_param nsjk2 ${bindir}/nsjk2.so

ns_section ns/server/${servername}/module/nsjk2/gzip
ns_param enabled on
ns_param level 4
ns_param minsize 0

ns_section ns/server/${server}/module/nsjk2/utils
ns_param nsjavatclbridge ${bindir}/nsjavatclbridge.so

# -------------------------------------------------------

Would you know why the jvmGLOBAL variable isn't being assigned a jvm instance?

Thanks,
Nick.

Collapse
5: Re: Re: Re: nsjk2 module (response to 4)
Posted by Steve Manning on
Is it possible that it just isn't seeing the JVM? Might be worth checking your paths and environment variabls for the user that aols runs as.

- Steve
Collapse
Posted by Nick Carroll on
I set the JAVA_HOME variable as follows:

sudo /usr/bin/env -i JAVA_HOME=/usr/local/j2sdk1.4.2_04 TOMCAT_HOME=/usr/local/tomcat LD_LIBRARY_PATH=/usr/local/tomcat/lib:/usr/local/j2sdk1.4.2_04/jre/lib/i386:/usr/local/j2sdk1.4.2_04/jre/lib/i386/server /usr/local/aolserver/bin/nsd -ft /usr/local/aolserver/sample-config.tcl -u ncarroll -g web

I don't think the paths are the problem.