ClassNotFoundException javassist util proxy MethodFilter

ClassNotFoundException javassist util proxy MethodFilter

Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter

Caused by: java.lang.NoClassDefFoundError: javassist/util/proxy/MethodFilter
    at org.hibernate.bytecode.javassist.BytecodeProviderImpl.getProxyFactoryFactory(BytecodeProviderImpl.java:49)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactoryInternal(PojoEntityTuplizer.java:207)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:185)
    at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:170)
    at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:77)
    ... 17 more
Caused by: java.lang.ClassNotFoundException: javassist.util.proxy.MethodFilter
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 22 more

Solution: If you are getting above exception it means javassist dependency or jar is missing from your class path. Please add its dependency in your pom.xml file as below:

<dependency>
    <groupId>javassist</groupId>
    <artifactId>javassist</artifactId>
    <version>3.12.1.GA</version>
</dependency>
  • or if you are using eclipse project please add javassist.jar in your class path.

Leave a Reply

Your email address will not be published. Required fields are marked *