我一直在尝试在 JBOSS AS 7 上设置 Java EE 应用程序以使用 hibernate-memcached 作为二级缓存。目标是能够在 JPA 级别进行扩展并使用集群缓存。我尝试手动将 jar 放入 jboss 模块中,但出现此错误。以下是其中一些错误:
Caused by: org.hibernate.cache.CacheException: could not instantiate CacheProvider [com.googlecode.hibernate.memcached.MemcachedCacheProvider]
at org.hibernate.cache.internal.bridge.RegionFactoryCacheProviderBridge.<init>(RegionFactoryCacheProviderBridge.java:68)
... 24 more
Caused by: java.lang.ClassNotFoundException: com.googlecode.hibernate.memcached.MemcachedCacheProvider from [Module "org.hibernate:main" from local module loader @1839bb3 (roots: C:\jboss-7.0.0\modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
at java.lang.Class.forName0(Native Method) [:1.7.0_03]
at java.lang.Class.forName(Class.java:186) [:1.7.0_03]
at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:191)
at org.hibernate.cache.internal.bridge.RegionFactoryCacheProviderBridge.<init>(RegionFactoryCacheProviderBridge.java:65)
... 24 more
我该如何解决这些错误?