hi Peter, 

the problem was to do with tomcat 5.0.30 running on java 1.4.2, so it may not 
be relevant to tomcat 5.5 at all :( 


I have to say that that code is to conveniently display "real" session class on 
the page only, it employs java 1.4.2 trickery to bypass security constraints as 
session facade's attribute "session" is private :(. So feel free to remove the 
offending piece and check the session instance with debugger, it will show you 
the required information just as well.

I am however is going to modify the sample to work on java 1.5 as well, not 
sure how to implement that 1.4.2 workaround yet, but i'll figure it out.

Regards,
Vlad


-----Original Message-----
From:   Peter Rossbach [mailto:[EMAIL PROTECTED]
Sent:   Mon 2/14/2005 2:57 PM
To:     Tomcat Users List
Cc:     
Subject:        Re: dodgy session class
Sorry,
I want to test your example with JDK 5 and tomcat 5.5. (cvs head) but your
test.jsp used some sun internal classes that not supported with jdk 5.

test.jsp :::
reflectionFactory.newFieldAccessor(f).get(session)

The methode newFiledAccessor not exist anymore! Please change the 
example, then I can check the tests.
Please, open a bug report. It is easier to discuss this issue and you 
can upload your example

Thanx
Peter


[EMAIL PROTECTED] schrieb:

>sorry for the duplicate emails. 
>
>it doesnt seem like the attachement is getting through for one reason or 
>another, so here is the test case: http://www.jstripe.com/testcase.tar.gz
>
>
>-----Original Message-----
>From:  Ilyschenko, Vlad
>Sent:  Sun 2/13/2005 1:32 AM
>To:    [email protected]
>Cc:    
>Subject:       RE: dodgy session class
>thanks for your reply Peter. 
>
>unfortunately none of the applications has explicitly configured sessions 
>manager.
>
>I have managed to consistently reproduce the problem. The problem involves two 
>webapps, app1 and app2. App1 is distributable. App2 contains a filter that 
>forwards requests to app1. As it turns out all sessions created via filter are 
>instances of StandardSession! This is with app1 being distributable and with 
>cluster session manager. Making app2 distributable doesnt seem to have any 
>effect on the sessions that are being created in app1 context.
>
>I've attached a test case with two sample webapps, to run them you just have 
>to make sure crossContext is enabled for app2 and context of app1 is actually 
>called "/app1". App1 does some nasty hack to display what Class is actually 
>hiding behind session facade, so you would have to excuse me for that.
>
>Another thing that i've noticed along the way: if a request goes to app1 via 
>filter in app2 two sessions are created, one for each context. Filter in app2 
>does not create sessions explicitly (as you will see from the example) and 
>session would not be created for app2 context if filter didnt forward requests 
>to "app1" context. The question is why session gets created implicitly in 
>context of "app2"? It is not that I cannot live with it, just cant think of a 
>logical explanation to this. Ideas anyone?
>
>Regards,
>Vlad
>
>
>-----Original Message-----
>From:  Peter Rossbach [mailto:[EMAIL PROTECTED]
>Sent:  Sat 2/12/2005 9:22 AM
>To:    Tomcat Users List
>Cc:    
>Subject:       Re: dodgy session class
>Hmm,
>
>please check that all your applications with distributable=true have no 
>configured Manager in there context.xml's
>
>regards
>Peter
>
>Filip Hanik - Dev schrieb:
>
>  
>
>>Any chance you have a test case to reproduce this?
>>Shouldn't happen, unless the way sessions are created have changed.
>>
>>Filip
>>
>>----- Original Message -----
>>From: <[EMAIL PROTECTED]>
>>To: <[email protected]>
>>Sent: Friday, February 11, 2005 11:47 AM
>>Subject: dodgy session class
>>
>>
>>Hi,
>>
>>
>>
>>I'm running tomcat 5.0.30 on two machines A and B (Linux RHAS3).
>>
>>
>>
>>When tomcat A restarts it fails to sync session state with "session
>>state not received" or something to that effect and tomcat B logs this
>>message:
>>
>>
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>Unable to receive message through TCP channel
>>
>>java.lang.ClassCastException
>>
>>       at
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR
>>eceived(SimpleTcpReplicationManager.java:530)
>>
>>       at
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD
>>ataReceived(SimpleTcpReplicationManager.java:596)
>>
>>       at
>>org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim
>>pleTcpCluster.java:580)
>>
>>       at
>>org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70
>>)
>>
>>       at
>>org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep
>>licationThread.java:129)
>>
>>       at
>>org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT
>>hread.java:67)
>>
>>
>>
>>I changed SimpleTcpReplicationManager to output class names of the
>>sessions it is trying to cast to ReplicatedSession and got the following
>>picture:
>>
>>
>>
>>11 Feb 2005 17:21:44 [Cluster-MembershipReceiver] INFO
>>org.apache.catalina.cluster.tcp.SimpleTcpCluster  - Replication member
>>added:org.apache.catalina.cluster.mcast.McastMember[tcp://192.168.56.21:
>>4001,192.168.56.21,4001, alive=3]
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.cluster.session.ReplicatedSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] INFO
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>SessionClass=org.apache.catalina.session.StandardSession
>>
>>11 Feb 2005 17:21:49
>>[org.apache.catalina.cluster.tcp.TcpReplicationThread[4]] ERROR
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager  -
>>Unable to receive message through TCP channel
>>
>>java.lang.ClassCastException
>>
>>       at
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageR
>>eceived(SimpleTcpReplicationManager.java:530)
>>
>>       at
>>org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageD
>>ataReceived(SimpleTcpReplicationManager.java:596)
>>
>>       at
>>org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(Sim
>>pleTcpCluster.java:580)
>>
>>       at
>>org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:70
>>)
>>
>>       at
>>org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpRep
>>licationThread.java:129)
>>
>>       at
>>org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationT
>>hread.java:67)
>>
>>
>>
>>
>>
>>How come a clustered application would have sessions of type
>>org.apache.catalina.session.StandardSession? Does anyone have any ideas?
>>
>>
>>
>>Regards,
>>
>>Vlad
>>
>>
>>
>>
>>********************************************************************************
>>The information contained in this email message may be confidential. If you 
>>are not the intended recipient, any use, interference
>>with, disclosure or copying of this material is unauthorised and prohibited. 
>>Although this message and any attachments are believed
>>to be free of viruses, no responsibility is accepted by T&F Informa for any 
>>loss or damage arising in any way from receipt or use
>>thereof.  Messages to and from the company are monitored for operational 
>>reasons and in accordance with lawful business practices.
>>If you have received this message in error, please notify us by return and 
>>delete the message and any attachments.  Further
>>enquiries/returns can be sent to [EMAIL PROTECTED]
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>> 
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
>
>
>
>
>
>********************************************************************************
>The information contained in this email message may be confidential. If you 
>are not the intended recipient, any use, interference with, disclosure or 
>copying of this material is unauthorised and prohibited. Although this message 
>and any attachments are believed to be free of viruses, no responsibility is 
>accepted by T&F Informa for any loss or damage arising in any way from receipt 
>or use thereof.  Messages to and from the company are monitored for 
>operational reasons and in accordance with lawful business practices. >If you 
>have received this message in error, please notify us by return and delete the 
>message and any attachments.  Further enquiries/returns can be sent to [EMAIL 
>PROTECTED]
>
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







********************************************************************************
The information contained in this email message may be confidential. If you are 
not the intended recipient, any use, interference with, disclosure or copying 
of this material is unauthorised and prohibited. Although this message and any 
attachments are believed to be free of viruses, no responsibility is accepted 
by T&F Informa for any loss or damage arising in any way from receipt or use 
thereof.  Messages to and from the company are monitored for operational 
reasons and in accordance with lawful business practices. 
If you have received this message in error, please notify us by return and 
delete the message and any attachments.  Further enquiries/returns can be sent 
to [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to