I am developing a WebSphere 6.1 application that uses the Java servlet. In my servlet, I defined the serial identifier vesion 1L. After deploying and running my application, I get a LinkageError of the following type (from the server log):
[5/9/11 15:14:26:868 EDT] 0000001c WebApp
E [Servlet Error]-[ManageRecordsConsumerServlet]: java.lang.Exception:
java.lang.LinkageError: LinkageError while defining class:
<redacted>.docindexupdate.batch.servlet.ManageRecordsConsumerServlet
Could not be defined due to: (<redacted>/docindexupdate/batch/servlet
/ManageRecordsConsumerServlet) class name must be a string at offset=2074
This is often caused by having a class defined at multiple
locations within the classloader hierarchy. Other potential causes
include compiling against an older or newer version of the class
that has an incompatible method signature.
I am not sure what the problem is. I saw this before defining a uid version with a serial version and realized that by defining this and being consistent, future updates to the class file will succeed. There are no errors during compilation or deployment on the server. Is it possible that an older version of the servlet is cached somewhere in the WebSphere instance (I'm only deploying dev on my machine at the moment)?
class name must be a string at offset=2074
Linealso confusing.