MarsHut Page 1/3

squawkpsychoticSoftware and s/w Development

Dec 2, 2013 (3 years and 10 months ago)

174 views

IHeaderResponse serialization problem Wicket 6
Asked by
Datazuul
on 2013-04-09T16:38:00-04:00
After migrating my webapp from 1.5.7 to 6.6.0
(thus changing all
org.apache.wicket.markup.html.IHeaderResponse
to
org.apache.wicket.markup.head.IHeaderResponse)

I fire up my webapp with embedded Jetty and get an

java.lang.NoClassDefFoundError:
org/apache/wicket/markup/html/IHeaderResponse
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getDeclaredMethod(Class.java:1952)
at
java.io.ObjectStreamClass.getPrivateMethod(ObjectStreamClass.java:1411)
at java.io.ObjectStreamClass.access$1700(ObjectStreamClass.java:69)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:481)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:455)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.
(ObjectStreamClass.java:455)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:352)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1130)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
at java.util.ArrayList.writeObject(ArrayList.java:710)
at sun.reflect.GeneratedMethodAccessor386.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:975)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1480)

How comes?
I already made a clean install, deleted all cookies, ...
Seems that some old serialization artifacts around?

In Java code there is no import of the old package name anymore...
I also updated the static serial version uid of my basepage...
Archives
Apache
Wicket
Apr 9, 2013
Week 15, 2013
April, 2013
MarsHut
Page 1/3
IHeaderResponse serialization problem Wicket 6
Year 2013
All Answers
Answer by
Martin Grigorov
on 2013-04-10T05:08:22-04:00
Hi,

Maybe you use a third party library that is compiled against Wicket 1.5.x.
Additionally it seems there is a hard reference to an instance of
IHeaderResponse and it is being serialized with the page. The problem is
during serialization, not deserialization.
When you find it make sure that you remove this hard ref - there is no need
of it.
Answer by
Datazuul
on 2013-04-10T06:46:20-04:00
Hi Martin,

the thirdparty libraries hint seems to be a good one.
I use visural wicket for 1.5... (and some others like wiquery...)
I will remove this dependency/ies and come back with the result later (when
I am at home and can verify this)

thanks, so far!
Answer by
Datazuul
on 2013-04-11T07:25:09-04:00
you were right:
I analyzed my dependency tree for visural-wicket and other
thirdparty-wicket-libraries and removed them.
after this, the problem disappeared.

Thank you!
Tagged
Arraylist
Embedded Jetty
Java Code
Problem Wicket
Security
Related
Ajax and validators
Reading POST data from standalone application
AbstractDefaultAjaxBehavior response handling
CheckBox Column random behaviour when using wicket Bootstrap 0.8
WicketStuff 6.7.0 is released
Wicket MarkupContainer error, the component failed to render
Wicket-Bootstrap ControlGroup Error
Can WebPage throw Exceptions to be handled by upstream filters in the filter chain?
MarsHut
Page 2/3
IHeaderResponse serialization problem Wicket 6
How I get the internal html content of a dynamically updated div tag using Apache Wicket
A child with id 'XXXX' already exist AND class constructor called twice issue
View Online
http://www.marshut.com/ihyzx/iheaderresponse-serialization-problem-wicket-6.html
MarsHut
Page 3/3