[
http://jira.jboss.com/jira/browse/JBWS-1819?page=all ]
Tom Uijldert reopened JBWS-1819:
--------------------------------
Apologies for the unclarity, I'll try to elaborate.
(We are talking about a 4.2.1.GA standard download/installation of the Application Server
under the latest Windows XP with a cygwin environment for shell-execution.)
1. A first use of the script (wsrunclient.sh) in my environment produces the standard
"usage"-message of the JVM (or the 'java'-command if you prefer).
This indicates an incomplete command and, sure enough, my "cygwin" environment
transforms the "WSRUNCLIENT_CLASSPATH" to a series of pathnames, separated by
the semicolon (;) which, for any shell, signals the end of a command.
The use of double quotes and/or "eval" forces the shell variable to be
evaluated too soon, resulting in a prematurely terminated "java"-command,
followed by a bunch of pathhnames as commands. The single quotes prevent the evaluation.
You may not experience the same problem:
a - because you don't test under the cygwin environment.
b - you really _do_ use the Bourne-shell (/bin/sh) and not bash (as is by default pointed
to by both Linux and/or cygwin). Both shells process quotes differently in some subtle way
(that I don't understand but nevertheless rears it's ugly head now and again).
2. When the single quotes are in place the command is understood and the exception
NoClassDefFoundError is thrown for the class "org/apache/xerces/xs/XSModel".
This can only be found in XercesImpl.jar, within the endorsed directory
"$JBOSS_HOME/lib/endorsed/".
Since that path is given in the "JBOSS_ENDORSED_DIRS" I assumed that these were
some jboss-specific class-loading definitions and wondered why it was given in the first
place if it was so obviously not working. Removing the endorsed-stuff and adding the jar
directly gave me a working test so hence the changes in the patch.
3. Since I can only find something in the Java documentation on
'java.endorsed.dirs' in the description of 'javac' and nothing in the
desciption of 'java', I am now very curious as to why this is needed in runtime.
Please explain.
4. The differences in WSRUNCLIENT_CLASSPATH between wsrunclient.sh and wsrunclient.bat are
not explained yet. Do they need to be different?
I hope this clears things up a bit.
Tom.
wsrunclient script(s) differ and do not always function.
--------------------------------------------------------
Key: JBWS-1819
URL:
http://jira.jboss.com/jira/browse/JBWS-1819
Project: JBoss Web Services
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: productization
Affects Versions: jbossws-2.0.1
Environment: Windows-XP including Cygwin.
Reporter: Tom Uijldert
Assigned To: Heiko Braun
Priority: Minor
Attachments: wsrunclient.sh.diff
Original Estimate: 1 day
Remaining Estimate: 1 day
Scripts wsrunclient.sh and wsrunclient.bat contain some questionable code:
1. They both define a "-Djava.endorsed.dirs" that is only used by javac. The
compiler is not called here, only the JVM. The JVM doesn't seem to use it...
2. The included classpaths in the batch- and shell-file differ wildly. This cannot be
attributed to OS-differences. I keep wondering what jars are actually needed...
3. The 'eval ...' command in wsrunclient.sh mis-quotes the actual command and at
least 1 jar is missing.
Below a "diff -u" on the shell-script. Changes that were needed to get it
running in my environment.
Hope this helps,
Tom.
the diff:
----------
--- ../../jbossws-native-2.0.1.GA/bin/wsrunclient.sh 2007-08-17 18:58:06.000000000 +0200
+++ ../../jboss-4.2.1.GA/bin/wsrunclient.sh.new 2007-09-21 13:53:59.638125000 +0200
@@ -52,9 +52,6 @@
# Setup JBoss sepecific properties
JAVA_OPTS="$JAVA_OPTS"
-# Setup the java endorsed dirs
-JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
-
# Setup the client classpath
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/log4j.jar"
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jbossws-client.jar"
@@ -66,6 +63,8 @@
# JBossAS-4.2 subset of jbossall-client.jar
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/client/jboss-common-client.jar"
+WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$JBOSS_HOME/lib/endorsed/xercesImpl.jar"
+
while [ $# -ge 1 ]; do
case $1 in
"-classpath")
WSRUNCLIENT_CLASSPATH="$WSRUNCLIENT_CLASSPATH:$2"; shift;;
@@ -82,9 +81,7 @@
JBOSS_ENDORSED_DIRS=`cygpath --path --windows "$JBOSS_ENDORSED_DIRS"`
fi
-# Execute the JVM
eval "$JAVA" $JAVA_OPTS \
- -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-Dlog4j.configuration=wstools-log4j.xml \
- -classpath "$WSRUNCLIENT_CLASSPATH" \
+ -classpath '$WSRUNCLIENT_CLASSPATH' \
"$args"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira