We recently upgraded hibernate from 4.0.1
to 4.2.8.Final
.
Hibernate.4.2.8.Final
is depending on javassist-3.18.1-GA
. Unfortunately websphere is 8.5.5 is not shipped with latest javassist but it is not my issue. I tried to force websphere to take my javassist jar but I FAILED ( for some reason it is always loading from ${WAS_INSTALL_ROOT}/plugins
).
What I tried?
${WAS_INSTALL_ROOT}/lib/ext
but no use${WAS_INSTALL_ROOT}/plugins
then application started working but this is not good solution because other web applications might depend on old javassistMy question
How can I use (or inject or refer) latest javassist jar in Websphere 8.5.5?
This #blog helped me to figure our the problem little quickly.
Where did you put parent last, in which window of the console?
Because there are two places in the console where to put parent last, one at the application level, and the other at the WAR level and that is the one that you want to choose.
Put 'Class loader for each WAR file in application' and I believe from inside the screen where you chose that option, click the WAR and set the classloader policy at the WAR level to parent last:
I think the path is this (don't have a console now):
Application -- > Enterprise Application --> application_instance --> Web Module --> Web Module_instance
Have a look at this to see that are two places to set classloader policies, and let me know if you found the setting and if it worked, or a new error is thrown.
Sometimes when we switch the setting we find new errors because other jars where being read from the server and not the WAR, such as bean validation errors etc. If you get a different error non javassist related, it might be caused by that and you can always post it in a new question.
This can be solved by adding the new version of javaassist as a shared library . The details are described here [http://www-01.ibm.com/support/docview.wss?uid=swg27006159#usingserver][1].
The shared library should be assigned against the a new class loader defined at the server configuration. The class loading policy should be PARENT_LAST for this class loader
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With