Am 17.06.2016 um 12:58 schrieb Bas Gooren:
> Although I do wonder why you are trying to cache JPA objects by yourself -
> you could simply plug in a second level cache to your JPA provider. Then it
> will cache transparently.
Didn't know, activated JPA second level cache, works well, dropped my
Hi Dieter,
That’s what I expected (and why I did not recommend it); The error you see
is because somewhere in the component tree inside your page serialization
breaks. Since it happens when wicket passes the page to an (internal)
ObjectOutputStream, the only way to debug it would be to set a
Do you see java.io.ObjectOutputStream#writeObject0() in the stack ?
Each occurrence of this method gives you information about the currently
being written object. The next occurrence of this method in the stack tells
you which Java object is the owner of the previous one.
I don't have time now to
Hello Martin,
I tried this to learn it, but didn't find it.
I put a breakpoint at org.apache.wicket.serialize.java.JavaSerializer
SerializationCheckerObjectOutputStream#writeObjectOverride line 260 and
277 and looked at the variables content.
The obj was the complete page PersonenTable and I
Hello,
I think I have found it:
In my AbstractProvider superclass I implemented:
@Override
public IModel model(E object) {
return new JPAEntityModel<>((E) object);
}
PersonenTable uses a CachingProvider, a subclass of AbstractProvider
which overwrites
@Override
Hi Dieter,
It is quite easy to debug such issues by putting a breakpoint at line where
the exception is being thrown.
Once you have the debugger stopped there you could click on the stack
methods to see what was the parent object of the currently failing one.
Martin Grigorov
Wicket Training and
Hello Bas,
first of all let me thank you and Martin for your great support and the
helpful thoughts and examples :-)
I am using wicket 7.30, the use of onBefore() is an old pattern I have
been used to, changed it now to
@Override
protected void onInitialize() {
Hi Dieter,
Which version of wicket are you using? (I ask since I see you are using
onBeforeRender() to initialize your components, while since wicket 1.5
there is onInitialize() for that in each component).
For as far as I can see there are no references to your dao in the gist you
provided;
Hello Martin,
it is:
personenProvider = (com.sun.proxy.$Proxy24)
org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler@6eb3b9ea
wrapInProxies is true
I added a SignIn mechanism, SignInSession uses PersonenDao too to
authorize in the database. But I checked not to have any references to
it,
Hi,
Put a breakpoint at PersonenTable constructor and see what is the type of '
personenProvider'.
It must be JDK Proxy instance.
If it is not then something wrong is going on.
org.apache.wicket.guice.GuiceComponentInjector#GuiceComponentInjector(org.apache.wicket.Application,
Hi Bas,
I put it in http://pastie.org/private/19zeomb8uy1beb1gfjegq
I fear it is not really useful, since it starts with
org.apache.wicket.WicketRuntimeException: A problem occurred while
trying to collect debug information about not serializable object
Dieter
Am 15.06.2016 um 13:39 schrieb
Hi Dieter,
Can you share the stack trace of the serialization checker error? Normally it
points out where in the hierarchy it found a non-serializable object.
My first guess is that you are referencing the dao class somewhere directly
from your page. The stack trace will prove me right or wrong
Hello Bas,
I try to cut small pieces of the code, please tell me if you want to see
more.
First the error:
12:59:03.919 [http-nio-8084-exec-6] WARN
o.a.w.c.u.o.c.CheckingObjectOutputStream - error delegating to
writeObject :
Dieter,
Since the data provider is inject as a proxy, only the proxy should be
serialized. On deserialization it should look up the actual data
provider again.
Can you share some code so we can see how you set things up? What you
are trying is something that should work out of the box - it does
14 matches
Mail list logo