How to Install or Run on Windows Xp/7 - NoSQL Database

Hi, I just see the bin/kvctl for Linux.
How to Install o Run on Windows ? 

Presently, Windows is not a supported platform for NoSQL Database so we do not have a Windows-compatible kvctl script. However, since NoSQL Database is written in Java, it is likely that you can still run it under Windows. I suggest that you use the -verbose option to kvctl on Linux and let it print out the actual "java ..." command that it is executing. You can then cut-and-paste that command (with suitable edits as necessary) into a Windows command line.
Charles 

It works well at my Windows XP workstation. I use gygwin to run kvctl. The only one issue with running these scripts under cygwin is CLASSPATH. You may need to fix script to get CLASSPATH env variable correct. 

Sergey,
Thanks for this. We're aware of the issue on Cygwin and the required fixes. If you want a cygwin-specific kvctl edit the script and modify the setclasspath() function to read:
CLASSPATH=`cygpath -wp $CLASSPATH:$KVINSTALL/lib/$KVSTOREJAR`
export CLASSPATH
The actual fix will be conditional and work on other platforms as well.
George
It works well at my Windows XP workstation. I use gygwin to run kvctl. The only one issue with running these scripts under cygwin is CLASSPATH. You may need to fix script to get CLASSPATH env variable correct. 

Any chance any linux/windows users can convert the run-kvlite.sh to a Windows bat file? (see below) It would be nice to play with kvlite on Windows. Also, any idea if configuration and running on Windows will be officially supported in future by Oracle?
#!/bin/bash
# find directory where the script was found
HERE=`pwd`
cd `dirname $0`
export BINDIR=`pwd`
cd $HERE
export LIBDIR=$BINDIR/../lib
export EXAMPLEDIR=$BINDIR/../examples
function usage {
echo 'Usage: run-kvlite.sh [-help]'
echo ' [-logging]'
echo ' [-store storeName]'
echo ' [-port port]'
echo ' [-host hostname]'
echo ' [-root rootDir]'
echo ' [-admin adminPort]'
echo ' -logging enables console logging'
echo ' -store defaults to kvstore'
echo ' -port defaults to 5000'
echo ' -host defaults to localhost'
echo ' -root defaults to ./kvroot and is created on demand'
}
export KVSTORE=kvstore
export HOSTNAME=127.0.0.1
export REGPORT=5000
export KVROOT=./kvroot
LOGGING=""
ADMINPORT=""
for arg
do
case "$arg" in
-usage)
     usage
     exit;;
-help)
     usage
     exit;;
-logging)
     LOGGING="-Djava.util.logging.config.file=$EXAMPLEDIR/logging.properties";
     shift;;
-store)
     KVSTORE=$2; shift;
     shift;;
-host)
     HOSTNAME=$2; shift;
     shift;;
-root)
     KVROOT=$2; shift;
     shift;;
-port)
REGPORT=$2; shift;
shift;;
-admin)
     ADMINPORT="-admin $2"; shift;
     shift;;
esac
done
if [[ -n "${KVROOT}" ]] ; then
mkdir -p $KVROOT
fi
java $LOGGING -cp $LIBDIR/kvstore-1.1.100.jar oracle.kv.util.kvlite.KVLite -root $KVROOT -store $KVSTORE -host $HOSTNAME -port $REGPORT $ADMINPORT 

The actual command to invoke kvlite is pretty simple. From the bottom of the kvlite script:
java $LOGGING -cp $LIBDIR/kvstore-1.1.100.jar oracle.kv.util.kvlite.KVLite -root $KVROOT -store $KVSTORE -host $HOSTNAME -port $REGPORT $ADMINPORT
Here is a .cmd file that you can use (it's not supported). Some of our developers run on Windows but it is not a supported platform since we don't run our qualification tests on it. It's Java code, so in theory, "it should just work".
#ECHO OFF
CLS
SET RETURN_CODE=
SETLOCAL
echo %~dp0
SET HERE=%CD%
SET BINDIR=%~dp0
cd %HERE%
SET LIBDIR=%BINDIR%\..\lib
SET EXAMPLEDIR=%BINDIR%\..\examples
SET KVSTORE=kvstore
SET HOSTNAME=127.0.0.1
SET REGPORT=5000
SET KVROOT=kvroot
SET LOGGING=
SET ADMINPORT=
setlocal enabledelayedexpansion
:LOOP_ARGS
SET ARGNAME=%1
SET ARGVALUE=%2
IF NOT "%1"=="" (
IF "%ARGNAME%"=="-store" (
SET KVSTORE=%ARGVALUE%
SHIFT
SHIFT
) ELSE (
IF "%ARGNAME%"=="-port" (
SET REGPORT=%ARGVALUE%
SHIFT
SHIFT
) ELSE (
IF "%ARGNAME%"=="-root" (
SET KVROOT=%ARGVALUE%
SHIFT
SHIFT
) ELSE (
IF "%ARGNAME%"=="-host" (
SET HOSTNAME=%ARGVALUE%
SHIFT
SHIFT
) ELSE (
IF "%ARGNAME%"=="-admin" (
SET ADMINPORT=-admin %ARGVALUE%
SHIFT
SHIFT
) ELSE (
IF "%ARGNAME%"=="-logging" (
SET LOGGING=-Djava.util.logging.config.file=%EXAMPLEDIR%
/logging.properties
SHIFT
) ELSE (
IF "%ARGNAME%"=="-usage" (
call:USAGE
GOTO:end
) ELSE (
IF "%ARGNAME%"=="-help" (
call:USAGE
GOTO:end
)
)
)
)
)
)
)
)
GOTO LOOP_ARGS
)
IF NOT EXIST %KVROOT% (
MKDIR %KVROOT%
)
echo Store "%KVSTORE%" starting ...
java %LOGGING% -cp %LIBDIR%/kvstore-1.1.100.jar oracle.kv.util.kvlite.KVLite -root %KVROOT% -store %KVSTORE% -host %HOSTNAME% -port %REGPORT% %ADMINPORT%
echo.&goto:eof
::--------------------------------------------------------
::-- Usage Function
::--------------------------------------------------------
:USAGE
echo Usage: run-kvlite.sh [-help]
echo [-logging]
echo [-store storeName]
echo [-port port]
echo [-host hostname]
echo [-root rootDir]
echo [-admin adminPort]
echo -logging enables console logging
echo -store defaults to kvstore
echo -port defaults to 5000
echo -host defaults to localhost
echo -root defaults to ./kvroot and is created on demand
:end 

Hi: I finally installed Nosql, compiled example\schema, added ddl and when running the class get the error: D:\nosql\kv-2.0.39>java -jar lib/kvstore.jar ping -host xxx -port 5000Pinging components of store kvstore based upon topology sequence #14kvstore comprises 10 partitions and 1 Storage NodesStorage Node [sn1] on xxx:5000    Datacenter: KVLite [dc1]    Status: RUNNING   Ver: 11gR2.2.0.39 2013-04-23 08:28:13UTC  Build id: b205fb13eb4e        Rep Node [rg1-rn1]      Status: RUNNING,MASTER at sequence number: 57 haPort: 5006  D:\nosql\kv-2.0.39>java -jar D:/nosql/kv-2.0.39/lib/kvclient.jar11gR2.2.0.39  D:\nosql\kv-2.0.39>cd D:\nosql\kv-2.0.39\examples\schema\classes  D:\nosql\kv-2.0.39\examples\schema\classes>java schema.SchemaExample -store kvstore -host localhost -port 5000java.lang.NullPointerException        at schema.Bindings.parseResource(Bindings.java:82)        at schema.Bindings.<init>(Bindings.java:54)        at schema.SchemaExample.<init>(SchemaExample.java:183)        at schema.SchemaExample.main(SchemaExample.java:134)  D:\nosql\kv-2.0.39\examples\schema\classes>java -versionjava version "1.7.0_10"Java(TM) SE Runtime Environment (build 1.7.0_10-b18)Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)  D:\nosql\kv-2.0.39\examples\schema\classes> Please help. Should I start a different thread?

Related

startserv is not working

When I try to run domains/creator/bin/startserv, it just hangs. The end of the server log file looks like this:
-Dcom.sun.aas.instanceName=server
-Dcom.sun.aas.processLauncher=SE
-cp
/home/doug/sun/Creator2_1/java/lib/tools.jar:/home/doug/sun/Creator2_1/SunAppSer
ver8/lib/appserv-rt.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/smbase.jar:/
home/doug/sun/Creator2_1/SunAppServer8/lib/j2ee_zh_CN.jar:/home/doug/sun/Creator
2_1/SunAppServer8/lib/appserv-rt_ja.jar:/home/doug/sun/Creator2_1/SunAppServer8/
lib/admin-cli.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-rt_ko.jar:
/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-env.jar:/home/doug/sun/Creat
or2_1/SunAppServer8/lib/saaj-impl.jar:/home/doug/sun/Creator2_1/SunAppServer8/li
b/jmxremote_optional.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-rt_
zh_CN.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/dom.jar:/home/doug/sun/Cre
ator2_1/SunAppServer8/lib/appserv-cmp_ko.jar:/home/doug/sun/Creator2_1/SunAppSer
ver8/lib/deployhelp_zh.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/jmxremote
.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/j2ee_fr.jar:/home/doug/sun/Crea
tor2_1/SunAppServer8/lib/commons-launcher_zh_CN.jar:/home/doug/sun/Creator2_1/Su
nAppServer8/lib/appserv-cmp_ja.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/d
eployhelp_zh_CN.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/commons-launcher
zh.jar:/home/doug/sun/Creator21/SunAppServer8/lib/smutil.jar:/home/doug/sun/Cr
eator2_1/SunAppServer8/lib/commons-launcher_ja.jar:/home/doug/sun/Creator2_1/Sun
AppServer8/lib/smsybase.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/smoracle
.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-assemblytool_ko.jar:/ho
me/doug/sun/Creator2_1/SunAppServer8/lib/commons-launcher_ko.jar:/home/doug/sun/
Creator2_1/SunAppServer8/lib/jsf-api.jar:/home/doug/sun/Creator2_1/SunAppServer8
/lib/appserv-assemblytool_zh.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/jax
-qname.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/j2ee_ko.jar:/home/doug/su
n/Creator2_1/SunAppServer8/lib/appserv-cmp_es.jar:/home/doug/sun/Creator2_1/SunA
ppServer8/lib/appserv-cmp.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/j2ee.j
ar:/home/doug/sun/Creator2_1/SunAppServer8/lib/deployhelp_es.jar:/home/doug/sun/
Creator2_1/SunAppServer8/lib/smsqlserver.jar:/home/doug/sun/Creator2_1/SunAppSer
ver8/lib/xsdlib.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/commons-logging.
jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/jsf-impl.jar:/home/doug/sun/Crea
tor2_1/SunAppServer8/lib/PEtray.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/
appserv-assemblytool_fr.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/smresour
ce.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/smspy.jar:/home/doug/sun/Crea
tor2_1/SunAppServer8/lib/activation.jar:/home/doug/sun/Creator2_1/SunAppServer8/
lib/appserv-rt_es.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-cmp_zh
.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/jaxrpc-impl.jar:/home/doug/sun/
Creator2_1/SunAppServer8/lib/deployhelp_ko.jar:/home/doug/sun/Creator2_1/SunAppS
erver8/lib/driveradapter.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/smdb2.j
ar:/home/doug/sun/Creator2_1/SunAppServer8/lib/j2ee_zh.jar:/home/doug/sun/Creato
r2_1/SunAppServer8/lib/relaxngDatatype.jar:/home/doug/sun/Creator2_1/SunAppServe
r8/lib/j2ee_es.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/saaj-api.jar:/hom
e/doug/sun/Creator2_1/SunAppServer8/lib/jaxr-api.jar:/home/doug/sun/Creator2_1/S
unAppServer8/lib/rmissl.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/sminform
ix.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/commons-launcher.jar:/home/do
ug/sun/Creator2_1/SunAppServer8/lib/mail.jar:/home/doug/sun/Creator2_1/SunAppSer
ver8/lib/appserv-ext.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/j2ee-svc.ja
r:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-upgrade.jar:/home/doug/sun
/Creator2_1/SunAppServer8/lib/xalan.jar:/home/doug/sun/Creator2_1/SunAppServer8/
lib/appserv-assemblytool_es.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/comm
ons-launcher_fr.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/deployhelp_ja.ja
r:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-assemblytool_zh_CN.jar:/ho
me/doug/sun/Creator2_1/SunAppServer8/lib/appserv-rt_fr.jar:/home/doug/sun/Creato
r2_1/SunAppServer8/lib/commons-launcher_es.jar:/home/doug/sun/Creator2_1/SunAppS
erver8/lib/jaxrpc-api.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/deployhelp
fr.jar:/home/doug/sun/Creator21/SunAppServer8/lib/appserv-cmp_zh_CN.jar:/home/
doug/sun/Creator2_1/SunAppServer8/lib/appserv-assemblytool_ja.jar:/home/doug/sun
/Creator2_1/SunAppServer8/lib/appserv-admin.jar:/home/doug/sun/Creator2_1/SunApp
Server8/lib/j2ee_ja.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/xercesImpl.j
ar:/home/doug/sun/Creator2_1/SunAppServer8/lib/jdic_0_9.jar:/home/doug/sun/Creat
or2_1/SunAppServer8/lib/appserv-rt_zh.jar:/home/doug/sun/Creator2_1/SunAppServer
8/lib/jaxr-impl.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-jstl.jar
:/home/doug/sun/Creator2_1/SunAppServer8/lib/appserv-cmp_fr.jar:/home/doug/sun/C
reator2_1/SunAppServer8/lib/install/applications/jmsra/imqjmsra.jar:/home/doug/s
un/Creator2_1/SunAppServer8/imq/lib/jaxm-api.jar:/home/doug/sun/Creator2_1/SunAp
pServer8/imq/lib/fscontext.jar:/home/doug/sun/Creator2_1/SunAppServer8/lib/ant/l
ib/ant.jar
com.sun.rave.tray.RavePEMain
start|#]
Here's my startserv script:
#!/bin/sh
#set -x
# Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Sample script for launching S1AS Server using the Launcher
# Resolve links - $0 may be a softlink
PRG="$0"
ASENV_CONF_LOCATION=/home/doug/sun/Creator2_1/SunAppServer8/config
SERVER_NAME=server
DOMAIN_NAME=creator
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
# Get standard environment variables
PRGDIR=`dirname "$PRG"`
# echo "PRGDIR => $PRGDIR"
if [ -r "$ASENV_CONF_LOCATION/asenv.conf" ]; then
. "$ASENV_CONF_LOCATION/asenv.conf"
fi
INSTANCE_ROOT=/home/doug/sun/Creator2_1/SunAppServer8/domains/creator
JAVA_HOME="$AS_JAVA"
# Make sure prerequisite environment variables are set
if [ -z "$JAVA_HOME" ]; then
echo "The JAVA_HOME environment variable is not defined"
echo "This environment variable is needed to run this program"
exit 1
fi
LD_LIBRARY_PATH="$AS_INSTALL/lib":/usr/lib/lwp:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
cd "$INSTANCE_ROOT/config"
#check to see if native launcher to be used
if [ "$1" = native ]
then
     shift
     # add in lib where libjvm exists
     #LD_LIBRARY_PATH=${AS_JAVA}${AS_NATIVE_LAUNCHER_LIB_PREFIX}:$LD_LIBRARY_PATH
     #export LD_LIBRARY_PATH
     
     #execute native command that will recall this script with display option
     "$AS_INSTALL/lib/appservLauncher" "$AS_INSTALL/lib/appserv" "\"$INSTANCE_ROOT/bin/startserv\" display $#"
     exit
fi
# Execute the Launcher using the "s1as-server" target
#"$JAVA_HOME"/bin/java -classpath "$AS_INSTALL/lib":"$AS_INSTALL/lib/commons-launcher.jar":"$AS_INSTALL/lib/appserv-admin.jar":"$AS_INSTALL/lib/appserv-rt.jar":"$AS_ANT_LIB/ant.jar":"$AS_ANT_LIB/optional.jar":"$AS_INSTALL/lib/endorsed/xercesImpl.jar":"$AS_INSTALL/lib/endorsed/xalan.jar" -Dcom.sun.aas.antLib="$AS_ANT_LIB" -Dcom.sun.aas.installRoot="$AS_INSTALL" -Dcom.sun.aas.instanceRoot="$INSTANCE_ROOT" -Dcom.sun.aas.configRoot="$ASENV_CONF_LOCATION" LauncherBootstrap s1as-server -DJAVA_HOME="$JAVA_HOME" -Dcom.sun.aas.instanceName="$SERVER_NAME" -Ddomain.name="$DOMAIN_NAME" -DCATALINA_OPTS="$CATALINA_OPTS" start "${#}"
# set hold flag to the value handed into the script
HOLD_FLAG=return;
#executing launcher
"$JAVA_HOME"/bin/java -cp "$AS_INSTALL/lib/appserv-rt.jar":"$AS_INSTALL/lib/appserv-admin.jar":"$AS_INSTALL/lib/j2ee.jar" -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Dcom.sun.aas.installRoot="$AS_INSTALL" -Dcom.sun.aas.instanceRoot="$INSTANCE_ROOT" -Dcom.sun.aas.configRoot="$ASENV_CONF_LOCATION" -DJAVA_HOME="$JAVA_HOME" -Dcom.sun.aas.instanceName="$SERVER_NAME" -Ddomain.name="$DOMAIN_NAME" -DCATALINA_OPTS="$CATALINA_OPTS" -Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager -Dcom.sun.aas.launcherReturn="$HOLD_FLAG" -Dcom.sun.aas.processName="s1as8-server" -Dcom.sun.aas.processLauncher="SE" -Dcom.sun.aas.promptForIdentity="true" com.sun.enterprise.tools.launcher.ProcessLauncher start "${#}" 
Hi!
Did You try to start application server with $Creator_Dir/bin/pe-start.sh script? Is result the same?
Thanks,
Roman. 
Thanks, I didn't know about pe-start.sh
The problem is that I'm trying to start the application server from a linux startup script. Pe-start.sh gives this error in server.log:
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at sun.java2d.HeadlessGraphicsEnvironment.getScreenDevices(HeadlessGraphicsEnvironment.java:60)
at com.sun.rave.tray.RavePEMain.main(RavePEMain.java:26) 
Hi!
I'm glad that You resolve your problem.
Thanks,
Roman.

Add java application as service

Hi
I'm developing simple transaction switch using java socket programming and running operating system RHEL5.4 . Now it is completely done and working fine. So have written the simple shell script to run it on background.
runr.sh
#!/bin/sh
#runr.sh
Today=$(date +%F)
sh /opt/EpicTle/tle/run.sh >/root/.epicline/logs/debug/$Today.console.out 2>&1 & where run.sh
#!/bin/sh
export JAVA_HOME=/opt/EpicTle/java1.6
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$PATH:/opt/PTK/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/PTK/lib
export MANPATH=$MANPATH:/opt/PTK/man/man1
export TLE_HOME=/root/les
export PATH=$TLE_HOME/config:$TLE_HOME/run:$PATH
cd /opt/EpicTle/tle
java -jar -Xms500M -Xmx1500M  epictle.jarWhen I run 'runr.sh', actually it will run on background and server will response correctly.
Now I wanted to run it as linux service, so Again I wort the shell script which put it into etc/init.d
This is my starting shell script
epict
#!/bin/sh
#
# epict        Starts the epict Daemon
#
# chkconfig:   2345 25 88
# description:Epic_TLE is the server which can be applied for a banking system
# processname: epict
#
### BEGIN INIT INFO
# Provides: epict
# Should-Start: $syslog openct
# Should-Stop: $syslog openct
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Epic_TLE  daemon
# Description: Epic_TLE is the server which can be applied for a banking system
### END INIT INFO
. /etc/rc.d/init.d/functions
# See how we were called.
export JAVA_HOME=/opt/EpicTle/java1.6
export PATH=$PATH:$JAVA_HOME/bin
export PATH=$PATH:/opt/PTK/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/PTK/lib
export MANPATH=$MANPATH:/opt/PTK/man/man1
export TLE_HOME=/root/les
export PATH=$PATH:$TLE_HOME/config:$TLE_HOME/run
case "$1" in
  start)
        if ps ax | grep -v grep | grep epictle > /dev/null
        then
                echo "epict already is running........."
        else
                echo -n "Starting epict: "
                daemon lnrunr
                sleep 5
                RETVAL=$?
                echo
                [ $RETVAL = 0 ] && touch /var/lock/subsys/epict
                sleep 10
        fi
        ;;
stop)
        echo -n "Shutting down epict: "
        killproc epict
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && rm -f /var/lock/subsys/epict /var/run/epict.pid
        ;;
  status)
        status epict
        ;;
  restart)
        $0 stop
        sleep 10
        $0 start
        sleep 5
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|status}"
        exit 1
esac
exit 0where lnrunr
ls -S /opt/EpicTle/tle/runr.sh /root/les/run/lnrunr
and add the '/root/les/run/' to PATH variable
In fact, Now I can use
service epict start , stop , status and restart
those are working fine.
Now I have used linux HA to make a backup server. So on HA configuration, I have added the my 'epict' service
I noted those servers
Active
Passive
In fact, When Active server is down, the 'epict' service will move to the Passive server and getting start the 'epict' on passive server.
But my issue is,
When epict service stop manually on active server, Linux HA is not detecting its status it shows still running statues but actually epict has already downed. But when I test with like 'httpd' service, HA shows the httpd has downed on HA gui. Then it will try to start 3 attempts (according to my configuration) to restart if not will move to the passive server. Actually that is the thing which I wanted to do for epict service.
Can you tell me what is the wrong with me or is it possible for java application ?
Note: I know this quit out of forum but I want to know what is the help from java world to solve this problem?
Best regards
-Kapila

HELP!  Error startserver JSWDK

I have an error when I start the server on UNIX. The error is this:
"Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/web/shell/Shutdown"
The file startserver contains:
#! /bin/sh
#
# $Id: startup.sh,v 1.2.2.1 1999/09/09 01:45:27 gonzo Exp $
# Shell script to startup the server
# This script is known to work with the standard Korn Shell under
# Solaris and the MKS Korn shell under Windows.
# There are other, simpler commands to startup the runner. The two
# commented commands good replacements. The first works well with
# Java Platform 1.1 based runtimes. The second works well with
# Java2 Platform based runtimes.
#jre -cp runner.jar:servlet.jar:classes com.sun.web.shell.Startup $*
#java -cp runner.jar:servlet.jar:classes com.sun.web.shell.Startup $*
baseDir=`dirname $0`
jsdkJars=${baseDir}/webserver.jar:${baseDir}/lib/jakarta.jar:${baseDir}/lib/servlet.jar
jspJars=${baseDir}/lib/jsp.jar:${baseDir}/lib/jspengine.jar
beanJars=${baseDir}/examples/WEB-INF/jsp/beans:${baseDir}/webpages/WEB-INF/jsp/beans:${baseDir}/webpages/WEB-INF/servlets
miscJars=${baseDir}/lib/xml.jar
appJars=${jsdkJars}:${jspJars}:${beanJars}:${miscJars}
sysJars=${JAVA_HOME}/lib/tools.jar
appClassPath=${appJars}
cp=$CLASSPATH
# Backdoor classpath setting for development purposes when all classes
# are compiled into a /classes dir and are not yet jarred.
if [ -d ${baseDir}/classes ]; then
appClassPath=${baseDir}/classes:${appClassPath}
fi
CLASSPATH=${appClassPath}:${sysJars}
export CLASSPATH
if [ "$cp" != "" ]; then
CLASSPATH=${CLASSPATH}:${cp}
export CLASSPATH
fi
echo Using classpath: ${CLASSPATH}
# We start the server up in the background for a couple of reasons:
# 1) It frees up your command window
# 2) You should use `stopserver` instead of ^C to bring down the server
java com.sun.web.shell.Startup $* &
if [ "$cp" != "" ]; then
CLASSPATH=${cp}
export CLASSPATH
else
unset CLASSPATH
fi
I find the solution: server.jar in classpath...

Classpath or PATH?

I have the following packages located at
/usr/java/j2sdk1.4.0
/root/j2sdkee1.3.1
For some reason I can type java -version and get the correct version returned, but j2ee -version says no such file or directory.
How can I be sure the PATH's are correct?
Regards
Scott 
I have consulted with the gods of ancient egypt and
Ma'at goddess of truth says type 'set' at the command prompt
and the scribes of Unix will display the path it upon your sacred viewing device.
Here is the result of set...where in the list does my system know where to get the version of java from? My java package is at /usr/java/j2sdk1.4.0
[root#localhost bin]# set
BASH=/bin/bash
BASH_ENV=/root/.bashrc
BASH_VERSINFO=([0]="2" [1]="05a" [2]="0" [3]="1" [4]="release" [5]="i686-pc-linu
x-gnu")
BASH_VERSION='2.05a.0(1)-release'
COLORS=/etc/DIR_COLORS
COLORTERM=
COLUMNS=80
DIRSTACK=()
DISPLAY=:0.0
EUID=0
GDMSESSION=Default
GDM_LANG=en_US
GROUPS=()
GS_LIB=/root/.kde/share/fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/root/.gtkrc:/root/.gtkrc-kde
HISTFILE=/root/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/root
HOSTNAME=localhost.localdomain
HOSTTYPE=i686
IFS=$' \t\n'
KDE_MULTIHEAD=false
KONSOLE_DCOP='DCOPRef(konsole-2522,konsole)'
KONSOLE_DCOP_SESSION='DCOPRef(konsole-2522,session-1)'
LAMHELPFILE=/etc/lam/lam-helpfile
LANG=en_US
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=24
LOGNAME=root
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;
01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.
btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31
:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:
*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;
35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:'
MACHTYPE=i686-pc-linux-gnu
MAILCHECK=60
OLDPWD=/root/j2sdkee1.3.1
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin
/X11:/usr/local/bin:/usr/bin:/root/bin:/usr/lib:/usr/local/apache2/bin:/root/poi
ntbase/tools/server:/usr/X11R6/bin:/root/bin:/usr/lib:/usr/local/apache2/bin:/ro
ot/pointbase/tools/server
PIPESTATUS=([0]="0")
PPID=2522
PROMPT_COMMAND='echo -ne "\033]0;${USER}#${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
PS1='[\u#\h \W]\$ '
PS2='> '
PS4='+ '
PVM_ROOT=/usr/share/pvm3
PVM_RSH=/usr/bin/rsh
PWD=/root/j2sdkee1.3.1/bin
QTDIR=/usr/lib/qt3-gcc2.96
SESSION_MANAGER=local/localhost.localdomain:/tmp/.ICE-unix/1371
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:em
acs
SHLVL=3
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SUPPORTED=en_US:en
TERM=xterm
UID=0
USER=root
USERNAME=root
XAUTHORITY=/root/.Xauthority
XMODIFIERS=#im=none
XPVM_ROOT=/usr/share/pvm3/xpvm
_=./j2ee
i=/etc/profile.d/xpvm.sh
langfile=/root/.i18n
mc ()
{
mkdir -p $HOME/.mc/tmp 2>/dev/null;
chmod 700 $HOME/.mc/tmp;
MC=$HOME/.mc/tmp/mc-$$;
/usr/bin/mc -P "$#" >"$MC";
cd "`cat $MC`";
/bin/rm -f "$MC";
unset MC
}
Regards
Scott

SunStudio 11: unable to get collector to work

I'm using BEA WebLogic 8 & java jdk 1.4.2_08.
I have written a servlet in C++ and it works fine with Weblogic.
However I need to look at the bottlenecks when I have multiple threads running.
I have tried using LD_PRELOAD when starting weblogic and then attaching to the proces with dbx.
I set up the collector and enter cont to dbx.
However dbx comes back with the following error:
(dbx) cont
Creating experiment database test.6.er ...
dbx: can't find a system call entry point -- program not linked with libc?
libc appears in the list of shared libraries for the process.
Any ideas how to get this all working?
Thanks
Damian 
We have a pretty long web page on how to profile WebLogic. I need to find out how to get that page accessible from outside. For now, I believe I can post a launch script referred from that page:
#!/bin/sh
#     #(#)collectlaunch.sh.txt 1.1 06/01/20
#
# This script is used by the WebLogic NodeManager to start up Managed servers
# on Unix systems under the control of an Admin server. The Admin
# server supplies the arguments to this script.
# The script is invoked with 4 arguments:
# Arg1: is the command line used to start up a Managed server
# Arg2: is the file to which stdout is to be redirected to
# Arg3: is the file to which stderr is to be redirected to
# Arg4: is the file into which the process id of the Managed server
# is saved.
# This script uses just one variable:
# JAVA_HOME - which is used to determine the Java version that is
# to be used to start up the WebLogic Managed server.
# set up WL_HOME, the root directory of your WebLogic installation
WL_HOME="/apps/infra/weblogic/8.1/PO/INT4/weblogic81"
# set up common environment
. "${WL_HOME}/common/bin/commEnv.sh"
# verify that JAVA_HOME points to a real Java
#     ?? But why check for javac, as opposed to java? Only java is needed
if [ ! -f "$JAVA_HOME/bin/javac" ]; then
echo "The JDK wasn't found in directory $JAVA_HOME." > $3
exit 1 # fail if not found
fi
# --- last steps -- commented out here, and repeated below
# Spawn the Java
# "$JAVA_HOME/bin/java" $1 >$2 2>$3 &
#
# Save its PID, write it to the file named in the fourth argument
# PID=$!
# echo $PID > $4
###########################################################################################
# Begin customization, to enable Sun Studio Data collection on the launched server
# Set NEWARG1 to the argument to be used for invoking the JVM
# NEWARG1=`echo $1`
# At this point, massage NEWARG1 if there are any arguments to be removed
#     when profiling, or extra arguments to add for profiling.
# use sed on arg1 to extract the token beginning with -Dweblogic.Name= and extract the string
# following the = which is the name of the application being launched; set APPNAME to it
APPNAME=`echo $NEWARG1 | sed 's/^.*-Dweblogic.Name=\([^ $]*\).*/\1/'`
# use sed on arg2 to remove the trailing basename to yield the directory in which
# the log files are being written and set APPDIR to it
APPDIR=`dirname $2`
# construct a name for the experiment, EXPNAME, as ${APPDIR}/${APPNAME}.mm.dd.hh.mm.ss.er
#     where mm.dd... is the current time stamp
# use that EXPNAME as a -o argument to collect
EXPNAME=${APPDIR}/${APPNAME}.`date '+%m%d_01/20/06M%S'`.er
# construct a name for a script file to send SIGPROF to the process as ${APPDIR}/kill.${APPNAME}
SIG_SCRIPT=${APPDIR}/kill.${APPNAME}
# Set $COLLECTOR to command and arguments -- in this case
#     Default clock profiling
#     Signal-controlled pause and resume
#     Archive copying for portability
#     experiment name constructed above
COLLECTOR="collect -j on -y PROF -S off -A copy -o ${EXPNAME}
# Or, use APPNAME to extract COLLECTOR from a configuration file
#     e.g., grep for $APPNAME.COLLECTOR, and then sed to extract
#     the remainder of the line and set COLLECTOR to it
#
# Or, use APPNAME to extract components for construction of
#     COLLECTOR for that application from a configuration file
#     Also, could grep for additional Java arguments, etc.
# create a log of the information processed in this script
echo "arg1= " $1 > ${APPDIR}/col.log
echo "arg2= " $2 >> ${APPDIR}/col.log
echo "arg3= " $3 >> ${APPDIR}/col.log
echo "arg4= " $4 >> ${APPDIR}/col.log
echo "" >> ${APPDIR}/col.log
echo "NEWARG1= " ${NEWARG1} >> ${APPDIR}/col.log
echo "" >> ${APPDIR}/col.log
echo "APPNAME= "${APPNAME} >> ${APPDIR}/col.log
echo "APPDIR= "${APPDIR} >> ${APPDIR}/col.log
echo "SIG_SCRIPT= "${SIG_SCRIPT} >> ${APPDIR}/col.log
echo "EXPNAME= "${EXPNAME} >> ${APPDIR}/col.log
echo "" >> ${APPDIR}/col.log
echo "COLLECTOR= "${COLLECTOR} >> ${APPDIR}/col.log
echo "" >> ${APPDIR}/col.log
echo "COMMAND= ${COLLECTOR} \"${JAVA_HOME}/bin/java\" ${NEWARG1} >$2 2>$3 &" >> ${APPDIR}/col.log
echo "" >> ${APPDIR}/col.log
# Now actually spawn the JVM under COLLECTOR
${COLLECTOR} "${JAVA_HOME}/bin/java" ${NEWARG1} >$2 2>$3 &
# Save the PID, write it to the fourth argument (as in original script)
PID=$!
echo $PID > $4
# and write it to the collector log file
echo "PID= " $PID >> ${APPDIR}/col.log
# write a script to send SIGPROF to the process
# and make the script executable by anyone
echo "#!/bin/sh" > ${SIG_SCRIPT}
echo "kill -PROF $PID" >> ${SIG_SCRIPT}
chmod 777 ${SIG_SCRIPT}

Categories

Resources