Forum OpenACS Q&A: webmail class compile
..... [03/Feb/2001:13:23:45][1457.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/libnsjava.so' [03/Feb/2001:13:23:47][1457.1024][-main-] Notice: ModuleInit: Java Module ENABLED [03/Feb/2001:13:23:49][1457.1024][-main-] Notice: ModuleInit: JVM init succeeded! [03/Feb/2001:13:26:55] Error: JavaEvalCmd: can't find class: MessageParser Args: ns_java -detach MessageParser::process_queue /home/nsadmin/servers/server1/qmail/queue/ Notice: Done running scheduled proc wm_process_queue. [03/Feb/2001:13:27:56] Error: JavaEvalCmd: can't find class: MessageParser java.lang.NoClassDefFoundError: MessageParser /home/nsadmin/servers/server1/qmail/queue/ Notice: Done running scheduled proc wm_process_queue.
so, i try to compile /web/server1/www/webmail/java/Makefile the result is:javac -g acspg/BLOB.java acspg/BLOB.java:17: cannot resolve symbol symbol : class Pg_Query location: class acspg.BLOB private Pg_Query st; ^ acspg/BLOB.java:19: cannot resolve symbol symbol : class Pg_Query location: class acspg.BLOB public BLOB(Integer lob_id, Pg_Query st) throws SQLException { ^ acspg/BLOB.java:23: cannot resolve symbol symbol : class Pg_Query location: class acspg.BLOB public BLOB(int lob_id, Pg_Query st) throws SQLException { ^ acspg/BLOB.java:27: cannot resolve symbol symbol : class Pg_Query location: class acspg.BLOB public BLOB(Integer lob_id, Pg_Query st, File f) ^ acspg/BLOB.java:33: cannot resolve symbol symbol : class Pg_Query location: class acspg.BLOB public BLOB(int lob_id, Pg_Query st, File f) ^ acspg/BLOB.java:47: cannot resolve symbol symbol : class Pg_Query location: class acspg.BLOB private void init(int lob_id, Pg_Query st) throws SQLException { ^ acspg/BLOB.java:53: cannot resolve symbol symbol : class Pg_Query location: class acspg.BLOB private void init(int lob_id, Pg_Query st, File f) ^ 7 errors javac -g acspg/CLOB.java acspg/CLOB.java:5: package javax.activation does not exist import javax.activation.*; ^ acspg/CLOB.java:14: cannot resolve symbol symbol : class Pg_Query location: class acspg.CLOB private Pg_Query query = null; ^ acspg/CLOB.java:55: cannot resolve symbol symbol : class Pg_Query location: class acspg.CLOB public void setQueryObject(Pg_Query q) { ^ acspg/CLOB.java:35: cannot resolve symbol symbol : class ClobOutputStream location: class acspg.CLOB ClobOutputStream buf = new ClobOutputStream(this.str,this.istr,this.query); ^ acspg/CLOB.java:35: cannot resolve symbol symbol : class ClobOutputStream location: class acspg.CLOB ClobOutputStream buf = new ClobOutputStream(this.str,this.istr,this.query); ^ 5 errors javac -g acspg/BlobDataSource.java acspg/BlobDataSource.java:11: package javax.activation does not exist import javax.activation.*; ^ acspg/BlobDataSource.java:15: cannot resolve symbol symbol : class DataSource location: class acspg.BlobDataSource public class BlobDataSource implements DataSource { ^ acspg/BlobDataSource.java:16: cannot resolve symbol symbol : class BLOB location: class acspg.BlobDataSource protected BLOB blob; ^ acspg/BlobDataSource.java:20: cannot resolve symbol symbol : class BLOB location: class acspg.BlobDataSource public BlobDataSource(BLOB blob, String contentType, String name) { ^ 4 errors javac -g acspg/ClobDataSource.java acspg/ClobDataSource.java:11: package javax.activation does not exist import javax.activation.*; ^ acspg/ClobDataSource.java:16: cannot resolve symbol symbol : class DataSource location: class acspg.ClobDataSource public class ClobDataSource implements DataSource { ^ acspg/ClobDataSource.java:17: cannot resolve symbol symbol : class CLOB location: class acspg.ClobDataSource protected CLOB clob; ^ acspg/ClobDataSource.java:21: cannot resolve symbol symbol : class CLOB location: class acspg.ClobDataSource public ClobDataSource(CLOB clob, String contentType, String name) { ^ 4 errors javac -g acspg/AttachmentsIter.java acspg/AttachmentsIter.java:5: package javax.mail does not exist import javax.mail.*; ^ acspg/AttachmentsIter.java:6: package javax.mail.internet does not exist import javax.mail.internet.*; ^ acspg/AttachmentsIter.java:8: package javax.activation does not exist import javax.activation.*; ^ acspg/AttachmentsIter.java:22: cannot resolve symbol symbol : class Pg_Query location: class acspg.AttachmentsIter public AttachmentsIter(Pg_Query st, String query) throws SQLException { ^ acspg/AttachmentsIter.java:33: cannot resolve symbol symbol : class Pg_Query location: class acspg.AttachmentsIter public boolean next(Pg_Query st) throws SQLException ^ acspg/AttachmentsIter.java:47: cannot resolve symbol symbol : class Pg_Query location: class acspg.AttachmentsIter public BLOB data(Pg_Query st) throws SQLException, IOException { ^ acspg/AttachmentsIter.java:47: cannot resolve symbol symbol : class BLOB location: class acspg.AttachmentsIter public BLOB data(Pg_Query st) throws SQLException, IOException { ^ acspg/AttachmentsIter.java:49: cannot resolve symbol symbol : class BLOB location: class acspg.AttachmentsIter BLOB b = new BLOB(this.data.intValue(),st); ^ acspg/AttachmentsIter.java:49: cannot resolve symbol symbol : class BLOB location: class acspg.AttachmentsIter BLOB b = new BLOB(this.data.intValue(),st); ^ 9 errors javac -g acspg/HeadersIter.java acspg/HeadersIter.java:5: package javax.mail does not exist import javax.mail.*; ^ acspg/HeadersIter.java:6: package javax.mail.internet does not exist import javax.mail.internet.*; ^ acspg/HeadersIter.java:8: package javax.activation does not exist import javax.activation.*; ^ acspg/HeadersIter.java:16: cannot resolve symbol symbol : class Pg_Query location: class acspg.HeadersIter Pg_Query st; ^ acspg/HeadersIter.java:22: cannot resolve symbol symbol : class Pg_Query location: class acspg.HeadersIter public HeadersIter(Pg_Query st, String query) throws SQLException { ^ acspg/HeadersIter.java:35: cannot resolve symbol symbol : class Pg_Query location: class acspg.HeadersIter public boolean next(Pg_Query st) throws SQLException ^ 6 errors javac -g acspg/Pg_Query.java acspg/Pg_Query.java:5: package javax.mail does not exist import javax.mail.*; ^ acspg/Pg_Query.java:6: package javax.mail.internet does not exist import javax.mail.internet.*; ^ acspg/Pg_Query.java:8: package javax.activation does not exist import javax.activation.*; ^ 3 errors javac -g acspg/ClobOutputStream.java acspg/ClobOutputStream.java:3: package javax.activation does not exist import javax.activation.*; ^ acspg/ClobOutputStream.java:11: cannot resolve symbol symbol : class Pg_Query location: class acspg.ClobOutputStream Pg_Query query = null; ^ acspg/ClobOutputStream.java:14: cannot resolve symbol symbol : class Pg_Query location: class acspg.ClobOutputStream public ClobOutputStream(String str, String isql, Pg_Query q) ^ acspg/ClobOutputStream.java:24: cannot resolve symbol symbol : class Pg_Query location: class acspg.ClobOutputStream public ClobOutputStream(int i, String str, String isql, Pg_Query q) ^ 4 errors javac -g MessageComposer.java MessageComposer.java:15: package javax.mail does not exist import javax.mail.*; ^ MessageComposer.java:16: package javax.mail.internet does not exist import javax.mail.internet.*; ^ MessageComposer.java:18: package javax.activation does not exist import javax.activation.*; ^ MessageComposer.java:19: package acspg does not exist import acspg.*; ^ MessageComposer.java:26: cannot resolve symbol symbol : class Pg_Query location: class MessageComposer private Pg_Query st; ^ MessageComposer.java:28: cannot resolve symbol symbol : class Session location: class MessageComposer protected static Session s = null; ^ MessageComposer.java:54: cannot resolve symbol symbol : class MessagingException location: class MessageComposer throws MessagingException, IOException, SQLException, Throwable ^ MessageComposer.java:113: cannot resolve symbol symbol : class MimeMessage location: class MessageComposer protected void addParts(MimeMessage msg, Vector parts) ^ MessageComposer.java:114: cannot resolve symbol symbol : class MessagingException location: class MessageComposer throws MessagingException, IOException ^ MessageComposer.java:41: cannot resolve symbol symbol : class Pg_Query location: class MessageComposer st = new Pg_Query("subquery"); ^ MessageComposer.java:57: cannot resolve symbol symbol : class CLOB location: class MessageComposer CLOB bodyText = null; ^ MessageComposer.java:62: cannot resolve symbol symbol : class CLOB location: class MessageComposer bodyText = new CLOB(str); ^ MessageComposer.java:65: cannot resolve symbol symbol : class ClobDataSource location: class MessageComposer ClobDataSource cds = new ClobDataSource(bodyText, "text/plain", null); ^ MessageComposer.java:65: cannot resolve symbol symbol : class ClobDataSource location: class MessageComposer ClobDataSource cds = new ClobDataSource(bodyText, "text/plain", null); ^ MessageComposer.java:66: cannot resolve symbol symbol : class DataHandler location: class MessageComposer parts.addElement(new DataHandler(cds)); ^ MessageComposer.java:70: cannot resolve symbol symbol : class AttachmentsIter location: class MessageComposer AttachmentsIter attIter = new AttachmentsIter(st,"select lob, content_type, filename from wm_outgoing_message_parts where outgoing_msg_id = " + msgId + " order by sort_order"); ^ MessageComposer.java:70: cannot resolve symbol symbol : class AttachmentsIter location: class MessageComposer AttachmentsIter attIter = new AttachmentsIter(st,"select lob, content_type, filename from wm_outgoing_message_parts where outgoing_msg_id = " + msgId + " order by sort_order"); ^ MessageComposer.java:74: cannot resolve symbol symbol : class BlobDataSource location: class MessageComposer BlobDataSource bds = new BlobDataSource(attIter.data(st), attIter.content_type(), attIter.filename()); ^ MessageComposer.java:74: cannot resolve symbol symbol : class BlobDataSource location: class MessageComposer BlobDataSource bds = new BlobDataSource(attIter.data(st), attIter.content_type(), attIter.filename()); ^ MessageComposer.java:75: cannot resolve symbol symbol : class DataHandler location: class MessageComposer parts.addElement(new DataHandler(bds)); ^ MessageComposer.java:83: cannot resolve symbol symbol : variable Session location: class MessageComposer s = Session.getDefaultInstance(props, null); ^ MessageComposer.java:87: cannot resolve symbol symbol : class MimeMessage location: class MessageComposer MimeMessage msg = new MimeMessage(s); ^ MessageComposer.java:87: cannot resolve symbol symbol : class MimeMessage location: class MessageComposer MimeMessage msg = new MimeMessage(s); ^ MessageComposer.java:91: cannot resolve symbol symbol : class HeadersIter location: class MessageComposer HeadersIter hIter = new HeadersIter(st,"select name, value from wm_outgoing_headers where outgoing_msg_id = " + msgId + " order by sort_order"); ^ MessageComposer.java:91: cannot resolve symbol symbol : class HeadersIter location: class MessageComposer HeadersIter hIter = new HeadersIter(st,"select name, value from wm_outgoing_headers where outgoing_msg_id = " + msgId + " order by sort_order"); ^ MessageComposer.java:123: cannot resolve symbol symbol : class MimeMultipart location: class MessageComposer MimeMultipart msgMultiPart = new MimeMultipart(); ^ MessageComposer.java:123: cannot resolve symbol symbol : class MimeMultipart location: class MessageComposer MimeMultipart msgMultiPart = new MimeMultipart(); ^ MessageComposer.java:127: cannot resolve symbol symbol : class DataHandler location: class MessageComposer DataHandler dh = (DataHandler) e.nextElement(); ^ MessageComposer.java:127: cannot resolve symbol symbol : class DataHandler location: class MessageComposer DataHandler dh = (DataHandler) e.nextElement(); ^ MessageComposer.java:129: cannot resolve symbol symbol : class MimeBodyPart location: class MessageComposer MimeBodyPart bp = new MimeBodyPart(); ^ MessageComposer.java:129: cannot resolve symbol symbol : class MimeBodyPart location: class MessageComposer MimeBodyPart bp = new MimeBodyPart(); ^ MessageComposer.java:139: cannot resolve symbol symbol : class DataHandler location: class MessageComposer DataHandler dh = (DataHandler) parts.elementAt(0); ^ MessageComposer.java:139: cannot resolve symbol symbol : class DataHandler location: class MessageComposer DataHandler dh = (DataHandler) parts.elementAt(0); ^ 33 errors javac -g MessageParser.java MessageParser.java:14: package javax.mail does not exist import javax.mail.*; ^ MessageParser.java:15: package javax.mail.internet does not exist import javax.mail.internet.*; ^ MessageParser.java:19: package acspg does not exist import acspg.*; ^ MessageParser.java:26: cannot resolve symbol symbol : class Session location: class MessageParser protected static Session s = null; ^ MessageParser.java:28: cannot resolve symbol symbol : class Pg_Query location: class MessageParser private Pg_Query st; ^ MessageParser.java:31: cannot resolve symbol symbol : class MessagingException location: class MessageParser public MessageParser (String qdir) throws ClassNotFoundException, FileNotFoundException, IOException, SQLException, MessagingException ^ MessageParser.java:59: cannot resolve symbol symbol : class MessagingException location: class MessageParser FileNotFoundException, MessagingException { ^ MessageParser.java:119: cannot resolve symbol symbol : class MessagingException location: class MessageParser throws MessagingException, SQLException, FileNotFoundException, IOException, ParseException { ^ MessageParser.java:124: cannot resolve symbol symbol : class MessagingException location: class MessageParser throws MessagingException, SQLException, FileNotFoundException, IOException, ParseException ^ MessageParser.java:279: cannot resolve symbol symbol : class CLOB location: class MessageParser protected void copyInputStreamToClob(InputStream is, CLOB to) ^ MessageParser.java:301: cannot resolve symbol symbol : class BLOB location: class MessageParser public void copyInputStreamToBlob(InputStream is, BLOB to) ^ MessageParser.java:334: cannot resolve symbol symbol : class MessagingException location: class MessageParser throws MessagingException, SQLException, IOException ^ MessageParser.java:384: cannot resolve symbol symbol : class Part location: class MessageParser protected void dumpPart(int msgId, Part p, StringBuffer text, int[] partNumber) ^ MessageParser.java:385: cannot resolve symbol symbol : class MessagingException location: class MessageParser throws MessagingException, SQLException, IOException ^ MessageParser.java:37: cannot resolve symbol symbol : class Pg_Query location: class MessageParser st = new Pg_Query("subquery"); ^ MessageParser.java:130: cannot resolve symbol symbol : class InternetHeaders location: class MessageParser InternetHeaders ih = new InternetHeaders(is); ^ MessageParser.java:130: cannot resolve symbol symbol : class InternetHeaders location: class MessageParser InternetHeaders ih = new InternetHeaders(is); ^ MessageParser.java:143: cannot resolve symbol symbol : class BLOB location: class MessageParser BLOB body = new BLOB(lob_id,st); ^ MessageParser.java:143: cannot resolve symbol symbol : class BLOB location: class MessageParser BLOB body = new BLOB(lob_id,st); ^ MessageParser.java:187: cannot resolve symbol symbol : class Header location: class MessageParser Header h = (Header) headers.nextElement(); ^ MessageParser.java:187: cannot resolve symbol symbol : class Header location: class MessageParser Header h = (Header) headers.nextElement(); ^ MessageParser.java:196: cannot resolve symbol symbol : class InternetAddress location: class MessageParser InternetAddress[] addresses = InternetAddress.parse(value); ^ MessageParser.java:196: cannot resolve symbol symbol : variable InternetAddress location: class MessageParser InternetAddress[] addresses = InternetAddress.parse(value); ^ MessageParser.java:201: cannot resolve symbol symbol : class AddressException location: class MessageParser } catch (AddressException ae) { ^ MessageParser.java:243: cannot resolve symbol symbol : class InternetAddress location: class MessageParser InternetAddress[] recipients = InternetAddress.parse(value); ^ MessageParser.java:243: cannot resolve symbol symbol : variable InternetAddress location: class MessageParser InternetAddress[] recipients = InternetAddress.parse(value); ^ MessageParser.java:246: cannot resolve symbol symbol : class InternetAddress location: class MessageParser InternetAddress recipient = recipients[i]; ^ MessageParser.java:340: cannot resolve symbol symbol : variable Session location: class MessageParser s = Session.getDefaultInstance(props, null); ^ MessageParser.java:342: cannot resolve symbol symbol : class MimeMessage location: class MessageParser MimeMessage msg = new MimeMessage(s, is); ^ MessageParser.java:342: cannot resolve symbol symbol : class MimeMessage location: class MessageParser MimeMessage msg = new MimeMessage(s, is); ^ MessageParser.java:368: cannot resolve symbol symbol : class BLOB location: class MessageParser BLOB mimeText = null; ^ MessageParser.java:371: cannot resolve symbol symbol : class BLOB location: class MessageParser mimeText = new BLOB(lob_id,st); ^ MessageParser.java:398: cannot resolve symbol symbol : class Multipart location: package mail if (o instanceof javax.mail.Multipart) { ^ MessageParser.java:399: cannot resolve symbol symbol : class Multipart location: class MessageParser Multipart mp = (Multipart) o; ^ MessageParser.java:399: cannot resolve symbol symbol : class Multipart location: class MessageParser Multipart mp = (Multipart) o; ^ MessageParser.java:407: cannot resolve symbol symbol : class MimeMessage location: package internet if (o instanceof javax.mail.internet.MimeMessage) { ^ MessageParser.java:408: cannot resolve symbol symbol : class MimeMessage location: class MessageParser MimeMessage msg = (MimeMessage) o; ^ MessageParser.java:408: cannot resolve symbol symbol : class MimeMessage location: class MessageParser MimeMessage msg = (MimeMessage) o; ^ MessageParser.java:426: cannot resolve symbol symbol : class MessagingException location: class MessageParser } catch (MessagingException mex) { ^ MessageParser.java:453: cannot resolve symbol symbol : class BLOB location: class MessageParser BLOB b = new BLOB(data,st); ^ MessageParser.java:453: cannot resolve symbol symbol : class BLOB location: class MessageParser BLOB b = new BLOB(data,st); ^ MessageParser.java:470: cannot resolve symbol symbol : class BLOB location: class MessageParser BLOB b = new BLOB(data,st); ^ MessageParser.java:470: cannot resolve symbol symbol : class BLOB location: class MessageParser BLOB b = new BLOB(data,st); ^ Note: MessageParser.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 43 errors
can you help me?
1037 nsadmin@localhost:~/mirror/acs3-pg/www/webmail/java >export CLASSPATH=/home/nsadmin/bin/mail.jar:/home/nsadmin/bin/activation.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java:/home/nsadmin/bin/nsjava.jar
1038 nsadmin@localhost:~/mirror/acs3-pg/www/webmail/java >make
javac -g acspg/BLOB.java
javac -g acspg/CLOB.java
javac -g acspg/BlobDataSource.java
javac -g acspg/ClobDataSource.java
javac -g acspg/AttachmentsIter.java
javac -g acspg/HeadersIter.java
javac -g MessageComposer.java javac -g MessageParser.java Note: MessageParser.java uses a deprecated API. Recompile with "-deprecation" for details. 1 warning
Make sure that your have the mail.jar and activation.jar files in your classpath. Read the webmail.html file in the doc directory for more details about these jar files. You must also have the nsjava jar file and the www/webmail/java directory in your classpath to successfully compile.
04/Feb/2001:12:44:06][8354.11276][-sched:100-] Notice: Running scheduled proc wm_process_queue...
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: no nsjava in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at nsjava.NsLog.(NsLog.java:55)
at MessageParser.process_queue(MessageParser.java:506)
[04/Feb/2001:12:44:08][8354.11276][-sched:100-] Error: JavaEvalCmd: Java exception occured:
[04/Feb/2001:12:44:08][8354.11276][-sched:100-] Error: JavaEvalCmd: Java exception occured:
Args:
ns_java
-detach
MessageParser::process_queue
/home/nsadmin/servers/server1/qmail/queue/
[04/Feb/2001:12:44:08][8354.11276][-sched:100-] Notice: Done running scheduled proc wm_process_queue.
[04/Feb/2001:12:45:09][8354.12300][-sched:100-] Notice: Running scheduled proc wm_process_queue...
Exception in thread "Thread-1" java.lang.NoClassDefFoundError
at MessageParser.process_queue(MessageParser.java:506)
[04/Feb/2001:12:45:09][8354.12300][-sched:100-] Error: JavaEvalCmd: Java exception occured:
[04/Feb/2001:12:45:09][8354.12300][-sched:100-] Error: JavaEvalCmd: Java exception occured:
Args:
ns_java
-detach
MessageParser::process_queue
/home/nsadmin/servers/server1/qmail/queue/
ns_section "ns/server/${server}/module/nsjava" ns_param EnableJava "on" ;# Set to on to enable nsjava. ns_param VerboseJvm "off" ;# Same as command line -debug. ns_param LogLevel "Notice" ns_param DestroyJvm "off" ;# Destroy jvm on shutdown. ns_param DisableJITCompiler "off" ns_param ClassPath "/usr/local/jdk/jdk118_v1/lib/classes.zip:/home/nsadmin/bin/nsjava.jar:/home/nsadmin/bin/activation.jar:/home/nsadmin/bin/mail.jar:/home/nsadmin/mirror/acs3-pg/www/webmail/java"
this is my nsd.tcl:
.... ns_section "ns/server/${server}/modules"
ns_param nsjava libnsjava.so
ns_section "ns/server/${server}/module/nsjava"
ns_param EnableJava "off"
ns_param VerboseJvm "off"
ns_param DestroyJvm "off"
ns_param DisableJITCompiler "off"
ns_param LogLevel "notice"
ns_param ClassPath "/usr/local/j2sdk1.3.0/lib/tools.jar:/usr/local/j2sdk1.3.0/jre/lib/rt.jar:/usr/local/aolserver/bin/nsjava.jar:/usr/local/aolserver/bin/activation.jar:/usr/local/aolserver/bin/mail.jar:/web/server1/www/webmail/java/MessageParser.class:/web/server1/www/webmail/java/MessageComposer.class:/web/server1/www/webmail/java"
ns_param EnableJava "on"
My environment is as follows:
- Open ACS 3.2.4
- SuSE 7.0 linux (2.2.16)
- postgresql-7.0.3
- aolserver 3.2
- JRE 1.3
but then it just hangs.[04/Feb/2001:23:06:07][26072.1024][-main-] Notice: ModuleInit: Java Module ENABLED
If I set VerboseJvm to "on", then the last 10 log entries I get are as follows:
so it appears to hang at java/lang/ThreadLocal.[Preparing java/util/Collections$EmptyMap] [Loaded java.util.Collections$ReverseComparator from /usr/lib/jre1.3/jre/lib/rt. jar] [Loading superclasses of java/util/Collections$ReverseComparator] [Preparing java/util/Collections$ReverseComparator] [Loaded java.lang.InheritableThreadLocal from /usr/lib/jre1.3/jre/lib/rt.jar] [Loading superclasses of java/lang/InheritableThreadLocal] [Loaded java.lang.ThreadLocal from /usr/lib/jre1.3/jre/lib/rt.jar] [Loading superclasses of java/lang/ThreadLocal] [Preparing java/lang/ThreadLocal]
I compiled using the instructions for CLASSPATH and LD_LIBRARY_PATH in the various postings I've seen to date. I found that I had to add /usr/lib/jre1.3/jre/bin and /usr/lib/jre1.3/jre/bin/classic (the latter is for libjvm.so) to LD_LIBRARY_PATH in my nsd startup environment, and that seems to have taken care of the missing libraries problem.
Also, here's the relevant entries from my nsd.tcl file:
Any ideas what could be causing this to hang? (Need any more info?)ns_section "ns/server/${server}/modules" ns_param nsjava ${bindir}/libnsjava.so ns_section "ns/server/${server}/module/nsjava" ns_param EnableJava "on" ns_param VerboseJvm "off" ns_param LogLevel "Notice" ns_param DestroyJvm "off" ns_param DisableJITCompiler "off" ns_param ClassPath "/usr/lib/jre1.3/jre/lib/rt.jar:/usr/lib/jre1.3/jre/lib/tools.jar:/web/ruchirasala/www/webmail/java:/usr/local/aolserver/bin/nsjava.jar:/usr/local/aolserver/bin/mail.jar:/usr/local/aolserver/bin/activation.jar"
[05/Feb/2001:12:17:51][4663.1024][-main-] Notice: modload: loading '/usr/local/aolserver/bin/libnsjava.so'I think the error is in ..nsjava/NsLog.java:
[05/Feb/2001:12:17:52][4663.1024][-main-] Notice: ModuleInit: Java Module ENABLED
[05/Feb/2001:12:17:55][4663.1024][-main-] Notice: ModuleInit: JVM init succeeded!
[05/Feb/2001:12:18:59][4663.14350][-sched:100-] Notice: Running scheduled proc wm_process_queue...
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: no nsjava in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at nsjava.NsLog.(NsLog.java:55)
at MessageParser.process_queue(MessageParser.java:506)
System.LoadLibrary("nsjava")What do you think?
http://java.sun.com/j2se/1.3/docs/api/java/lang/ClassLoader.html#findLibrary(java.lang.String)
protected String findLibrary(String libname)
Returns the absolute path name of a native library. The VM invokes this method to locate the native libraries
that belong to classes loaded with this class loader.
If this method returns null, the VM searches the library
along the path specified as the java.library.path property.
Parameters:
libname - the library name
Returns:
the absolute path of the native library
Since:
1.2
See Also:
System.loadLibrary(java.lang.String),
System.mapLibraryName(java.lang.String)
The System.LoadLibrary command is correct. It's trying to find a library called libnsjava.so, and it's not succeding. How are your starting aolserver? You need to make sure that the LD_LIBRARY_PATH environment variable is set so that libnsjava.so is included in the library path prior to starting aolserver. Try starting the server in the foreground:
cd /usr/local/aolserver
export LD_LIBRARY_PATH=/usr/local/aolserver/bin:$LD_LIBRARY_PATH
bin/nsd -fkt nsd.tcl
What it the vendor for your jdk?
As far as I can tell your configuration looks correct, but I have to warn you that I have never tested with 1.3 jdk's. On linux I've tested with 1.1 and 1.2 jdk's, and of all the jdk's that I tested with only the 1.1.8 jdk from Blackdown gave acceptable results on linux. See the test summary at http://nsjava.sourceforge.net for more details. This warning also applies to Claudio, but he appears to be really close to getting it working.
I just realized that you're using a jre instead of a jdk. That won't work, as any jni application such as nsjava requires a jdk.
now it work well!