Quantcast

Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.mybatis.caches.ehcache.EhcacheCache

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.mybatis.caches.ehcache.EhcacheCache

MyBatis user
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.mybatis.caches.ehcache.EhcacheCache
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at
org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:
176)
        at
org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:
87)
        at org.apache.ibatis.io.Resources.classForName(Resources.java:250)

Logs doesnt have anything more than this.
I have slf4j as dependency
<dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                </dependency>
                <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                        <version>1.6.4</version>
                </dependency>

Any help on how to resolve this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.mybatis.caches.ehcache.EhcacheCache

Eduardo Macarron
You need mybatis + ehcache plugin. slf4j is a transitive dependency,
you don't need to specify it in your pom.

On 6 abr, 22:07, MyBatis user <[hidden email]> wrote:

> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> org.mybatis.caches.ehcache.EhcacheCache
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at
> org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.jav a:
> 176)
>         at
> org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.jav a:
> 87)
>         at org.apache.ibatis.io.Resources.classForName(Resources.java:250)
>
> Logs doesnt have anything more than this.
> I have slf4j as dependency
> <dependency>
>                         <groupId>org.slf4j</groupId>
>                         <artifactId>slf4j-api</artifactId>
>                 </dependency>
>                 <dependency>
>                         <groupId>org.slf4j</groupId>
>                         <artifactId>slf4j-log4j12</artifactId>
>                         <version>1.6.4</version>
>                 </dependency>
>
> Any help on how to resolve this?
Loading...