You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Bruno Borges (JIRA)" <ji...@apache.org> on 2008/09/17 18:13:44 UTC

[jira] Commented: (WICKET-367) Exception in "wicket.util.io.WicketObjectOutputStream" when using an injected @SpringBean via subclassed LocalSessionFactoryBean

    [ https://issues.apache.org/jira/browse/WICKET-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631826#action_12631826 ] 

Bruno Borges commented on WICKET-367:
-------------------------------------

Shouldn't properties annotated with @SpringBean be always transient?

Is there a way to avoid serialization of those not-transient properties?

> Exception in "wicket.util.io.WicketObjectOutputStream" when using an injected @SpringBean via subclassed LocalSessionFactoryBean
> --------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-367
>                 URL: https://issues.apache.org/jira/browse/WICKET-367
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: JDK 1.5, Win XP, Jetty
>            Reporter: Michel Wichers
>            Assignee: Johan Compagner
>            Priority: Minor
>             Fix For: 1.5-M1
>
>
> Hi all,
> we received the following exception within a WebPage using an injected 
> SpringBean - Hibernate SessionFactory via subclassed LocalSessionFactoryBean :
> ERROR - Objects : Error serializing object class 
> de.ponton.box.core.ui.detail.Detail [object=[Page class = 
> de.ponton.box.core.ui.detail.Detail, id = 0, version = 0]]
> wicket.util.io.WicketSerializeableException: Error writing fields for 
> wicket.proxy.$Proxy7
> de.ponton.box.core.ui.detail.Detail->sessionFactory
> 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: wicket.util.lang.Objects.setObjectStreamFactory(new 
> IObjectStreamFactory.DefaultObjectStreamFactory()) e.g. in the init 
> method of your application
>     at 
> wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:806)
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>     at 
> wicket.util.io.ClassStreamHandler$ObjectFieldAndIndex.writeField(ClassStreamHandler.java:860)
>     at 
> wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:387)
>     at 
> wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:779)
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:298)
>     at wicket.util.lang.Objects.objectToByteArray(Objects.java:1102)
>     at 
> wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:408)
>     at wicket.protocol.http.FilePageStore.access$1500(FilePageStore.java:49)
>     at 
> wicket.protocol.http.FilePageStore$PageSerializingThread.run(FilePageStore.java:705)
>     at java.lang.Thread.run(Thread.java:595)
> Caused by: java.lang.NullPointerException
>     at 
> wicket.util.io.ClassStreamHandler.writeFields(ClassStreamHandler.java:397)
>     at 
> wicket.util.io.WicketObjectOutputStream.writeObjectOverride(WicketObjectOutputStream.java:779)
>     ... 10 more
> ERROR - FilePageStore$PageSerializingThread : Error in page save thread
> java.lang.NullPointerException
>     at 
> wicket.protocol.http.FilePageStore.serializePage(FilePageStore.java:413)
>     at wicket.protocol.http.FilePageStore.access$1500(FilePageStore.java:49)
>     at 
> wicket.protocol.http.FilePageStore$PageSerializingThread.run(FilePageStore.java:705)
>     at java.lang.Thread.run(Thread.java:595)
> shouldn't happen
> Here is the applicationContextSnippet:
> ...
> <bean id="mergedSessionFactory"
>         class="de.ponton.box.core.bootstrap.DynamicSessionFactoryBean" 
> singleton="true">
>         <property name="dataSource">
>             <ref bean="dataSource" />
>         </property>
> ....
> we are subclassing LocalSessionFactoryBean from spring:
> ...
> public class DynamicSessionFactoryBean extends LocalSessionFactoryBean
> {
> ...
> and here is the code snippet:
> ....
>  @SpringBean
>     SessionFactory sessionFactory;
> ....
> Thanks in advance!

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