Domino 运行在 AIX5.2上 and Batch file writing

Domino 运行在 AIX5.2上
我建立一个java的agent,设定成’on schedule’ 和 ‘run on server’
这个agent会运行AIX上的一个.sh脚本,这个shell脚本的最后会运行另一个java程序,这第二个java程序用到domino的api,对domino的数据库进行了操作。
但是,在这第二个java程序运行的过程里,我让他输出到文件,输出的信息如下:
输出信息——————-start
Attempting session creation…

Session Creation Successful…

Accessing database : sample.nsf

Accessing database Successful..
This process “java” is unable to map the required amount of shared memory – mm=-1879048192, at=268435456  . Please refer to the documentation on how to fix this.
输出信息——————-end

我做了另一个试验,双击或在命令行直接运行.sh文件,让它去掉用第二个java,结果是可以运行,没有给出上面的错误信息。也就是说,目前看到的现象是,只有通过Domino去调第二个java的时候才会出这个错误

我上网查了一下,找到两种解决方法:
1。用Domino自带的dataseg把java的share memory设定成Domino所要求的默认值,但是没有效果,报同样的错。
网上有人使用第一种方式不可行,于是找了第二种方法:
2. 一般情况下是调用server来启动domino,而现在对于这种情况,则执行一个Domino (版本7.0.1)的启动脚本,名字是ststart,但是我用的Domino6.0,没有找到这个同名的脚本。
但是,我找到一个叫做startup,以notes.ini为参数运行。但是启动时,startup报说我给的默认的notes.ini有语法错。但问题是这个notes.ini就是平常调用server所用的,没有修改过。为何不可以运行?

下面是哪个sh文件里的内容,前面是设定一些环境变量
后面会调用第二个java

sh文件内容—————————————start
#
# Copyright (c) 2001-2007 TIBCO Software Inc.
#
# This is only an example for your reference. Please modify this

# Specify the Lotus Notes Home
#set NOTES_INSTALLATION_HOME=/adapters/adlotus/tem/
#NO_HOME=/adapters/adlotus/tibco
NO_HOME=/adapters/adln/lotus6.5/lotus/notes/latest/ibmpow
#echo
#echo “step_00: NO_HOME = $NO_HOME”

# Specify the Notes Jar Location
#NJ_LOC=/adapters/adlotus/LNjars
NJ_LOC=/adapters/adln/lotus6.5/lotus/notes/65000/ibmpow

# Specify the NCSO Jar Location
#set NCSO_JAR_LOCATION=/adapters/adlotus/lotusJar/
#NCJ_LOC=/adapters/adlotus/LNjar
NCJ_LOC=/adapters/adln/lotus6.5/notesdata/domino/java
#echo
#echo “step_01: NJ_LOC = $NJ_LOC, and NCJ_LOC = $NCJ_LOC”

# Specify the TIBCO Home
#set TIBCO_HOME=/adapters/adlotus/tibco/
T_HOME=/adapters/adln/tibco
#echo
#echo “step_02: T_HOME = $T_HOME”

# Setting the TIBCO Java HomeLD_LIBRARY_PATH
#set TIBCO_JAVA_HOME=’$TIBCO_HOME/jre/1.4.2′
TJ_HOME=$T_HOME/jre/1.4.2
#echo
#echo “step_03: TJ_HOME = $TJ_HOME”

# Setting the TIBRV Home
#set TIBCO_RV_HOME=%TIBCO_HOME%/tibrv
TRV_HOME=$T_HOME/tibrv
#echo
#echo “step_04: T_HOME/tibrv = $TRV_HOME”

# Setting the PATH
#PATH=$NJ_LOC:$NCJ_LOC:/adapters/adlotus/lotus7.0/lotus/notes/latest/sunspa:$TJ_HOME/bin:$TRV_HOME/lib:/adapters/adlotus/lotus7.0/notesdata/domino/java:/adapters/adlotus/lotus7.0/lotus/notes/70000/sunspa/jvm/lib/ext:$PATH
PATH=/usr/java14/jre/bin:/adapters/adln/tibco/jre/1.4.2/bin:$NO_HOME:$NJ_LOC:$NJ_LOC/Notes.jar:$NCJ_LOC:$NCJ_LOC/NCSO.jar:$TJ_HOME/bin:$TRV_HOME:$TRV_HOME/lib:/adapters/adln/lotus6.5/notesdata/domino/java:/adapters/adln/tem:$PATH
export PATH
#echo
#echo “step_05: PATH = $PATH”

# Setting the CLASSPATH
#set CLASSPATH=%NOTES_JAR_LOCATION%/Notes.jar;%NCJ_LOC/NCSO.jar;%TRV_HOME/lib/tibrvj.jar;%NOTES_INSTALLATION_HOME%;%CLASSPATH%
#CLASSPATH=$NO_HOME:$NJ_LOC/Notes.jar:$NCJ_LOC/NCSO.jar:$TRV_HOME/lib:$TRV_HOME/lib/tibrvj.jar:/adapters/adln/lotus6.5/notesdata/domino/java:$CLASSPATH
#                    “/adapters/adlotus/lotus7.0/lotus/notes/latest/sunspa:$NJ_LOC/Notes.jar:$NCJ_LOC/NCSO.jar:$TRV_HOME/lib/tibrvj.jar:$NO_HOME:$LD_LIBRARY_PATH”
CLASSPATH=/adapters/adln/tibco/jre/1.4.2/lib:$NO_HOME:$NJ_LOC:$NJ_LOC/Notes.jar:$NCJ_LOC:$NCJ_LOC/NCSO.jar:$TJ_HOME/lib:$TRV_HOME/lib:$TRV_HOME/lib/tibrvj.jar:/adapters/adln/lotus6.5/notesdata/domino/java:/adapters/adln/tem:$LIBPATH
export CLASSPATH
#echo
#echo “step_06: CLASSPATH = $CLASSPATH”

#————————————-
#specifies the class paths for different operating system’s to be added
#For Sun Solaris and Linux: Setting the LD_LIBRARY_PATH
#LD_LIBRARY_PATH=/adapters/adlotus/lotus7.0/lotus/notes/latest/sunspa:$NJ_LOC/Notes.jar:$NCJ_LOC/NCSO.jar:$TRV_HOME/lib:$TRV_HOME/lib:$NO_HOME:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/adapters/adln/tibco/jre/1.4.2/lib:$NO_HOME:$NJ_LOC:$NJ_LOC/Notes.jar:$NCJ_LOC:$NCJ_LOC/NCSO.jar:$TJ_HOME/lib:$TRV_HOME:$TRV_HOME/lib:$TRV_HOME/lib/tibrvj.jar:/adapters/adln/lotus6.5/notesdata/domino/java:/adapters/adln/tem:$LIBPATH
export LD_LIBRARY_PATH
#echo
#echo “step_07: LD_LIBRARY_PATH = $LD_LIBRARY_PATH”

#For AIX: Setting the LIBPATH
#LIBPATH=%RV_HOME%/lib%PSP%%JVM_LIB_DIR%/classic%PSP%%JVM_LIB_DIR%%PSP%%CUSTOM_LIB_PATH%%PSP%%TIB_ADLN_HOME%/hotfix/lib%PSP%%TIB_ADLN_HOME%/lib%PSP%%TRA_HOME%/hotfix/lib%PSP%%TRA_HOME%/lib%PSP%%TRA_HOME%/icjava55/lib%PSP%%TPCL_HOME%/lib
#LIBPATH=$NO_HOME:$NJ_LOC/Notes.jar:$NCJ_LOC/NCSO.jar:$TRV_HOME/lib:$TRV_HOME/lib/tibrvj.jar:$LIBPATH
LIBPATH=/adapters/adln/tibco/jre/1.4.2/lib:$NO_HOME:$NJ_LOC:$NJ_LOC/Notes.jar:$NCJ_LOC:$NCJ_LOC/NCSO.jar:$TJ_HOME/lib:$TRV_HOME:$TRV_HOME/lib:$TRV_HOME/lib/tibrvj.jar:/adapters/adln/lotus6.5/notesdata/domino/java:/adapters/adln/tem:$LIBPATH
#LIBPATH=$NO_HOME:$NJ_LOC/Notes.jar:$NCJ_LOC/NCSO.jar:$TRV_HOME/lib:$TRV_HOME/lib/tibrvj.jar:/adapters/adln/lotus6.5/notesdata/domino/java:$LIBPATH
export LIBPATH
#echo
#echo “step_08: LIBPATH = $LIBPATH”
#————————————-

# Specify the connection parameters
DOMINO_HOST=192.168.65.57
DB_NAME=sample.nsf
DB_USERNAME=adln
DB_PASSWORD=asdfzxcv

#echo “$DOMINO_HOST,$DB_NAME,$DB_USERNAME,$DB_PASSWORD”

#bihao for test: see which java we are using
echo “big test”
type java

# running the SendRvMsgPub.class file
#java rv_agents.SendRvMsgPub -server $DOMINO_HOST -database $DB_NAME -user $DB_USERNAME -password $DB_PASSWORD
java rv_agents.SendRvMsgPub -server $DOMINO_HOST -database $DB_NAME -user $DB_USERNAME -password $DB_PASSWORD > /adapters/adln/tem/test.txt |type java

echo “bihao test:OK!!!”

sh文件内容—————————————end

发表评论

Fill in your details below or click an icon to log in:

WordPress.com 徽标

您正在使用您的 WordPress.com 账号评论。 登出 /  更改 )

Google photo

您正在使用您的 Google 账号评论。 登出 /  更改 )

Twitter picture

您正在使用您的 Twitter 账号评论。 登出 /  更改 )

Facebook photo

您正在使用您的 Facebook 账号评论。 登出 /  更改 )

Connecting to %s


%d 博主赞过: