You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Vincent MATHON (JIRA)" <ji...@apache.org> on 2007/09/26 17:36:52 UTC

[jira] Created: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

spring component injection leads to deserialization error (or page expiration) 
-------------------------------------------------------------------------------

                 Key: WICKET-1013
                 URL: https://issues.apache.org/jira/browse/WICKET-1013
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 1.3.0-beta2
         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
            Reporter: Vincent MATHON


I made several tests on spring component injection and obtained the following results.

The test is simply a main page accessing a target page through a link.

1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
    a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
    b) The link is a BookMarkablePageLink ==> it works.

2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
    a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
    b) The link is a BookMarkablePageLink ==> it works.

3/ A spring component is accessed through a service locator when needed (so it's not a class field)
      It works for both  PageLink and BookMarkablePageLink 

Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
I suspect that this is not the expected behaviour.


Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531117 ] 

Igor Vaynberg commented on WICKET-1013:
---------------------------------------

so exactly how does the skinny war impact serialization? the war doesnt contain the dependencies which is ok..but they are still available via the classloader correct? so why does this impact serialization?

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531430 ] 

Vincent MATHON commented on WICKET-1013:
----------------------------------------

A/ Wicket Serialization:

2007-10-01 09:41:24,604 ERROR [org.apache.wicket.RequestCycle] java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at org.apache.wicket.util.io.ClassStreamHandler.invokeReadMethod(ClassStreamHandler.java:504)
	at org.apache.wicket.util.io.WicketObjectInputStream.readObjectOverride(WicketObjectInputStream.java:96)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:342)
	at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:396)
	at org.apache.wicket.protocol.http.FilePageStore.readPage(FilePageStore.java:541)
	at org.apache.wicket.protocol.http.FilePageStore.getPage(FilePageStore.java:455)
	at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:192)
	at org.apache.wicket.Session.getPage(Session.java:725)
	at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:427)
	at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1090)
	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
	at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257)
	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.wicket.util.io.ClassStreamHandler.invokeReadMethod(ClassStreamHandler.java:492)
	... 33 more
Caused by: org.apache.wicket.util.io.WicketSerializeableException: Error reading field: outsideWARServiceEJB3 for object class: class com.amdm.testbackbutton.application.presentation.OutsideWARServiceEJB3Page
NOTE: if you feel Wicket is at fault with this exception, please report to the mailing list. You can switch to JDK based serialization by calling: org.apache.wicket.util.lang.Objects.setObjectStreamFactory(new IObjectStreamFactory.DefaultObjectStreamFactory()) e.g. in the init method of your application
	at org.apache.wicket.util.io.ClassStreamHandler.readFields(ClassStreamHandler.java:427)
	at org.apache.wicket.util.io.WicketObjectInputStream.defaultReadObject(WicketObjectInputStream.java:164)
	at org.apache.wicket.protocol.http.FilePageStore$PageSerializer.deserializePage(FilePageStore.java:874)
	at org.apache.wicket.Page.readObject(Page.java:1260)
	... 38 more
Caused by: java.lang.NullPointerException
	at org.apache.wicket.util.io.ClassStreamHandler.createObject(ClassStreamHandler.java:304)
	at org.apache.wicket.util.io.WicketObjectInputStream.readObjectOverride(WicketObjectInputStream.java:93)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:342)
	at org.apache.wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.readField(ClassStreamHandler.java:872)
	at org.apache.wicket.util.io.ClassStreamHandler.readFields(ClassStreamHandler.java:417)








B/ Java Serialization

2007-10-01 09:48:58,385 ERROR [org.apache.wicket.RequestCycle] Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory
java.lang.RuntimeException: Could not deserialize object using `org.apache.wicket.util.io.IObjectStreamFactory$DefaultObjectStreamFactory` object factory
	at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:410)
	at org.apache.wicket.protocol.http.FilePageStore.readPage(FilePageStore.java:541)
	at org.apache.wicket.protocol.http.FilePageStore.getPage(FilePageStore.java:455)
	at org.apache.wicket.protocol.http.SecondLevelCacheSessionStore$SecondLevelCachePageMap.get(SecondLevelCacheSessionStore.java:192)
	at org.apache.wicket.Session.getPage(Session.java:725)
	at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:427)
	at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1090)
	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1176)
	at org.apache.wicket.RequestCycle.request(RequestCycle.java:499)
	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:257)
	at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:127)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.StreamCorruptedException: unexpected block data
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1319)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
	at org.apache.wicket.util.lang.Objects.byteArrayToObject(Objects.java:396)

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532411 ] 

Vincent MATHON commented on WICKET-1013:
----------------------------------------

I have found another workaround that works only with Java Serialization. If you change to true 
<attribute name="UseJBossWebLoader">true</attribute> in the jboss-service.xml file of the jbossweb-tomcat55.sar
it works fine il all cases.
That means that you must use JBoss unified class loader in place of an isolated class loader for web applications when using skinny WAR packaging. Thus, all classes are loaded by the JBoss unified class loader which seems indeed more coherent.

Finally, I don't know if it's a Wicket bug nor if it's possible to programmatically deal with such problem in Wicket code...

regards
Vincent

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530513 ] 

Igor Vaynberg commented on WICKET-1013:
---------------------------------------

could you provide a quickstart that demonstrates this?

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-1013.
-----------------------------------

       Resolution: Invalid
    Fix Version/s: 1.3.0-beta4
         Assignee: Igor Vaynberg

dont think this is a wicket bug or that we can provide any sort of code to deal with it. of course if you are using such a scheme then wicket serialization is not meant to be used.

seems to me like this was a jboss configuration issue.

if you dont mind please create a wiki page that explains this stuff so it might be helpful to others in the future.

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12532586 ] 

Vincent MATHON commented on WICKET-1013:
----------------------------------------

I agree, although I still not understand why the Wicket Serialization scheme does not need special JBoss configuration to work (at least for pages that do not contain proxy as class field).

regards
Vincent

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700692#action_12700692 ] 

Vincent MATHON commented on WICKET-1013:
----------------------------------------

It depends on your configuration. In my case I use a skinny war packaging with an EAR containing a WAR for the web application and JARs for EJB3 services. With this configuration I have to ensure that service classes are loaded by the same classloader for a correct processing of Wicket serialization. I described how to achieve this with JBoss 4.2.1, unfortunately I don' know how to do this with Weblogic. However, if you don't want to modify your server configuration, you can retrieve your services directly  from the Spring application context when needed (not as a class field to avoid serialization issues).

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531244 ] 

Igor Vaynberg commented on WICKET-1013:
---------------------------------------

hrm, so java fails right away before it even gets to the proxy? thats not good. can you paste the stactrace of the error please?

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531220 ] 

Vincent MATHON commented on WICKET-1013:
----------------------------------------

I don't know why but it does. Pages serialize correctly (at least silently). One must wait page deserialization from Wicket second level cache to see a problem.

Concerning the serialization Scheme, it appears that Wicket mechanism using Java Serialization becomes unable to deserialize even the simplest  dummy page when skinny war packaging is used. However, Wicket serialization scheme is able to deserialize pages that do not have proxy field. I read a post where you have written  that Wicket serialization scheme does not handle all cases like proxy. Thus I suspect that something in this code solve the skinny WAR problem but one still observe the proxy serialization limitations.

Vincent

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vaibhav Varade (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693663#action_12693663 ] 

Vaibhav Varade commented on WICKET-1013:
----------------------------------------

I am facing the same problems, I am using Wicket 1.3.4 , Weblogic 10.3, Java 6, 
Do I also need to do some changes in configuration for classloader in weblogic.? If yes what is the configuration change for weblogic...

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531049 ] 

Vincent MATHON commented on WICKET-1013:
----------------------------------------

I found an interesting behaviour.

Configuration: 

A/
 - default Java Serialization Scheme.
 - Skinny war
The 7 tests I made lead to alternatively PageExpiration or Serialization problem when I play with back and forward button
of the Navigator (Important, I use IE6, with Firefox 2.0.0.7 I have no problem because meta tags in HTML seem to have no effect on its cache when no POST is send to the server, thus, wicket never deserializes pages in such case, so no bug...).

B/
- Wicket Serialization Scheme
- Skinny war
The DummyPage and the ServiceLocatorPage work fine, the 5 others (with services injected as page field) I still have problems. Thus the servicelocator is another workaround.

I hope this helps
Vincent

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12531007 ] 

Vincent MATHON commented on WICKET-1013:
----------------------------------------

Just to provide further details. We use
- JBoss 4.05 default configuration with EJB3 support (via jems deployer) (for instance Isolated = false callByValue = false in the ear-deployer configuration file)
- JDK 1.5.0_11
- Tests have been done on a Windows 2000 computer.
- Workarounds at that time:
    1/ Packaging using fat WAR scheme: works for simple prototypes, becomes tricky with real world application.
    2/ Deploying the war and EJB on different servers.

Both workarounds lead to a more complexe release process. Help would be appreciated to find another solution.

Thanks a lot,
Vincent

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vaibhav Varade (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vaibhav Varade updated WICKET-1013:
-----------------------------------

    Comment: was deleted

(was: I am facing the same problems, I am using Wicket 1.3.4 , Weblogic 10.3, Java 6, 
Do I also need to do some changes in configuration for classloader in weblogic.? If yes what is the configuration change for weblogic...)

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.0-beta4
>
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1013) spring component injection leads to deserialization error (or page expiration)

Posted by "Vincent MATHON (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vincent MATHON updated WICKET-1013:
-----------------------------------

    Attachment: TestBackButton-light.zip

I send a zip file of tests I realize. Unzip the file (it is an eclipse project). This project can be built with maven2.

Note: I identify the bug. This is due to the packaging of the ear that follow the Skinny WAR scheme
(see http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html). That means that the WAR contains no dependencies, but these dependencies are referenced through its manifest file.

All the cases I have tested in this prototype leads to serialization problems with skinny war packaging . When I package it using fat war default scheme all is right. 

For us, revert to fat war build is very problematic in term of organization (skinny war deployment allow to specify all commons dependencies of all our projects in a single parent pom file).

> spring component injection leads to deserialization error (or page expiration) 
> -------------------------------------------------------------------------------
>
>                 Key: WICKET-1013
>                 URL: https://issues.apache.org/jira/browse/WICKET-1013
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.3.0-beta2
>         Environment: windows 2000/ Linux Jboss 4.05 EJB3 or POJO
>            Reporter: Vincent MATHON
>         Attachments: TestBackButton-light.zip
>
>
> I made several tests on spring component injection and obtained the following results.
> The test is simply a main page accessing a target page through a link.
> 1/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is itself a Spring proxy (a POJO proxy or an EJB3 proxy).
>     a) The link is a PageLink ==> This configuration leads to a deserialization error or a page expiration error whatever Serialization scheme I use (wicket new one or Java serialization).
>     b) The link is a BookMarkablePageLink ==> it works.
> 2/ A spring component is injected in the target page as a class field using jdk 1.5 annotation and this component is a concrete POJO.
>     a) The link is a PageLink ==> This configuration leads to a page expiration error if I use the Java Serialization scheme or alternatively a page expiration error or a serialization error with the wicket serialization scheme.
>     b) The link is a BookMarkablePageLink ==> it works.
> 3/ A spring component is accessed through a service locator when needed (so it's not a class field)
>       It works for both  PageLink and BookMarkablePageLink 
> Thus, the spring injection can only be used in pages accessed through a BookMarkablePageLink , for other kind of  links one must use a service locator to avoid proxy serialization.
> I suspect that this is not the expected behaviour.
> Vincent

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.