Record a debugging experience

The cause of

The same JAR, the server is healthy but the local project keeps reporting the error in the figure below.

explain

First of all, this code is the result of Hibernate executing the HQL with parameters, the top layer, the string strong result. The HQL parameter is string. The field type of the Java object corresponding to the parameter is BigDcimal. Bind () = bind(); bind() = bind(); bind() = bind(); Value. Getclass (); value. Org. Hibernate. Impl. AbstractQueryImpl,

Conclusion among

I have no local problem, the code is so written, the error should be reported, that server is how to run?

Continue to

In the process of debugging the server project, I wonder if someone rewrote the source code of Hibernate.

As a reminder, the order of loading jar packages for Tomcat has been changed from 8 onwards, instead of being in alphabetical order. And then after 8, you should do something else, and that will result in different results for different operating systems, even though they both use 8, and I’m MAC, and it’s Linux… When I saw that blog, I thought there was a pit, but I didn’t expect the pit to come so quickly. As for the specific loading method of different operating systems, you need to see the Tomcat source code, have not seen ~ ~ ~

conclusion

Hibernate duplicate classes can be deleted if you don’t want to read the source code. Should be able to modify the source code, such as change to alphabetical order have to ridicule, Tomcat change jar loading order is why, how clear the original alphabetical order.