+ Start a Discussion
glen sglen s 

error "class file has wrong version 49.0, should be 48.0" while trying SSO work

I'm trying to implement some SSO code using code on my local application, following the approach suggested here:  https://wiki.apexdevnet.com/index.php/Single_Sign_On_and_the_Apex_API

I've downloaded the quickstart.zip file from the dev site, and am using the quickstart.jar file that was in that.  This jar file contains com.sforce.soap.enterprise.SforceServiceLocator class and others classes that I need to do this.  I'm currently testing this in a JSP page (probably not relevant), where it compiles fine. 

But when I deploy my application (using Jboss), and access the JSP from my SalesForce custom tab, I see the following errors in my console:

bad class file: C:\projects\devtools\jboss-3.2.6\server\pe\lib\quickstart.jar(com/sforce/soap/enterprise/SforceServiceLocator.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

I expect this means I should be using a different jar file - but I'm not sure which one.

Thanks for any advice.

Its the jar was compiled with JDK 1.5, but you're trying to run it on JDK 1.4
glen sglen s

Thanks for the quick response.

So, now wonder:  does SalesForce support integration with an app running 1.4 of the JDK?  Or must we upgrade to 1.5 in order to use the SalesForce webservices? 


You can use whatever you like as long as it can generate the correctly formatted message, we just happen to ship sample code that was built with the v1.5 JDK.
glen sglen s

Ok:  So I need to do first edit the source files I found in quickstart.zip, removing any items not supported in the 1.4 jdk, and then compile/build a new quickstart.jar using the 1.4 jdk, and then we should be good to go.

Or, alternatively, build the Service locator and other files from scratch, to access the SalesForce web services.