First version of JK2 Domino connector and more questions about JNI-mode

2003-01-03 Thread olaf . hahnl

I am leaving for a one week holiday and wanted to share the first
beta-version of the JK2 Domino connector with you.

I am not familiar with the Apache coding guidlines etc., it is just for you
who are interested in this and are more experienced than I am, to have a
look at the code, and to comment on it. There are some parts where I am not
sure about the function which I marked with a comment and some ???. Most of
it I mentioned in my first mail to this list.

To compile it without having the Domino C-API, one have to define the
symbol NO_CAPI.


I just tested it with JNI mode, which I need for my own projects and
discoverd a few things/problems I like to mention here. I am not sure if
these are specific to flaws in my code or to misconfiguration of the
config-file (see below) or to the way the JNI-mode works. First of all, all
the servlet and JSP examples provided with TC worked quite well. Because of
the problems with JNI-mode and Domino 6 (see my last few mails) I solely
worked with Domino 5.0.11 on Windows, but in the future the filter should
also work under Linux etc.

Then I tested one of my own web-apps and got astonishing results, nothings
works! I was able to reduce the problem to the following configuration: In
a simple servlet I tried to set up commons-logging 1.0.2 to work together
with log4j 1.2.7. I could not achive this in JNI mode and always got this
error

java.lang.NoClassDefFoundError: org/apache/log4j/Layout
  at
org.apache.commons.logging.impl.Log4jFactory.getInstance(Log4jFactory.java:153)
  at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:285)
  at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409)
  at TestServlet.clinit(TestServlet.java:23)

Commons-logging and log4j are only in the web-app's lib-directory. To make
it worse the same thing is working as expected without any modifications
when TC is started as a seperate process using the startup batch file and
accessed using HTTP1.1 connector. Log4j alone work quite a nice as well and
using the old JK connector it also works quite well.

My thought is that it has something to do with classloaders and/or the VM
is intialized with different options. As I looked for the system-properties
I saw that they are quite dfferent in the two situations. Any thoughts
regarding this problem?

My workers2.properties lookes like this for the VM initialization

[vm:]
info=Parameters used to load a JVM in the server process
OPT=-Djava.class.path=${CATALINA_HOME}/bin/tomcat-jni.jar;
OPT=-Djava.io.tmpdir=${CATALINA_HOME}/temp
OPT=-Dcatalina.home=${CATALINA_HOME}
OPT=-Duser.dir=${CATALINA_HOME}/bin
OPT=-Xmx128M

Comments on both issues are welcome!

Olaf

(See attached file: dsapi2.zip)



dsapi2.zip
Description: Zip archive
--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]


RE: First version of JK2 Domino connector and more questions about JNI-mode

2003-01-03 Thread Mladen Turk
 -Original Message-
 From: [EMAIL PROTECTED] 

Great news!

 
 My workers2.properties lookes like this for the VM initialization
 
 [vm:]
 info=Parameters used to load a JVM in the server process 
 OPT=-Djava.class.path=${CATALINA_HOME}/bin/tomcat-jni.jar;

Try using the folwing instead OPT=-Djava.class.path=

classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar
classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar 


 
 (See attached file: dsapi2.zip)


Can DSAPI be tested with Domino 6 trial version?

MT.
 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: First version of JK2 Domino connector and more questions about JNI-mode

2003-01-03 Thread olaf . hahnl

Mladen Turk [EMAIL PROTECTED] wrote on 03.01.2003 13:00:15:


 Great news!

 
  My workers2.properties lookes like this for the VM initialization
 
  [vm:]
  info=Parameters used to load a JVM in the server process
  OPT=-Djava.class.path=${CATALINA_HOME}/bin/tomcat-jni.jar;

 Try using the folwing instead OPT=-Djava.class.path=

 classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar
 classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar

Do you mean in the workers2.properties like this

[vm:]
info=Parameters used to load a JVM in the server process
classpath=${TOMCAT_HOME}/bin/tomcat-jni.jar
classpath=${TOMCAT_HOME}/server/lib/commons-logging.jar

or in the system-environment? I will try this when I am back.

 Can DSAPI be tested with Domino 6 trial version?


As far as I know, there should be no problem with this, but I am not sure
what the limitation of the trial version is or if there is a technical
limitation at all or just a license issue.

But be reminded to the jvm problem I have with Domino 6, but perhaps you
are able to include the suggested fix/code to attach to an already running
jvm or test other connection methods.

If there are questions fell free to ask. I like to hear news when I am back
from the short holiday.

 MT.

Olaf



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]