Since Hibernate 5.3 CR2, byte buddy is the default bytecode provider. Thus, byte buddy library is now a dependency of the hibernate-core project and can be downloaded automatically using maven.
In Hibernate 5.3 CR1, byte buddy was not the default option but javassist, and therefore just the javassist library was being retrieved with maven.
But now in 5.3 CR2, both byte buddy and javassist libraries are being retrieved. Why is so? Is it still required to have the javassist library being now byte buddy the default provider?
Thank you in advance!
Theoretically, both Javassist and ByteBuddy are needed to compile the hibernate-core since both of them are supported.
Now, a user can switch from one provider to the other using just the
hibernate.bytecode.provider configuration property.
It’s better if you open a Jira issue so that we can discuss it and fix it if turns out that we don’t need to provide both jars by default.
Thanks again for the quick response. Reported here
do you have any update about this? We would like to know if we have to include javassist library within our project if we are going to use the default provider.
Just give it a try and see how it works. If you don’t provide the
javassist library and check if your integration tests and the QA environment work fine.
I’ve tried to remove it, and it seems that javassist could be required for us also, as I’m experiencing some troubles on server startup. I’ll keep you posted when I test it in deep.
Maybe it is needed by other framework, not Hibernate. It’s better to investigate it. If it’s still needed by Hibernate, you should update the Jira issue with more info.
as @vlad correctly suggested, we require javassist for other framework.
So for the moment we are going to included both javassist and bytebuddy within our project, as we would like to use, as far as possible, the default configuration provided by Hibernate. Thus:
- we keep javassist due to our dependency with the other framework
- we are adding bytebuddy because it is now the default Hibernate bytecode provider
So, for the record, Javassist is still required by ORM 5.3. We have part of the code still using it, that’s why it’s still a required dependency. It will be gone in 6.
ok, understood. Thanks for the information!