Issue1597

classification
Title: java.lang.ExceptionInInitializerError for axis org.apache.axis.wsdl.WSDL2Java
Type: behaviour Severity: normal
Components: Core Versions: 2.5b1
process
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: Nosy List: akong, ldavid@verisign.com, zyasoft
Priority: Keywords:

Created on 2010-04-13.22:40:39 by ldavid@verisign.com, last changed 2010-08-15.17:08:18 by zyasoft.

Messages
msg5696 (view) Author: Lysander David (ldavid@verisign.com) Date: 2010-04-13.22:40:37
When attempting to generate java from wsdl for axis this exception is raised

ExceptionInInitializerError

1167 buildman@lnx8-build:/app/home/buildman/explore/02_jython/02_wsdl_to_java $ sh 02_wsdl_to_java.sh.1
/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/log4j-1.2.8.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/commons-logging-1.0.4.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/commons-discovery-0.2.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/axis.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/axis-ant.jar:/lib/ant.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/jaxrpc.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/log4j-1.2.8.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/xml-apis.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/xercesImpl.jar:/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1/lib/resolver.jar:.
expr: warning: unportable BRE: `^/': using `^' as the first character
of the basic regular expression is not portable; it is being ignored
Traceback (most recent call last):
  File "02_wsdl_to_java.py", line 3, in <module>
    WSDL2Java.main([
	at org.apache.axis.i18n.ProjectResourceBundle.<clinit>(ProjectResourceBundle.java:53)
	at org.apache.axis.i18n.MessagesConstants.<clinit>(MessagesConstants.java:32)
	at org.apache.axis.utils.Messages.<clinit>(Messages.java:36)
	at org.apache.axis.wsdl.WSDL2Java.<clinit>(WSDL2Java.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)

java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError


Here is the python file 02_wsdl_to_java.py

from org.apache.axis.wsdl import WSDL2Java

WSDL2Java.main([
    '-o',
    'output',
    'http://buildtools1-lnx:8080/rpc/soap/jirasoapservice-v2?wsdl'])


Here is the shell script which caused the exception to be raised

export AXIS_HOME=/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1

AXIS_CP=$AXIS_HOME/lib/log4j-1.2.8.jar:$AXIS_HOME/lib/commons-logging-1.0.4.jar:$AXIS_HOME/lib/commons-discovery-0.2.jar:$AXIS_HOME/lib/axis.jar:$AXIS_HOME/lib/axis-ant.jar:$ANT_HOME/lib/ant.jar:$AXIS_HOME/lib/jaxrpc.jar:$AXIS_HOME/lib/log4j-1.2.8.jar:$AXIS_HOME/lib/xml-apis.jar:$AXIS_HOME/lib/xercesImpl.jar:$AXIS_HOME/lib/resolver.jar:.

echo $AXIS_CP

jython -Dpython.path=$AXIS_CP 02_wsdl_to_java.py

If the CLASSPATH environment variable is set rather than
the python.path property as shown here:

export AXIS_HOME=/u/build/build1/engtools/linux/2.6.18-8.el5/x86_64/global/share/axis1

AXIS_CP=$AXIS_HOME/lib/log4j-1.2.8.jar:$AXIS_HOME/lib/commons-logging-1.0.4.jar:$AXIS_HOME/lib/commons-discovery-0.2.jar:$AXIS_HOME/lib/axis.jar:$AXIS_HOME/lib/axis-ant.jar:$ANT_HOME/lib/ant.jar:$AXIS_HOME/lib/jaxrpc.jar:$AXIS_HOME/lib/log4j-1.2.8.jar:$AXIS_HOME/lib/xml-apis.jar:$AXIS_HOME/lib/xercesImpl.jar:$AXIS_HOME/lib/resolver.jar:$AXIS_HOME/lib/mailapi_1_3_1.jar:$AXIS_HOME/lib/wsdl4j-1.5.1.jar:.

echo $AXIS_CP

export CLASSPATH=$AXIS_CP

jython 02_wsdl_to_java.py


the script can be executed successfully.
msg5911 (view) Author: Jim Baker (zyasoft) Date: 2010-07-20.05:23:58
Is this a problem with the Jython implementation itself?
msg5970 (view) Author: Jim Baker (zyasoft) Date: 2010-08-15.17:08:18
Closing until we get something more definitive about being a Jython bug.
History
Date User Action Args
2010-08-15 17:08:18zyasoftsetstatus: open -> closed
resolution: invalid
messages: + msg5970
2010-07-20 05:23:59zyasoftsetnosy: + zyasoft
messages: + msg5911
2010-06-19 04:45:56akongsetnosy: + akong
2010-04-13 22:40:39ldavid@verisign.comcreate