I'm not familiar with the Wicketopia source, but doing a quick scan I can't
find any EJBs in there. The problem in this case occurs if the FooStateless
class is @Stateless. Changing this to @ApplicationScoped, the problem goes
away.

On Thu, Apr 12, 2012 at 8:28 AM, Jonathan Tougas <jtou...@gmail.com> wrote:

> A stateless bean is injected into the home page class. Load the page in
> two tabs (so twice in the same session), then on the first tab, press the
> button. The error occurs every time in this scenario.
>
> On Thu, Apr 12, 2012 at 2:41 AM, Martin Grigorov <mgrigo...@apache.org>wrote:
>
>> Hi,
>>
>> On Wed, Apr 11, 2012 at 10:54 PM, Jonathan Tougas <jtou...@gmail.com>
>> wrote:
>> > I'm running Wicket 1.5 on JBoss 7.1.1 with some CDI thrown in to the
>> mix.
>> > In certain cases when Wicket deserializes a Page containing a reference
>> to
>> > a CDI bean, I get this exception:
>>
>> In what cases exactly ?
>> Because the problem is
>>
>> Caused by: java.lang.ClassNotFoundException:
>> org.jboss.msc.service.ServiceName from [Module
>> "deployment.wicket.war:main"
>> from Service Module Loader]
>>
>> In what cases this class is no more loadable by the current class loader ?
>>
>> >
>> > 15:10:30,841 ERROR [org.apache.wicket.request.RequestHandlerStack]
>> > (http--127.0.0.1-8080-1) Error detaching RequestHandler:
>> > java.lang.RuntimeException: Could not deserialize object using: class
>> >
>> org.apache.wicket.serialize.java.JavaSerializer$ClassResolverObjectInputStream
>> > at
>> >
>> org.apache.wicket.serialize.java.JavaSerializer.deserialize(JavaSerializer.java:137)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.pageStore.DefaultPageStore.deserializePage(DefaultPageStore.java:388)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.pageStore.DefaultPageStore.getPage(DefaultPageStore.java:127)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.page.PageStoreManager$SessionEntry.getPage(PageStoreManager.java:192)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:327)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:102)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:50)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:257)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:117)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.handler.PageProvider.getStoredPage(PageProvider.java:292)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.handler.PageProvider.isNewPageInstance(PageProvider.java:205)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.handler.PageProvider.getPageParameters(PageProvider.java:184)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.handler.logger.PageLogData.<init>(PageLogData.java:51)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.handler.logger.ListenerInterfaceLogData.<init>(ListenerInterfaceLogData.java:56)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.detach(ListenerInterfaceRequestHandler.java:134)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.detach(RequestCycle.java:792)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.RequestHandlerStack.detach(RequestHandlerStack.java:180)
>> > [wicket-request-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:596)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:539)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:287)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:185)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:241)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)
>> > [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
>> > at
>> >
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> >
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
>> > [jbossweb-7.0.10.Final.jar:]
>> > at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]
>> > Caused by: java.lang.ClassNotFoundException:
>> > org.jboss.msc.service.ServiceName from [Module
>> "deployment.wicket.war:main"
>> > from Service Module Loader]
>> > at
>> org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
>> > at
>> >
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
>> > at
>> >
>> org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
>> > at
>> >
>> org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
>> > at
>> >
>> org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
>> > at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_02]
>> > at java.lang.Class.forName(Class.java:264) [rt.jar:1.7.0_02]
>> > at
>> >
>> org.apache.wicket.application.AbstractClassResolver.resolveClass(AbstractClassResolver.java:108)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> >
>> org.apache.wicket.serialize.java.JavaSerializer$ClassResolverObjectInputStream.resolveClass(JavaSerializer.java:216)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > at
>> java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
>> > [rt.jar:1.7.0_02]
>> > at java.util.HashMap.readObject(HashMap.java:1043) [rt.jar:1.7.0_02]
>> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> > [rt.jar:1.7.0_02]
>> > at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_02]
>> > at
>> java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at
>> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
>> > [rt.jar:1.7.0_02]
>> > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
>> > [rt.jar:1.7.0_02]
>> > at
>> >
>> org.apache.wicket.serialize.java.JavaSerializer.deserialize(JavaSerializer.java:120)
>> > [wicket-core-1.5.5.jar:1.5.5]
>> > ... 34 more
>> >
>> > I put up a simple project to demonstrate this at
>> > http://code.google.com/p/jonatoga/source/browse/#svn%2Fwicket-ex1. To
>> > reproduce the problem load the home page in two tabs, then on the first
>> > tab, press the button.
>> >
>> > Any ideas as to what's going on?
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>

Reply via email to