Note that there are some explanatory texts on larger screens.

plurals
  1. POException NoClassDefFoundError for CacheProvider
    primarykey
    data
    text
    <p>I'm kind of new in Spring and hibernate so I'm trying to implement some simple web application based on Spring 3 + hibernate 4 while I start tomcat I have this exception:</p> <pre><code>java.lang.NoClassDefFoundError: org/hibernate/cache/CacheProvider at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) ... Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.CacheProvider at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523) </code></pre> <p>I've found that this class was in hibernate-core for hibernate 3 but I've not found it in hibernate 4. </p> <p>The part of my context.xml for persistence:</p> <pre><code>&lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt; &lt;property name="driverClassName" value="org.hsqldb.jdbcDriver"/&gt; &lt;property name="url" value="jdbc:oracle:thin:@IP_Address:SID"/&gt; &lt;property name="username" value="xxx"/&gt; &lt;property name="password" value="xxx"/&gt; &lt;property name="initialSize" value="5"/&gt; &lt;property name="maxActive" value="20"/&gt; &lt;/bean&gt; &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt; &lt;property name="dataSource" ref="dataSource" /&gt; &lt;property name="packagesToScan" value="com.huawei.vms.user"/&gt; &lt;property name="hibernateProperties"&gt; &lt;props&gt; &lt;prop key="dialect"&gt;org.hibernate.dialect.Oracle10gDialect&lt;/prop&gt; &lt;/props&gt; &lt;/property&gt; &lt;/bean&gt; </code></pre> <p>Please help me to figure out why it's trying to load CacheProvider because I dont have any settings for that in context.xml and which jar I have to add in my project. Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload