Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

InvalidClass Exception in javax .crypto. spec.SecretKeySpec

 
Ramachandran Vaidyanathan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
Iam getting the following invalidclassexception while connecting from tomcat4.1 to websphere 3.5.6
java.io.InvalidClassException: javax.crypto.spec.SecretKeySpec; local class incompatible: stream classdesc serialVersionUID = 4363931942414077710, local class serialVersionUID = 6577238317307289933
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:459)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:152
1)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
626)
Can somebody help me ASAP.....
TIA.
cheers
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That problem indicates that you have incompatible versions of javax.crypto.spec.SecretKeySpec. This happens when you try to serialize an object of a particular class and the serialVersionUID is different on the the receiving end of the socket. You need to be sure that javax.crypto.spec.SecretKeySpec is the same on Tomcat and WebSphere, which it wouldn't be in your case since Tomcat 4.1 uses Java 1.4 and WebSphere 3.5.6 uses 1.2 I believe. I don't believe that SecretKeySpec was around until 1.4. Is the exception being thrown in WebSphere?
 
Ramachandran Vaidyanathan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Exception is thrown in Tomcat and not in Websphere.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic