Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HotswapSpringCallback not serializable #243

Closed
bmehner opened this issue May 8, 2018 · 1 comment
Closed

HotswapSpringCallback not serializable #243

bmehner opened this issue May 8, 2018 · 1 comment

Comments

@bmehner
Copy link

bmehner commented May 8, 2018

I have a problem using HotswapAgent in combination with Wicket and Spring.
My application has Wicket-Pages which get Spring-Beans injected via the Spring integration mechanism of Wicket:

    public class SomePage extends GenericWebPage {
        @SpringBean
        private Service someService;

        public SomePage() {
          super();
        }
    }

When I activate HotswapAgent I get NotSerializableExceptions (details see below). Wicket needs to serialize the pages to its internal page store. Apparently the injected Spring service causes the trouble.


2018-03-26 09:30:37.965 WARN [http-listener-1(2)] o.a.w.c.u.o.c.CheckingObjectOutputStream - error delegating to writeObject : HotswapSpringCallback_1796692748, path: /children/[7]/children/[1]/children/[0]/children/[4]/children/children/children/[0]/val$choice/provider/val$classes
2018-03-26 09:30:37.969 ERROR [http-listener-1(2)] o.a.w.serialize.java.JavaSerializer - Error serializing object class com.ccc.yap.presentation.frontend.ui.core.TicketErrorPage [object=[Page class = com.ccc.yap.presentation.frontend.ui.core.TicketErrorPage, id = 20, render count = 1]]
java.io.NotSerializableException: HotswapSpringCallback_1796692748
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
    at java.util.ArrayList.writeObject(ArrayList.java:766)
    at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:1128)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1496)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)

Please make HotswapSpringCallback serializable! Thanks in advance.

@edudant
Copy link
Contributor

edudant commented May 16, 2018

org.hotswap.agent.plugin.spring.getbean.DetachableBeanHolder now implements Serializable (HotswapSpringCallback is a subclass).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants