I've fixed the test to look into JBOSS_HOME/common/lib when comparing
serialVersionUIDs and
now the following show up (differences with JBossAS 4.2.3.GA)
Which do you think should be excluded and which should be fixed?
serialVersionUID error for com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager,
423 3212782155822821108, current: 817026114256439397
serialVersionUID error for javax.enterprise.deploy.spi.status.ProgressEvent, 423
7815118532096485937, current: 3097551795061550569
serialVersionUID error for javax.resource.ResourceException, 423 547071213627824490,
current: 4770679801401540475
serialVersionUID error for javax.resource.spi.ConnectionEvent, 423 5611772461379563249,
current: 2776168349823367611
serialVersionUID error for javax.resource.spi.InvalidPropertyException, 423
-485903720300735741, current: -2395559483586818078
serialVersionUID error for javax.resource.spi.work.WorkEvent, 423 -3063612635015047218,
current: 6971276136970053051
serialVersionUID error for javax.security.jacc.EJBMethodPermission, 423 1, current:
141000
serialVersionUID error for javax.security.jacc.EJBRoleRefPermission, 423 1, current:
141000
serialVersionUID error for javax.security.jacc.WebResourcePermission, 423 1, current:
141000
serialVersionUID error for javax.security.jacc.WebRoleRefPermission, 423 1, current:
141000
serialVersionUID error for javax.security.jacc.WebUserDataPermission, 423 1, current:
141000
serialVersionUID error for javax.xml.registry.JAXRException, 423 -396751348710944315,
current: -4890474253443089374
serialVersionUID error for javax.xml.registry.RegistryException, 423 -2972094643801708304,
current: 5830899222180533586
serialVersionUID error for org.hibernate.TransactionException, 423 -5602477877095599912,
current: -3494053537812737867
serialVersionUID error for org.hibernate.action.CollectionAction, 423 3337074708816832438,
current: -6740182325864241168
serialVersionUID error for org.hibernate.action.CollectionRemoveAction, 423
-3769178788236409528, current: -7329281487984003573
serialVersionUID error for org.hibernate.action.EntityDeleteAction, 423
241431582334943044,
current: -6127154282392141594
serialVersionUID error for org.hibernate.action.EntityUpdateAction, 423
3600244150860770318,
current: -2648906076253682294
serialVersionUID error for org.hibernate.cache.QueryKey, 423 3248833014403061315, current:
-2533405183608448102
serialVersionUID error for org.hibernate.cache.ReadWriteCache$Lock, 423
-6626584372305617314, current: 8925731887122964333
serialVersionUID error for org.hibernate.cfg.AnnotationConfiguration, 423
-8598456379947205444, current: 6325740558807068467
serialVersionUID error for org.hibernate.cfg.Configuration, 423 -3033879675096717594,
current: -1792651813605991184
serialVersionUID error for org.hibernate.cfg.EJB3DTDEntityResolver, 423
-816829038738521353,
current: -6152350820619553605
serialVersionUID error for org.hibernate.cfg.ExtendedMappings, 423 -2615003042023441436,
current: -4538756805970623268
serialVersionUID error for org.hibernate.cfg.FkSecondPass, 423 -5148532521562173907,
current: 5804233516592640520
serialVersionUID error for org.hibernate.cfg.OneToOneSecondPass, 423 -1109649335733680352,
current: -6589658193929041648
serialVersionUID error for org.hibernate.cfg.SettingsFactory, 423 -7645500762151406186,
current: -3420832986683583325
serialVersionUID error for org.hibernate.cfg.annotations.CollectionBinder$1, 423
-1130414936720489400, current: -3670928006810104169
serialVersionUID error for org.hibernate.cfg.annotations.ListBinder$1, 423
4839495750522019597, current: -2879701323652463946
serialVersionUID error for org.hibernate.cfg.annotations.MapBinder$1, 423
-6693197475591115477, current: -8731097947151411189
serialVersionUID error for org.hibernate.cfg.annotations.ResultsetMappingSecondPass, 423
4479547386333738781, current: 201577864352201613
serialVersionUID error for org.hibernate.context.ThreadLocalSessionContext, 423
-2208357561845779393, current: -3727812081930577653
serialVersionUID error for org.hibernate.criterion.DetachedCriteria, 423
-7398805333131308064, current: 4871836084668820075
serialVersionUID error for org.hibernate.criterion.SubqueryExpression, 423
7490442833403966968, current: -168671237977301117
serialVersionUID error for org.hibernate.ejb.AbstractEntityManagerImpl, 423
-8367037579185197818, current: 8806954183595689427
serialVersionUID error for org.hibernate.ejb.Ejb3Configuration, 423 7767583251572168229,
current: -2017801656298166833
serialVersionUID error for org.hibernate.ejb.EntityManagerFactoryImpl, 423
6050447519944617470, current: 4552769405855495549
serialVersionUID error for org.hibernate.ejb.EntityManagerImpl, 423 -7326906089097994213,
current: -605917656499084613
serialVersionUID error for org.hibernate.ejb.event.EJB3MergeEventListener, 423
750025373306465672, current: -8991290410574643068
serialVersionUID error for org.hibernate.ejb.event.EJB3PersistEventListener, 423
459669018169818533, current: 3744528913333957768
serialVersionUID error for org.hibernate.ejb.event.EJB3PostUpdateEventListener, 423
4154204933482611718, current: 401171381660285391
serialVersionUID error for org.hibernate.ejb.event.EJB3SaveEventListener, 423
871133403473921095, current: -3053942698997099906
serialVersionUID error for org.hibernate.ejb.event.EJB3SaveOrUpdateEventListener, 423
-8629687975336352453, current: -5370534899696442823
serialVersionUID error for org.hibernate.ejb.event.EntityCallbackHandler, 423
5053842165518825008, current: -8448976043507840428
serialVersionUID error for org.hibernate.engine.CascadeStyle$1, 423 -2336804913692102138,
current: -1465194362194204248
serialVersionUID error for org.hibernate.engine.CascadeStyle$11, 423 100390272234185608,
current: 8054560937055242079
serialVersionUID error for org.hibernate.engine.CascadeStyle$12, 423 7925738928419326016,
current: -1973336808000734892
serialVersionUID error for org.hibernate.engine.CascadeStyle$2, 423 102753118711141997,
current: -4665883990712255542
serialVersionUID error for org.hibernate.event.EventListeners, 423 -6587469362551484007,
current: 4661452883329568113
serialVersionUID error for org.hibernate.event.InitializeCollectionEvent, 423
8645210988598397075, current: 6524500977128537223
serialVersionUID error for org.hibernate.hql.ast.tree.AbstractRestrictableStatement, 423
5746428704949426714, current: -4954216565883378179
serialVersionUID error for org.hibernate.hql.ast.tree.DeleteStatement, 423
-5294058915291929548, current: -6347786145955078664
serialVersionUID error for org.hibernate.hql.ast.tree.QueryNode, 423 -6981719152453337225,
current: -6566486715387225502
serialVersionUID error for org.hibernate.hql.ast.tree.UpdateStatement, 423
-1775918656226654774, current: 4486990149665967379
serialVersionUID error for org.hibernate.impl.SessionFactoryImpl, 423 5240496798560838891,
current: -7925661634098820916
serialVersionUID error for org.hibernate.impl.SessionImpl, 423 5566445859074192132,
current:
-1205743173536205673
serialVersionUID error for org.hibernate.mapping.PersistentClass, 423 4629325383028690309,
current: 3641146506859438981
serialVersionUID error for org.hibernate.stat.SecondLevelCacheStatistics, 423
-8864097779523168856, current: -1484587880943168428
serialVersionUID error for
org.hibernate.transform.AliasToBeanConstructorResultTransformer,
423 -4072100941733033705, current: 6343613536607369297
serialVersionUID error for org.hibernate.transform.AliasToBeanResultTransformer, 423
-179575653573696962, current: -2709497589076978457
serialVersionUID error for org.hibernate.transform.AliasToEntityMapResultTransformer, 423
-8118929763227667946, current: -2405787678887980439
serialVersionUID error for org.hibernate.transform.DistinctRootEntityResultTransformer,
423
3797619815073682793, current: -6421531770382016795
serialVersionUID error for org.hibernate.transform.PassThroughResultTransformer, 423
-5607542216723587138, current: -6250092103995979000
serialVersionUID error for org.hibernate.transform.RootEntityResultTransformer, 423
-4917445632344335347, current: -401189860501354979
serialVersionUID error for org.hibernate.transform.ToListResultTransformer, 423
-4074313067696983535, current: -848525466799394781
serialVersionUID error for org.hibernate.tuple.EntityModeToTuplizerMapping, 423
1409581259546543709, current: -4103954691458075312
serialVersionUID error for org.hibernate.tuple.entity.EntityMetamodel, 423
8144668897318202528, current: -3092923125279865080
serialVersionUID error for org.hibernate.type.CollectionType, 423 9196857140208999182,
current: -3459901995870846954
serialVersionUID error for org.hibernate.validator.ClassValidator, 423
4440843472793176969,
current: -285639016530032676
serialVersionUID error for org.jboss.console.plugins.AOPLister, 423 2293822949041302901,
current: 6335074475159280483
serialVersionUID error for org.jboss.console.plugins.monitor.CreateSnapshotServlet, 423
-6005190747212975396, current: 9072050896795183552
serialVersionUID error for
org.jboss.console.plugins.monitor.ManageStringThresholdMonitorServlet, 423
-7203943908702660859, current: 5055624992170603138
serialVersionUID error for
org.jboss.console.plugins.monitor.ManageThresholdMonitorServlet,
423 -3119457291398933381, current: 7517187306003255026
serialVersionUID error for org.jboss.ejb3.stateful.StatefulBeanContextReference, 423
2644760020735482423, current: -7622266426902284032
serialVersionUID error for org.jboss.iiop.codebase.CodebaseInterceptor, 423
1028391422637792082, current: 1466925921139453496
serialVersionUID error for org.jboss.iiop.csiv2.CSIv2IORInterceptor, 423
7726088578382542812, current: 7302520607200315151
serialVersionUID error for org.jboss.iiop.csiv2.CSIv2Policy, 423 -8487980590230439410,
current: -6034223973445233122
serialVersionUID error for org.jboss.iiop.csiv2.SASClientIdentityInterceptor, 423
-3416778273722755220, current: 3128832373028219398
serialVersionUID error for org.jboss.iiop.csiv2.SASCurrentImpl, 423 108332919461569666,
current: -4095181563309203111
serialVersionUID error for org.jboss.resource.adapter.jdbc.CachedPreparedStatement, 423
2085461257386274373, current: -1440572370373058834
serialVersionUID error for org.jboss.resource.metadata.ConnectorMetaData, 423
-3049391010669865389, current: 7047130842894140222
serialVersionUID error for org.jboss.resource.metadata.DescriptionMetaDataContainer, 423
2831943526217092377, current: -8988666040600469357
serialVersionUID error for org.jboss.security.NestableGroup, 423 -1516580228749739423,
current: 1752783303935807441
serialVersionUID error for org.jboss.security.NestablePrincipal, 423 -6163710574424115701,
current: 4628473920470890923
serialVersionUID error for org.jboss.security.SubjectSecurityProxyFactory, 423
-8679600309865839261, current: 1
serialVersionUID error for org.jboss.services.binding.DuplicateServiceException, 423
6008978514257402631, current: -4583185555225307385
serialVersionUID error for org.jboss.tm.iiop._TransactionServiceStub, 423
7928872789754027038, current: -1809524341133000858
serialVersionUID error for org.jboss.wsf.common.ResourceLoaderAdapter, 423
6701606092874682535, current: 6799639054488433438
serialVersionUID error for org.jboss.wsf.common.URLLoaderAdapter, 423
-5121659718738175599,
current: 8263115387770740414
serialVersionUID error for org.jboss.wsf.stack.jbws.EndpointServlet, 423
-1570754638811049627, current: -466208060351255402
Anil Saldhana wrote:
Dimitris, I do not think there is an easy fix for this unless we can
can replace the security libraries in JBAS5.0.GA. I suggest that we
retain the current suid fix that we did for 5.0.1.GA which matches the
suid for 4.x
Maybe we can have a wiki page with instructions to replace jbosssx.jar
and jbosssx-client.jar in 5.0.0.GA if someone encounters the
serialization incompatibility.
Anil Saldhana wrote:
> The compatibility tests we ran before AS5.0.GA release should have
> caught this. It did not.
> One way to fix this is:
> If the loading platform is non-JBAS 5.x, then use the longer suid.
> If the loading platform is JBAS5.x, then suid = 1L. This way versions
> 5.xGA onwards will be fine.
>
> Dimitris Andreadis wrote:
>> Well Jaikiran really means that changing the serialVersionUID for
>> SimplePrincipal breaks serialization compatibility with AS 5.0.1.GA
>>
https://jira.jboss.org/jira/browse/SECURITY-341
>>
>> But I understand what is fixed here is having serialVersionUID
>> compatibility with older 4.2.x releases. The only way to have both is
>> using special flags to switch IDs at load time, there is no other way.
>>
>> Obviously the mistake was that serialVersionUID for SimplePrincipal
>> changed in AS 5.0 but I'm curious how we didn't catch this in the
>> SerialVersionUIDUnitTestCase.
>>
>> It turns out we didn't check for libs in JBOSS_HOME/lib and
>> JBOSS_HOME/server/all, so when JBOSS_HOME/common/lib was added we've
>> missed the libs in there.
>>
>> Also, shouldn't errors of this type show in some of the compatibility
>> matrix tests?
>>
>> Anil Saldhana wrote:
>>>
https://jira.jboss.org/jira/browse/JBAS-6410 is fixed in
>>> Branch_5_0. That is where this was done.
>>>
>>> I still have jira issues open for 5.1 and trunk.
>>>
>>> Jaikiran Pai wrote:
>>>> While working on a unrelated issue, i noticed that the
>>>> serialVersionUID of org.jboss.security.SimplePrincipal (in
>>>> jbosssx.jar) has changed between JBossAS5.0 GA and the current 5.0
>>>> branch. The 5.0 branch uses 2.0.2.SP6 version of jbosssx.jar
>>>> whereas JBossAS5.0 GA uses 2.0.2.SP3. Between these versions, the
>>>> serialVersionUID of the SimplePrincipal class has changed from
>>>>
>>>> private static final long serialVersionUID = 1L; // In 2.0.2.SP3
>>>>
>>>> to
>>>>
>>>> private static final long serialVersionUID = 7701951188631723261L;
>>>> // In 2.0.2.SP6
>>>>
>>>> As a result JBossAS-5.0 GA clients (ex: servlets on JBossAS-5.0 GA)
>>>> fail against JBossAS-5.0.1.GA server (current 5.0 branch) when
>>>> doing the following:
>>>>
>>>> import org.jboss.security.client.SecurityClient;
>>>> import org.jboss.security.client.SecurityClientFactory;
>>>>
>>>> // psuedo code - do login
>>>> SecurityClient securityClient =
>>>> SecurityClientFactory.getSecurityClient();
>>>> securityClient.setSimple("jai", "pass");
>>>> securityClient.login();
>>>>
>>>> // lookup bean hosted on 5.0.1 GA
>>>> Properties props = new Properties();
>>>> props.put(Context.INITIAL_CONTEXT_FACTORY,
>>>> "org.jnp.interfaces.NamingContextFactory");
>>>>
props.put(Context.PROVIDER_URL,"jnp://localhost:1199");
>>>> Context ctx = new InitialContext(props);
>>>>
>>>> MySecureBean bean = (MySecureBean)
ctx.lookup("MySecureBean");
>>>> System.out.println("Got bean");
>>>> bean.doSomethingSecure("jai", 2);
>>>>
>>>>
>>>> 12:33:51,261 ERROR [STDERR] Caused by:
>>>> java.io.InvalidClassException: org.jboss.security.SimplePrincipal;
>>>> local class incompatible: stream classdesc serialVersionUID = 1,
>>>> local class serialVersionUID = 7701951188631723261
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:546)
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
>>>>
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
>>>>
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
>>>>
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
>>>>
>>>> 12:33:51,261 ERROR [STDERR] at
>>>> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
>>>>
>>>> ... // trimmed most of the unrelevant logs
>>>> 12:33:51,264 ERROR [STDERR] at
>>>>
org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
>>>>
>>>> 12:33:51,264 ERROR [STDERR] at
>>>>
org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
>>>>
>>>> 12:33:51,264 ERROR [STDERR] at $Proxy95.doSomething(Unknown
>>>> Source)
>>>> 12:33:51,264 ERROR [STDERR] at
>>>> org.myapp.servlet.SimpleServlet.doPost(SimpleServlet.java:40)
>>>>
>>>> The other way (5.0.1 GA clients against 5.0 GA server) fails too.
>>>> From SVN logs, it appears that the serialVersionUID change was
>>>> meant for compatibility with external tools like JBoss Tools. Any
>>>> way to make 5.0.1.GA and 5.0 GA compatible?
>>>>
>>>> On a related note, in the component-matrix for Branch_5_x is see
>>>> that the jbosssx package is still at 2.0.2.SP3:
>>>>
>>>>
<version.org.jboss.security>2.0.2.SP3</version.org.jboss.security>
>>>>
>>>> It's only upgraded to 2.0.2.SP6 in 5.0 branch.
>>>>
>>>> regards,
>>>> -Jaikiran
_______________________________________________
jboss-development mailing list
jboss-development(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-development