[
https://jira.jboss.org/jira/browse/SECURITY-341?page=com.atlassian.jira.p...
]
Stefan Guilhen commented on SECURITY-341:
-----------------------------------------
I agree that we should remove the serial version UID from classes that existed prior to
AS5 - they introduce incompatibility issues.
Whatever value we choose for the new classes, we must keep in mind that we must pay
attention to the changes made later on, as they may require us to change the field's
value to clearly indicate that the new version of the class won't work with older
versions. For this reason I would choose to use the generated ids - if something changes
in the class that will make it incompatible with older versions, we just re-generate the
id value.
Default serialVersionUID (=1L) in class
org.jboss.security.SimplePrincipal prevents interoperability with external tools (e.g.
JBossTools)
------------------------------------------------------------------------------------------------------------------------------------------
Key: SECURITY-341
URL:
https://jira.jboss.org/jira/browse/SECURITY-341
Project: JBoss Security and Identity Management
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Interoperability, JBossSX
Affects Versions: 2.0.2.GA, 2.0.2.SP1, 2.0.2.SP2, 2.0.2.SP3
Environment: JBoss AS 5.0.0.GA, Eclipse ganymede SR1, JBoss Tools (any version).
Reporter: Saverio Trioni
Assignee: Stefan Guilhen
Priority: Critical
Fix For: 2.0.2.SP4
The serialVersionUID field in class SimplePrincipal is set to 1L instead of the expected
7701951188631723261L. This breaks compatibility with the external tools, preventing
interaction with the server.
Specifically, the application server started from within Eclipse fails early (in about or
less than 1 second from starting) with the following exception:
eclipse.buildId=M20080911-1700
java.version=1.5.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=es_ES
Command-line arguments: -os linux -ws gtk -arch x86
Error
Wed Jan 21 13:53:03 CET 2009
Failure in Poll Thread
org.jboss.ide.eclipse.as.core.server.IServerStatePoller$PollingException: error
unmarshalling arguments; nested exception is:
java.io.InvalidClassException: org.jboss.security.SimplePrincipal; local class
incompatible: stream classdesc serialVersionUID = 1, local class serialVersionUID =
7701951188631723261
at
org.jboss.ide.eclipse.as.core.extensions.polling.JMXPoller$PollerRunnable.handleException(JMXPoller.java:165)
at
org.jboss.ide.eclipse.as.core.extensions.polling.JMXPoller$PollerRunnable.run(JMXPoller.java:111)
at java.lang.Thread.run(Thread.java:595)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira