Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 862729525 for ; Sun, 18 Mar 2012 21:49:36 +0000 (UTC) Received: (qmail 49580 invoked by uid 500); 18 Mar 2012 21:49:35 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 49551 invoked by uid 500); 18 Mar 2012 21:49:35 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 49542 invoked by uid 99); 18 Mar 2012 21:49:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2012 21:49:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.214.173] (HELO mail-ob0-f173.google.com) (209.85.214.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Mar 2012 21:49:28 +0000 Received: by obbwd20 with SMTP id wd20so933101obb.32 for ; Sun, 18 Mar 2012 14:49:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=R7ZA171+nr1lU/mpBkJrvYQOdhIWYdAc5eKdROCoO/c=; b=kWis2bffSDghh1uMnF7q2FxmIDy3oo2tdlXNu+uF3j3Wj82FT8ZzsLS2u1LKfTLWdk phS4uwSvxdmqedwQFqr+A7P3I99UM9BfugpIu9SAV4KUx3VLbZFVJxrvYLCtTmWahLGZ t2ogX6brAzUSkZaaIPmhvbr1aZ2MF7c/DAlBVbS5cBQOJnPdlMBGjlGva+NyFznTeJBn w0stiZ9I43iM+D/2vxk1pN3mH4dreCUA4psPhe/g/rL1zP+Nvdn3PBYyEYkdOFbuYcad R54u+qXDVW2/fad3rNtcuwJRUfLAF2ODhXLepq/HLCV6s4QFlelGE++M97F7UNLm5gOu 75pQ== Received: by 10.182.231.41 with SMTP id td9mr11029846obc.22.1332107345688; Sun, 18 Mar 2012 14:49:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.222.5 with HTTP; Sun, 18 Mar 2012 14:48:45 -0700 (PDT) In-Reply-To: References: From: Jeremy Thomerson Date: Sun, 18 Mar 2012 17:48:45 -0400 Message-ID: Subject: Re: Wicket 1.5: sessions To: users@wicket.apache.org Content-Type: multipart/alternative; boundary=f46d0446310a2479ea04bb8b6949 X-Gm-Message-State: ALoCoQktAZ/9NeA+VuW01Wg85cWXJXCVGF5FJSMJA88rWBJrOaY+3AHa2qKgvslb+31q2MwOyuCJ X-Virus-Checked: Checked by ClamAV on apache.org --f46d0446310a2479ea04bb8b6949 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Put a breakpoint in the WebSession constructor and see where it's getting called. Or, perhaps you won't see anything there if this is happening because you are in a serialized WebSession. You can test that by clearing all cookies, etc, and starting a new session. --=20 Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* On Sun, Mar 18, 2012 at 5:40 PM, Pierre Goupil wrot= e: > Yes, absolutely: > > > public Session newSession(final Request request, final Response > response) > { > return new MySession(request); > } > > > > > On Sun, Mar 18, 2012 at 10:32 PM, Jeremy Thomerson < > jeremy@wickettraining.com> wrote: > > > On Sun, Mar 18, 2012 at 5:08 PM, Pierre Goupil > >wrote: > > > > > Good evening, > > > > > > I'm currently in the process of migrating my app from Wicket 1.4 to > > Wicket > > > 1.5. I've read the migration guide and everything seems to go fine, > > except > > > for session management. > > > > > > Here's my code: > > > > > > public class MySession extends WebSession > > > { > > > > > > public static MySession get() > > > { > > > return (MySession)Session.get(); > > > } > > > > > > } > > > > > > When call, the get() method gives this stacktrace: > > > > > > Caused by: java.lang.ClassCastException: > > > org.apache.wicket.protocol.http.WebSession cannot be cast to MySessio= n > > > > > > Any help, please? > > > > > > Regards, > > > > > > Pierre Goupil > > > > > > > > > Does your application override newSession and return a new MySession? > > > > -- > > Jeremy Thomerson > > http://wickettraining.com > > *Need a CMS for Wicket? Use Brix! http://brixcms.org* > > > > > > -- > Si tu penses que la violence ne r=E9sout rien, c'est que tu n'as pas tap= =E9 > assez fort. > --f46d0446310a2479ea04bb8b6949--