+

Search Tips   |   Advanced Search

Class loaders and the Spring Framework


We can avoid potential problems with the class loading of JAR files and resources.

If there are problems with the class loading of JAR files and resources, there can be exceptions in the log about version mismatches of classes, ClassCastException exceptions, or java.lang.VerifyError exceptions. To avoid class loading problems, ensure that Spring Framework dependencies are packaged as part of the application, and configure the class loader policy of the server so that the application server run time uses the version that you intend. For example, consider changing the search order in the class loader configuration to "parent last".

It is possible for resources that use a common name to be found in an unintended location. Resources can include message bundles. Use the class loader viewer in the appserver to help resolve this problem. We might want the application to rename resources so that they have a unique name. For more information about the class loader viewer, see the topic about troubleshooting class loaders.



 

Related concepts


Spring Framework

 

Related tasks


Set class loaders of a server
Set application class loaders
Troubleshooting class loaders

 

Related information


Spring Documentation