In that case a Wicket Model keeps a hard reference to the Hibernate entity
that keeps a reference to the Spring class.
You might need to use LoadableDetachableModel.
Look around these classes:
[class=it.loginet.petrol.presentation.sinottico.CachedDataProviderModel]
Hello Martin,
absolutely Hibernate is not injecting classes anywhere in Wicket classes.
Interceptor is used to inject a Spring-configured class, ViaggioService,
into a specific domain class, Viaggio.java.
This code builds a DataTable of Viaggio entities inside the page that throws
the
Hi Leonardo,
How Hibernate Interceptor injects classes in Wicket classes ?!
Wicket serializes the Page instance and everything in it, i.e. components,
their models, etc.
For some reason you pass non-serializable instance of one of your
Viaggio*** classes to a Wicket component/model.
Show us the
Hi Martin,
actually ViaggioService comes from a domain class, ViaggioRete, where is
injected through a custom Hibernate Interceptor.
At the moment, it seems I have to let all my code implement the Serializable
interface, but it doesn't sound as the correct option. Futhermore, I got
stuck on
The problem is in these classes:
[class=it.loginet.petrol.presentation.sinottico.CachedDataProviderModel]
private final java.lang.Object
it.loginet.commons.wicket.repeater.DefaultSortableDataProvider$1.val$object
[class=it.loginet.petrol.domain.viaggio.ViaggioRete]
Actually field "stampeFactory" implements Spring interface
'org.springframework.beans.factory.config.ServiceLocatorFactoryBean', which
allows us to retrieve beans as prototypes but it's not Serializable (spring
version is 3.2.2.RELEASE).
I don't think I can use @SpringBean in this situation, as
Your field:
it.loginet.petrol.application.quadratura.StampeFactory
it.loginet.petrol.application.bettolina.BettolinaService.stampeFactory
contains a not-serializable object. From what I can see it is a
factory from Spring, that you probably should use @SpringBean for or
@Inject (depending on
It seems the problem is caused by the fact
java.lang.reflect.InvocationHandler interface does not extends Serializable
On Sun, Jan 21, 2018 at 8:48 PM, Leonardo D'Alimonte <
leonardo.dalimo...@loginet.it> wrote:
> Hi everyone,
> I'm working on the migration of our WebApplication from Wicket