Closed hannibal218bc closed 1 year ago
Can you provide a replicating test case with the setup you tried so I could investigate it?
I had hoped you'd say that it's clearly the Hibernate43SessionFactoryDecorator
constructor that need to be changed... ;-)
Alright, I'll try to come up with an example project, thanks!
Hi again,
here's the test case: https://github.com/Handig-Eekhoorn/Hypersistence-Tests
You should be able to run it by mvn compile exec:java
. The result will be the exception posted above. Thank you for investigating!
Thanks. In the meantime, you can skip the decoration part, as that's only needed for Runtime events.
You can just pass the undecorated SessionFactory to the Optimizer configuration.
@hannibal218bc I managed to replicate the issue.
Fixed.
Fixed.
Awesome, thank you!
It's now available in the Full Version and I'm now merging to the Trial.
@hannibal218bc The fix is now available in the Trial Version as well.
I've already bought the license earlier today ;+)
@hannibal218bc Thanks, and enjoy using it.
I'm trying to setup this tool for a Hibernate 4.3 project (native - no Spring, no JPA, no Jakarta; runs on Java 11/12 with
hypersistence-optimizer-2.6.0-trial-jre6.jar
), but run into this exception when callingHypersistenceHibernatePersistenceProvider.decorate( this.sessionFactoryHibernate )
:And it's true, the
Hibernate43SessionFactoryDecorator
s only constructor is declared asHibernate43SessionFactoryDecorator(org.hibernate.engine.spi.SessionFactoryImplementor delegate);
The actual type of the session factory being passed is
org.hibernate.internal.SessionFactoryImpl
, which implementsSessionFactoryImplementor
so the call should have worked, it seems that just the constructor lookup is wrong?Thanks!