aspose file tools*
The moose likes Web Services and the fly likes Getting this exception when invoking a webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Getting this exception when invoking a webservice" Watch "Getting this exception when invoking a webservice" New topic
Author

Getting this exception when invoking a webservice

Anee Agrawal
Greenhorn

Joined: Apr 06, 2008
Posts: 1
Hi All,

Please help me out.I am getting this error while running client program to invoke the webservice:
D:\jdeveloper\jdk\bin\javaw.exe -client -classpath D:\jdeveloper\jdev\mywork\testWebService\sampTest\classes;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\saaj.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\wsdl4j-1.5.1.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\jaxrpc.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\axis.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\common\lib\naming-common.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\commons-logging-1.0.4.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\commons-discovery-0.2.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\common\lib\activation.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\common\lib\mail.jar;D:\jars;
D:\jdeveloper\webservices\lib\xml-apis.jar;D:\jdeveloper\webservices\lib\xercesImpl.jar com.bsl.client.Client
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0); nested exception is:
java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0)
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}

java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0); nested exception is:
java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.bsl.client.Client.main(Client.java:24)
Process exited with exit code 1.

Please help me out.Why is this problem and whats the solution?

[ UD: added linebreaks ]
[ April 30, 2008: Message edited by: Ulf Dittmer ]
jeetu krishnan
Greenhorn

Joined: Feb 13, 2006
Posts: 12
Make sure ,the JDK used to compile the java source and the run time JDK is the same version.This should fix the problem.

[ UD: removed unnecessary quote of original question that screwed up the layout ]
[ April 30, 2008: Message edited by: Ulf Dittmer ]
Mintoo kumar
Ranch Hand

Joined: Aug 21, 2007
Posts: 61
I encountered same problem several times.But after sweating i found there is no specific reason i mean to say suppose you are deploying your web service through build.xml(ant) and you server is not running ,in this condition you will get the same "AXIS falut......." errot.

Another scenario is , if you have web service deployed in JBOSS and you are calling the the service through "Service client" and your "ServiceCleint" is pointing to some other other version of depolyed service.then you encountered with the same error.

So better check the classpath,deployed service (version) if you have made any changes replace it with the new one.
Hope this will sortout your problem.

---------------------------------------------------------------------------
Mintoo
SCJP
Working on SCJWS
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42274
    
  64
AxisFault is the SOAP wrapper around any exception. It doesn't indicate anything about the source of the problem. But the original exception (UnsupportedClassVersionError) has been posted, so speculating about other possible problems isn't likely to help.


Ping & DNS - my free Android networking tools app
Rizwan Patel
Ranch Hand

Joined: Jan 03, 2008
Posts: 59

Originally posted by Anee Agrawal:
Hi All,

Please help me out.I am getting this error while running client program to invoke the webservice:
D:\jdeveloper\jdk\bin\javaw.exe -client -classpath D:\jdeveloper\jdev\mywork\testWebService\sampTest\classes;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\saaj.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\wsdl4j-1.5.1.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\jaxrpc.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\axis.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\common\lib\naming-common.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\commons-logging-1.0.4.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\webapps\axis\lib\commons-discovery-0.2.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\common\lib\activation.jar;
C:\ProgramFiles\ApacheGroup\Tomcat\common\lib\mail.jar;D:\jars;
D:\jdeveloper\webservices\lib\xml-apis.jar;D:\jdeveloper\webservices\lib\xercesImpl.jar com.bsl.client.Client
Exception in thread "main" AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString: java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0); nested exception is:
java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0)
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}

java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0); nested exception is:
java.lang.UnsupportedClassVersionError: com/bsl/serviceprovider/ServiceProvider (Unsupported major.minor version 49.0)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.bsl.client.Client.main(Client.java:24)
Process exited with exit code 1.

Please help me out.Why is this problem and whats the solution?

[ UD: added linebreaks ]

[ April 30, 2008: Message edited by: Ulf Dittmer ]


Did you get the answer for the above query? If yes then can you please tell what is the exact problem for the above error?


scjp 1.5, OCPJWSD 5
pradeep jaladi
Ranch Hand

Joined: Nov 21, 2004
Posts: 65
Hi,

I guess you are using the wrong jar files. please check the installation instructions of the Axis web services version. and make sure that they are in class path


Pradeep.Jaladi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting this exception when invoking a webservice