[jcifs] Re: NotSerializableException: jcifs.UniAddress when using jCIFS

Andrew Murphy amurphy at halogensoftware.com
Fri May 23 17:00:26 GMT 2008


Robert Baldock <robert.baldock <at> pfiks.com> writes:

> 
> 
> 
> Giampaolo -
>  
> OK, thanks for that.
>  
> Could I put a request in for this class to be set to be Serializable in a 
future release of jCIFS?
>  
>  
> Robert
> 
> 
> From: Giampaolo Tomassoni [mailto:Giampaolo <at> Tomassoni.biz]Sent: Fri 
23/05/2008 16:21To: Robert Baldock; jcifs <at> lists.samba.orgSubject: RE: 
[jcifs] NotSerializableException: jcifs.UniAddress when using jCIFS
> 
> 
> 
> The class jcifs.UniAddress doesn’t implement the java.io. Serializable 
interface, this is the reason of the warning you get.
>  
> You could change the declaration of class UniAddress in order to make it 
implement the Serializable interface. As long as you are instantiating 
UniAddress only with InetAddress “addr”s, you will probably avoid this warning 
this way. 
>  
> Giampaolo
>  
> 
> 
> 
> From: jcifs-bounces+giampaolo=tomassoni.biz <at> lists.samba.org 
[mailto:jcifs-bounces+giampaolo=tomassoni.biz <at> lists.samba.org] On Behalf 
Of Robert BaldockSent: Thursday, May 22, 2008 4:19 PMTo: jcifs <at> 
lists.samba.orgSubject: [jcifs] NotSerializableException: jcifs.UniAddress 
when using jCIFS
> 
> 
>  
> 
> Hi -
> 
> 
>  
> 
> 
> I'm a new member on this list.
> 
> 
>  
> 
> 
> I'm trying to get NTLM SSO working using a jCIFS filter in a web-app but, 
amongst other things, am seeing this error in my app server's logs:
> 
> 
>  
> 
> 
> WARNING! An attribute was set in the session that cannot serialize. Most 
application servers replicate the session using object serialization. 
NtlmChallenge[challenge=aaa,dc=xxx<1C>/yyy]java.io.NotSerializableException: 
jcifs.UniAddress        at java.io.ObjectOutputStream.writeObject0
(ObjectOutputStream.java:1075)        at 
java.io.ObjectOutputStream.defaultWriteFields
(ObjectOutputStream.java:1369)        at 
java.io.ObjectOutputStream.writeSerialData
(ObjectOutputStream.java:1341)        at 
java.io.ObjectOutputStream.writeOrdinaryObject
(ObjectOutputStream.java:1284)        at 
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)        
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)        
at com.vignette.portal.website.internal.HttpSessionWrapper.setAttribute
(HttpSessionWrapper.java:100)        at jcifs.http.NtlmHttpFilter.negotiate
(NtlmHttpFilter.java:151)        at jcifs.http.NtlmHttpFilter.doFilter
(NtlmHttpFilter.java:114)
> 
> 
> It's flagged as a "WARNING" but I would like to eliminate this as a possible 
cause of the issues I'm trying to resolve.
> 
> 
>  
> 
> 
> Does anyone know of a workaround/fix for this issue?
> 
> 
>  
> 
> 
> I'm using jCIFS 1.2.19.
> 
> 
>  
> 
> 
>  
> 
> 
> Robert Baldock
> 
> 
>  
> 
> 
>  
> 
> 
> 
> 
> 

Is this an application where you need to serialize the session?  Are you using 
session replication across nodes in a cluster?  If not, why not just avoid the 
issue by disabling session persistence in the environment?

If you do need the session persistence, then you will have to investigate 
Giampaolo's suggestion.

Andrew






More information about the jcifs mailing list