You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by sp...@gmx.eu on 2014/10/22 21:20:12 UTC

JDBCStore

Hi,

when I deploy a new app version with incompatible serialization version of
same classes I get:

java.io.InvalidClassException:
org.hibernate.collection.internal.AbstractPersistentCollection; local class
incompatible: stream classdesc serialVersionUID = -8914173462748164853,
local class serialVersionUID = -7238232378593030571,	at
java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:615),	at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620),
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515),
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620),
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515),
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769),
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:370),	at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:
1595),	at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.j
ava:1060),	at
org.apache.catalina.session.JDBCStore.load(JDBCStore.java:657),	at
org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:159),
at

Is there something in Tomcat to configure that can solve this problem?

If not, how to handle such a problem? Especially in clusters where servers
get updated one by one and not all at once.

Thank you


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: JDBCStore

Posted by sp...@gmx.eu.
> Are you using distributed sessions? If so, you'll have to override the
> internal serialization mechanism and do it all manually in a way that
> is going to be cross-version-compatible.
> 
> It's not impossible, but it does take some planning and forethought.

OK; thought so.
Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JDBCStore

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

To whom it may concern,

On 10/22/14 3:20 PM, spring@gmx.eu wrote:
> when I deploy a new app version with incompatible serialization
> version of same classes I get:
> 
> java.io.InvalidClassException: 
> org.hibernate.collection.internal.AbstractPersistentCollection;
> local class incompatible: stream classdesc serialVersionUID =
> -8914173462748164853, local class serialVersionUID =
> -7238232378593030571,	at 
> java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:615),
> at 
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620),
>
> 
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515),
> at
> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620),
>
> 
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515),
> at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769),
>
> 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
>
> 
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
> at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
>
> 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
>
> 
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
> at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
>
> 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
>
> 
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
> at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
>
> 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989),
>
> 
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913),
> at 
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796),
>
> 
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348),	at
> java.io.ObjectInputStream.readObject(ObjectInputStream.java:370),
> at 
> org.apache.catalina.session.StandardSession.readObject(StandardSession.java:
>
> 
1595),	at
> org.apache.catalina.session.StandardSession.readObjectData(StandardSession.j
>
> 
ava:1060),	at
> org.apache.catalina.session.JDBCStore.load(JDBCStore.java:657),	at 
> org.apache.catalina.session.StoreBase.processExpires(StoreBase.java:159),
>
> 
at
> 
> Is there something in Tomcat to configure that can solve this
> problem?

No. You will have to change your code to make it
serialization-compatible with the old code if you don't want to have
this problem.

You can configure Tomcat not to serialize sessions, but then you
obviously don't get the benefit of persisting sessions across a restart.

> If not, how to handle such a problem? Especially in clusters where
> servers get updated one by one and not all at once.

Are you using distributed sessions? If so, you'll have to override the
internal serialization mechanism and do it all manually in a way that
is going to be cross-version-compatible.

It's not impossible, but it does take some planning and forethought.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUSDKhAAoJEBzwKT+lPKRYiSsP/3SBlNzlA86+FU4c6KqsDhcv
5FdM/pkaKd2gQPf+m2PQMDG/LhOzfJUW8S65xTlg2YfTRFx7XBB4O0xHm7SZBH0B
/Z0jSsbFHruZDesvdE+NM/5C4c2DjiC90ndk6YK3kHy1CCZQsDWuSGfoXe50IR6u
MrCV842trrs0PpBngjbFh4Ha0UDuk8ZpRmw0dJ4V4a3Cta7jNZO3cQY0/vPqhNs+
hJ8GcEYpnqnltSrlwI3Eht5ckuZenarLiHl2o16sV2XL/VLoDwWN2+bajXkT6bb2
DOqMBys3fWUnu5icnCccbtT36GjSPsMqpwPfEStxb5arJzNYi1rz+B3OX8RTAFrX
01QOqz8zMo0tYS6UkCyVFIQ5mSTQjH0ewgnaOyQjfvakvSkbfjF9XFb8p1PH4LXN
bmO2K4VaOBCu2FQtwsVe+8l9tjvMLTqHniBlm9U7f9ows/JoZqrt1riXtVuXXgOI
QC9gZK4/Xsp9sVpbplc+FLTbsllCUxe/lIsGYV6xEeKHvZroO58cEN3swebYsosm
ro4k9mXK1NwaG8l6byd1R2PzBg/0o49+NpLegCnEX7mf634ZuVFiMApmSZxbW6jE
G+EJmFaGiTTziOqqaTCT40ZfyttbCSE2Oox0mkUOUVPtzUUkL1B72UXeq9X4Bc9i
vuIMhP0bVHwMtPkiCMMh
=XjD+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: JDBCStore

Posted by sp...@gmx.eu.
> Well, I think it solves your problem. Old session-ids will 
> get routed to 
> the old version of your webapp and thus will be deserialized 
> without a 
> problem. New sessions will be created in the new version.

Yes, but the session persistence will go into the same table rows -> chrash
while deserialization.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JDBCStore

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 23.10.2014 um 19:45 schrieb spring@gmx.eu:
>>>> You may want to have a look at parallel deployment (
>>>> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html).
>>>
>>> At the moment /Catalina/localhost/ is used as value in column app. It
>>> is the
>>> root app.
>>>
>>> Would a war ROOT##2.war use another value?
>> No.
>
> OK, then this would not solve the prob.
Well, I think it solves your problem. Old session-ids will get routed to 
the old version of your webapp and thus will be deserialized without a 
problem. New sessions will be created in the new version.

This will enable a smooth transition from your old version to the new one.

Regards
  Felix
>
> Thx!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: catalina.out filled with binary data

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jeffrey,

Please don't hijack threads by replying to an existing message and
changing the subject. Instead, please start a new mail message to
users@tomcat.apache.org if you have a new question.

Thanks,
- -chris

On 10/24/14 11:58 AM, Jeffrey D. Fulmer wrote:
> We have an apache/tomcat application running on AS/400. It dies
> several times a week. This is a vendor supplied application over
> which I have little control. Unfortunately, the vendor hasn't done
> a good job trouble-shooting the problem.
> 
> After a recent crash, I looked at the logs to see if I could
> pinpoint the request that preceded the crash. I discovered that
> catalina.out was filled with binary data. Then entire log looks
> like this:
> 
> ����k������z���k��z�����k����z�������k������z��������k��z�����k����z�������k������z������k��z�����k����z�������k������z������k��z�����k����z�������k������z���k��z�����k����z�������k������z����������k��z�����k����z�������k���z������k����z������k����z����л�%م������z@�����z��%Á��z@�������zk���������z�����m�����m�����k����������z�������z��
�
�������������������k��z�����k����z�������k������z����k��z�����k����z�������k������z���k��z�����k����z�������k������z��������k��z�����k����z�������k������z������k��z�����k����z�������k������z�������k��z�����k����z�������k������z���k��z�����k����z�������k������z����������k��z�����k����z�������k���z������k����z������k����z����л�%م������
z
@�����z��%Á��z@�������zk���������z�����m�����m�����k����������z�������z��������������������k��z�����k����z�������k������z����k��z�����k����z�������k������z���k��z�����k����z�������k������z��������k��z�����k����z�������k������z������k��z�
>
>  I'm not sure what to make of this. It feels like a native problem,
> libraries, JVM, JDBC, etc. How do I get to the bottom of this?
> 
> Regards, Jeff
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUSqHVAAoJEBzwKT+lPKRYJLsQAIwCxFDOa91nVWS50J6b+hwI
057FY0IVxBTaJ5K/Cxz0aY9XGSej3z/GMeQeAEHcs3UEPMEOFD9NAHoOr2bkA5L+
UBxtchU5UvnFrylZqxLDMxGGB/JzDk1V4odl1xgXtkTqsWUascVbUwfDTGcgYv0o
TaKydlLBByW0FsOF4hbQHQvZHLgK9OZyhqIqA66hmn5SPzFFkqTlRO0EH8gj2PxA
0+K8UxcPs0/oOt9zIvm6xKny4BtPtcMiC5Xf6yfp9+cxGswg68hIUS/ebDT5z299
ubQ97uy/jTflHQ8KF1WJiETIQ+l1UZ2Tf6ApluMHHJaS6JZgcEnLmk7NnMOa4M3b
VECXv5lo0zOnNHJyXw2xdQPWtZm8Q5nR8+UQQ+Jvkd4ywPKxzpUgjok9MYEvzvUO
HatSDuSbhiNtmTk2XP5ogfqiVulCcnEv6V/xeZxSwIZoBN00qj43IICVIMN0EuH/
yVS6Y5qsxRETTo8QcEgEpinfiHyu188koTTkWJWe2qtDG5i9kQNy0t612ymA/ykW
I9Wpqb4gjcI8WRGuNDnstkX8e8fJnD5kN5bM1S9QmXzGnDfyZtMzyhuHNQPBvGD5
qhpH3Virni+sCNqZ/ffjl3uFf+jkqkBeaVnRNQyR4ncjwZ/sQPcNnpfdP6uPl37Y
tKBchQw8INKEbmC2vc5m
=v11U
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


catalina.out filled with binary data

Posted by "Jeffrey D. Fulmer" <JD...@Armstrong.com>.
We have an apache/tomcat application running on AS/400. It dies several times a week. This is a vendor supplied application over which I have little control. Unfortunately, the vendor hasn't done a good job trouble-shooting the problem.

After a recent crash, I looked at the logs to see if I could pinpoint the request that preceded the crash. I discovered that catalina.out was filled with binary data. Then entire log looks like this:

����k������z���k��z�����k����z�������k������z��������k��z�����k����z�������k������z������k��z�����k����z�������k������z������k��z�����k����z�������k������z���k��z�����k����z�������k������z����������k��z�����k����z�������k���z������k����z������k����z����л�%م������z@�����z��%Á��z@�������zk���������z�����m�����m�����k����������z�������z��������������������k��z�����k����z�������k������z����k��z�����k����z�������k������z���k��z�����k����z�������k������z��������k��z�����k����z�������k������z������k��z�����k����z�������k������z�������k��z�����k����z�������k������z���k��z�����k����z�������k������z����������k��z�����k����z�������k���z������k����z������k����z����л�%م������z@�����z��%Á��z@�������zk���������z�����m�����m�����k����������z�������z��������������������k��z�����k����z�������k������z����k��z�����k����z�������k������z���k��z�����k����z�������k������z��������k��z�����k����z�������k������z������k��z�

I'm not sure what to make of this. It feels like a native problem, libraries, JVM, JDBC, etc. How do I get to the bottom of this? 

Regards,
Jeff


Re: JDBCStore

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 23.10.2014 um 19:45 schrieb spring@gmx.eu:
>>>> You may want to have a look at parallel deployment (
>>>> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html).
>>>
>>> At the moment /Catalina/localhost/ is used as value in column app. It
>>> is the
>>> root app.
>>>
>>> Would a war ROOT##2.war use another value?
>> No.
>
> OK, then this would not solve the prob.
Sorry, the name used for the app column changes with the version number. 
So you can use it.

Felix
>
> Thx!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: JDBCStore

Posted by sp...@gmx.eu.
> >> You may want to have a look at parallel deployment ( 
> >> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html).
> >
> >
> >At the moment /Catalina/localhost/ is used as value in column app. It
> >is the
> >root app.
> >
> >Would a war ROOT##2.war use another value?
> No. 


OK, then this would not solve the prob.

Thx!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: JDBCStore

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 23. Oktober 2014 13:34:22 MESZ, schrieb spring@gmx.eu:
>> You may want to have a look at parallel deployment ( 
>> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html).
>
>
>At the moment /Catalina/localhost/ is used as value in column app. It
>is the
>root app.
>
>Would a war ROOT##2.war use another value?
No. 

Felix
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: JDBCStore

Posted by sp...@gmx.eu.
> You may want to have a look at parallel deployment ( 
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html).


At the moment /Catalina/localhost/ is used as value in column app. It is the
root app.

Would a war ROOT##2.war use another value?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: JDBCStore

Posted by Felix Schumacher <fe...@internetallee.de>.

Am 22. Oktober 2014 21:20:12 MESZ, schrieb spring@gmx.eu:
>Hi,
>
>when I deploy a new app version with incompatible serialization version
>of
>same classes I get:
>
>java.io.InvalidClassException:
>org.hibernate.collection.internal.AbstractPersistentCollection; local
...
>
>Is there something in Tomcat to configure that can solve this problem?

You may want to have a look at parallel deployment ( http://tomcat.apache.org/tomcat-7.0-doc/config/context.html).

Regards
Felix
>
>If not, how to handle such a problem? Especially in clusters where
>servers
>get updated one by one and not all at once.
>
>Thank you
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org