Topic
  • 22 replies
  • Latest Post - ‏2012-08-17T09:33:05Z by IBMAbhi
SystemAdmin
SystemAdmin
1009 Posts

Pinned topic java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

‏2003-12-23T20:24:30Z |
I created a web service client using WSDK 5.1. It worked fine with Eclipse, - I can run it, and view results. However, I need to run it from command line, and it fails. I updated PATH, LIB and CLASSPATH variables as described in docs. I can't trace this problem beyond the Stub class. I know it fails in this method:
private void initTypeMapping()
on the following line:
javax.xml.rpc.encoding.TypeMapping tm = super.getTypeMapping(com.ibm.ws.webservices.engine.Constants.URI_LITERAL_ENC);

Here is the ExceptionStack I get:

java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.ibm.ws.webservices.engine.encoding.DefaultTypeMappingImpl.class$(
DefaultTypeMappingImpl.java:128)
at com.ibm.ws.webservices.engine.encoding.DefaultTypeMappingImpl.<init>(
DefaultTypeMappingImpl.java:311)
at com.ibm.ws.webservices.engine.encoding.DefaultTypeMappingImpl.getSing
leton(DefaultTypeMappingImpl.java:138)
at com.ibm.ws.webservices.engine.encoding.TypeMappingRegistryImpl.<init>
(TypeMappingRegistryImpl.java:206)
at com.ibm.ws.webservices.engine.configuration.SimpleEngineConfiguration
Provider.getTypeMappingRegistry(SimpleEngineConfigurationProvider.java:201)
at com.ibm.ws.webservices.engine.configuration.SimpleEngineConfiguration
Provider.getTypeMappingRegistry(SimpleEngineConfigurationProvider.java:197)
at com.ibm.ws.webservices.engine.WebServicesEngine.getTypeMappingRegistr
y(WebServicesEngine.java:426)
at com.ibm.ws.webservices.engine.client.Stub.getTypeMapping(Stub.java:61
7)
at com.forumsys.qa.QAServicesSoapStub.initTypeMapping(QAServicesSoapStub
.java:29)
at com.forumsys.qa.QAServicesSoapStub.<init>(QAServicesSoapStub.java:20)

at com.forumsys.qa.QAServicesLocator.getQAServicesSoap(QAServicesLocator
.java:44)
at com.forumsys.qa.QAServicesLocator.getQAServicesSoap(QAServicesLocator
.java:39)
at com.forumsys.qa.Test.main(Test.java:37)
Caused by: java.lang.IllegalArgumentException: Unterminated quote
at java.text.SimpleDateFormat.compile(Unknown Source)
at java.text.SimpleDateFormat.initialize(Unknown Source)
at java.text.SimpleDateFormat.<init>(Unknown Source)
at java.text.SimpleDateFormat.<init>(Unknown Source)
at com.ibm.ws.webservices.engine.types.Time.<clinit>(Time.java:89)
... 15 more

Please, help me to figure this out.
Thank you!
Updated on 2012-08-17T09:33:05Z at 2012-08-17T09:33:05Z by IBMAbhi
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2004-04-16T09:13:19Z  
    Good Day,

    Have you found a solution to the problem. I am getting the same problem when trying to deploy a web service client using Web Start. I think the problem has got to do with using the SUN 1.4 runtime.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2004-06-09T09:20:54Z  
    Good Day,

    Have you found a solution to the problem. I am getting the same problem when trying to deploy a web service client using Web Start. I think the problem has got to do with using the SUN 1.4 runtime.
    I had exactly the same problem in WSAD 5.1.1 & 5.1.2.
    I guess it's a bug in the webservices engine. It's fixed when you replace the webservices.jar file in your Test Environment's runtime with the one from WAS 5.1.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2004-06-17T16:05:12Z  
    I had exactly the same problem in WSAD 5.1.1 & 5.1.2.
    I guess it's a bug in the webservices engine. It's fixed when you replace the webservices.jar file in your Test Environment's runtime with the one from WAS 5.1.
    hi..has anyone of u got the solution for this prob? im getting exactly the same error with my client application whenever i run it in command line..but whenever i run it in websphere everything's fine.. im using WSAD 5.1
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2004-07-14T09:10:50Z  
    hi..has anyone of u got the solution for this prob? im getting exactly the same error with my client application whenever i run it in command line..but whenever i run it in websphere everything's fine.. im using WSAD 5.1
    I have the same problem using WSAD 5.1.1, i cannot solve the problem, i replace the webservices.jar (1914kb)with the one of the \base_v5\lib (1878kb) but it doesnt work...where is the good one? and does it really solve the problem? i run the client from wsad. Thanx in advance
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2004-07-27T06:50:06Z  
    I have the same problem using WSAD 5.1.1, i cannot solve the problem, i replace the webservices.jar (1914kb)with the one of the \base_v5\lib (1878kb) but it doesnt work...where is the good one? and does it really solve the problem? i run the client from wsad. Thanx in advance
    I solved mine.. maybe this will help u. When i run the client in WSAD environment it uses its own JDK so everything works fine. But when i run it in command line i get the java.lang.ExceptionInInitializerError. WSAD 5.1 uses JDK 1.3.. however, in my pc i have installed JDK 1.4 so whenever i run my standalone app in command line its the JDK 1.4 which runs it resulting to this error.. the solution: run the app in WSAD's own java or downgrade to JDK 1.3 ...after i have downgraded to JDK 1.3 everything ran smoothly.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2004-07-27T06:57:58Z  
    I solved mine.. maybe this will help u. When i run the client in WSAD environment it uses its own JDK so everything works fine. But when i run it in command line i get the java.lang.ExceptionInInitializerError. WSAD 5.1 uses JDK 1.3.. however, in my pc i have installed JDK 1.4 so whenever i run my standalone app in command line its the JDK 1.4 which runs it resulting to this error.. the solution: run the app in WSAD's own java or downgrade to JDK 1.3 ...after i have downgraded to JDK 1.3 everything ran smoothly.
    hi, i solved the problem by replacing webservices.jar with an older version, just like one post above said. Your solution also is good,thanx
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2004-09-11T17:11:02Z  
    I have the same problem with the following command:
    javax.xml.rpc.encoding.TypeMapping tm =super.getTypeMapping(com.ibm.ws.webservices.engine.Constants.URI_LITERAL_ENC);

    It worked fine in my Java Swing client that I have in WSAD.
    But when I tried to use it with a Java Swing client in WSAD that uses 1.4 of the JDK I receive the problem.
    How can I solve this? I can not downgrade to 1.3 of the JDK, because the client depends on this.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-03-30T07:34:01Z  
    I have the same problem using WSAD 5.1.1, i cannot solve the problem, i replace the webservices.jar (1914kb)with the one of the \base_v5\lib (1878kb) but it doesnt work...where is the good one? and does it really solve the problem? i run the client from wsad. Thanx in advance
    Hi, guy, I think you should use \base_v51\lib\webservice.jar
    not \base_v5\lib

    I tried and it works great
  • oldandtired
    oldandtired
    2 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-04-21T18:02:14Z  
    Hi,

    We have encountered the same problem. Did you find out the cause?

    Regards,
  • oldandtired
    oldandtired
    2 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-04-22T07:33:11Z  
    Hi,

    We have encountered the same problem. Did you find out the cause?

    Regards,
    We fixed it when we saw the replies above to the original post. One of our WSAD projects in the Web Service tier was pointing to an old v5 webservices.jar. Once we pointed them all at the webservices.jar in the v51 runtime the problem went away.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-07-06T15:55:29Z  
    I solved mine.. maybe this will help u. When i run the client in WSAD environment it uses its own JDK so everything works fine. But when i run it in command line i get the java.lang.ExceptionInInitializerError. WSAD 5.1 uses JDK 1.3.. however, in my pc i have installed JDK 1.4 so whenever i run my standalone app in command line its the JDK 1.4 which runs it resulting to this error.. the solution: run the app in WSAD's own java or downgrade to JDK 1.3 ...after i have downgraded to JDK 1.3 everything ran smoothly.
    Yes, I found this as well. The standalone client worked fine in WSAD, but failed from the command line with WAS (java 1.4 was the default jvm from the command line). Switching to the jvm in WAS solved the problem.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-07-21T16:28:00Z  
    Thanks for sharing. You guys are awesome.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-08-09T10:28:28Z  
    Good Day,

    Have you found a solution to the problem. I am getting the same problem when trying to deploy a web service client using Web Start. I think the problem has got to do with using the SUN 1.4 runtime.
    I would like to add that when you generate a web service from a WSDL in WSAD 5.1.2 you must also see this problem. This time, it was because the classpath is set to use WAS_50_PLUGINDIR/lib/webservices.jar which translates to D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v5_stub\lib\webservices.jar in both the webapp and the client java app.

    I corrected this by changing webservices.jar to be picked up from D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\webservices.jar and the problem vanished. I used IBM Java 1.4 successfully (maybe because I am using WSAD5.1.2).
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-08-22T13:12:02Z  
    I would like to add that when you generate a web service from a WSDL in WSAD 5.1.2 you must also see this problem. This time, it was because the classpath is set to use WAS_50_PLUGINDIR/lib/webservices.jar which translates to D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v5_stub\lib\webservices.jar in both the webapp and the client java app.

    I corrected this by changing webservices.jar to be picked up from D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\webservices.jar and the problem vanished. I used IBM Java 1.4 successfully (maybe because I am using WSAD5.1.2).
    Hi everyone,

    I'm having the same problem as everyone, except for the point that I'm migrating my webservice to a Tomcat 5.5.9. Can anyone send me the webservices.jar under base_v51 as my webservices.jar is located on base_v5 and I can not find anywhere the base_v51 directory?

    Thank you in advance.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-09-26T22:40:37Z  

    Guys, I ran into the same problem. I read the solutions above however I am not sure which webservies.jar to use on my stand alone client. I have tried this in Unix and it works perfectly fine (under 1.3).

    I need to give a jar file to my tester who has 1.4 JRE. I can't them to 1.3! The webservices.jar that I see in the directory is of 1,878 kb. Is that the one you are guys are referring to? If not where can I get this jar file? Please help me..!
    Ozzi
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-10-11T17:45:35Z  
    I would like to add that when you generate a web service from a WSDL in WSAD 5.1.2 you must also see this problem. This time, it was because the classpath is set to use WAS_50_PLUGINDIR/lib/webservices.jar which translates to D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v5_stub\lib\webservices.jar in both the webapp and the client java app.

    I corrected this by changing webservices.jar to be picked up from D:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\lib\webservices.jar and the problem vanished. I used IBM Java 1.4 successfully (maybe because I am using WSAD5.1.2).
    Thank you!

    I had the exact same problem and this solved it for me. I would probably have never figured it out.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-10-13T09:29:54Z  
    Thank you!

    I had the exact same problem and this solved it for me. I would probably have never figured it out.
    I have the same problem. Could you send me the webservices.jar on base_v51? I work with websphere studio site developer v5.1.0, and i haven´t got the base_v51 directory.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-10-13T13:08:45Z  
    I have the same problem. Could you send me the webservices.jar on base_v51? I work with websphere studio site developer v5.1.0, and i haven´t got the base_v51 directory.
    no problem

    What's your email address?
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-10-17T08:42:25Z  
    no problem

    What's your email address?
    Thank you in advance.

    My email is: txusgonzalez@hotmail.com

    Again, thanks.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2005-10-17T08:48:31Z  
    no problem

    What's your email address?
    Can you send the webservice.jar also to me, please?

    My email is alexmolina@gmail.com

    Thank you.
  • SystemAdmin
    SystemAdmin
    1009 Posts

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2006-05-04T16:24:04Z  

    Guys, I ran into the same problem. I read the solutions above however I am not sure which webservies.jar to use on my stand alone client. I have tried this in Unix and it works perfectly fine (under 1.3).

    I need to give a jar file to my tester who has 1.4 JRE. I can't them to 1.3! The webservices.jar that I see in the directory is of 1,878 kb. Is that the one you are guys are referring to? If not where can I get this jar file? Please help me..!
    Ozzi
    Thanks a lot, the suggestions really helped.
  • IBMAbhi
    IBMAbhi
    1 Post

    Re: java.lang.ExceptionInInitializerError, - java.lang.IllegalArgumentException: in main

    ‏2012-08-17T09:33:05Z  
    hi, i solved the problem by replacing webservices.jar with an older version, just like one post above said. Your solution also is good,thanx
    changing webservices.jar also worked for me. I am using WSAD 5.1 and Java 1.3