JavaAssistProxy, wildfly modules and class loaders.
Description
I'm not using JPA. I've been moving all my components out of the ear(s) and into modules.
I'm running hibernate 5.2.5 so I added all the hibernate jars I needed into a module. All worked fine with most of the modules installed.
I moved a further bunch of my jars into modules and at that point I ran into exceptions on a call to Configuration.buildSessionFactory() -
Guessing this was an issue with class loaders I changed this in org/hibernate/proxy/pojo/javassist/JavassistProxyFactory.java
to
That is - get the classloader from the current thread - not from the class.
One hibernate test did fail when I built hibernate - I commented it out and installed the jar with that one change. Now my application is working again.
This is a fairly old configuration - it's all done with xml mappings.
Is this an issue with hibernate? It seems to me that the class loader used should be the classloader for the running thread - which is presumably what I'd get if I loaded my classes as part of the ear.
I'm not using JPA. I've been moving all my components out of the ear(s) and into modules.
I'm running hibernate 5.2.5 so I added all the hibernate jars I needed into a module. All worked fine with most of the modules installed.
I moved a further bunch of my jars into modules and at that point I ran into exceptions on a call to Configuration.buildSessionFactory() -
Guessing this was an issue with class loaders I changed this in org/hibernate/proxy/pojo/javassist/JavassistProxyFactory.java
to
That is - get the classloader from the current thread - not from the class.
One hibernate test did fail when I built hibernate - I commented it out and installed the jar with that one change. Now my application is working again.
This is a fairly old configuration - it's all done with xml mappings.
Is this an issue with hibernate? It seems to me that the class loader used should be the classloader for the running thread - which is presumably what I'd get if I loaded my classes as part of the ear.