Java. Lang. nosuchmethoderror: net. SF. ehcache. config. cacheconfiguration. isterracottaclustered () error occurs when hibernate-tools is used. The exception is:
Java. Lang. nosuchmethoderror: net. SF. ehcache. config. cacheconfiguration. isterracottaclustered () Z
At net. SF. ehcache. hibernate. hibernateutil. loadandcorrectconfiguration (hibernateutil. Java: 48)
At net. SF. ehcache. hibernate. ehcacheregionfactory. Start (ehcacheregionfactory. Java: 66)
At org. hibernate. impl. sessionfactoryimpl. <init> (sessionfactoryimpl. Java: 221)
At org. hibernate. cfg. configuration. buildsessionfactory (configuration. Java: 1341)
At org. hibernate. cfg. annotationconfiguration. buildsessionfactory (annotationconfiguration. Java: 867)
At org.hibernate.lele.consoleconfiguration4.exe cute (consoleconfiguration. Java: 555)
At org.hibernate.lele.execution.defaultexecutioncontext.exe cute (defaultexecutioncontext. Java: 63)
At org.hibernate.lele.consoleconfiguration.exe cute (consoleconfiguration. Java: 98)
At org. hibernate. Console. leleconfiguration. buildsessionfactory (leleconfiguration. Java: 550)
At org. hibernate. Eclipse. Console. workbench. lazysessionfactoryadapter. getchildren (lazysessionfactoryadapter. Java: 43)
At org. hibernate. Eclipse. Console. workbench. basicworkbenchadapter. getchildren (basicworkbenchadapter. Java: 100)
At org. hibernate. Eclipse. Console. workbench. basicworkbenchadapter. fetchdeferredchildren (basicworkbenchadapter. Java: 106)
At org. Eclipse. UI. Progress. deferredtreecontentmanager $ 1.run( deferredtreecontentmanager. Java: 234)
At org.eclipse.core.internal.jobs. Worker. Run (worker. Java: 55)
After troubleshooting, it is determined that the new ehcache configuration method is not supported in hibernate-tools 3.3.1. Because in my hibernate. CGF. in XML, <property name = "hibernate. cache. region. factory_class "> net. SF. ehcache. hibernate. ehcacheregionfactory </property> is used to configure ehcache. This is a new configuration method of ehcache. From the perspective of the hierarchical relationship of exceptions, The Hibernate-tools plug-in itself does not support this configuration method, use <property name = "hibernate. cache. provider_class "> net. SF. ehcache. hibernate. ehcacheprovider </property> to solve the problem after preparation.