java.lang.ClassNotFoundException

tip

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

tip

Check if you didn't forget to instantiate your topic in the kafka broker.

tip

NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.

tip

You need to add httpcore to your dependencies. Try adding version 4.3 or further.

tip

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

tip

jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.

tip

The server rejects all jars that already belong to the server runtime (such as tomcat-**.jar, servlet**.jar). Consider substituting the CORS filter you're using for this one: https://goo.gl/ctQ7Fs

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • avatarResizer plugin replaces the default provider.vcard.className, but that your replacement appears to be missing a few things. {code} 2016.09.13 12:51:43 org.jivesoftware.openfire.vcard.VCardManager - Error loading vcard provider: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider java.lang.ClassNotFoundException: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider 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:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:76) at org.jivesoftware.util.ClassUtils.forName(ClassUtils.java:48) at org.jivesoftware.openfire.vcard.VCardManager.initialize(VCardManager.java:262) at org.jivesoftware.openfire.XMPPServer.initModules(XMPPServer.java:566) at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:453) at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:169) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105) at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56) 2016.09.13 13:04:05 org.jivesoftware.openfire.vcard.VCardManager - Error loading vcard provider: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider java.lang.ClassNotFoundException: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider 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:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:76) at org.jivesoftware.util.ClassUtils.forName(ClassUtils.java:48) at org.jivesoftware.openfire.vcard.VCardManager.initialize(VCardManager.java:262) at org.jivesoftware.openfire.vcard.VCardManager$2.propertySet(VCardManager.java:28 4) at org.jivesoftware.util.PropertyEventDispatcher.dispatchEvent(PropertyEventDispat cher.java:91) at org.jivesoftware.util.JiveProperties.put(JiveProperties.java:255) at org.jivesoftware.util.JiveGlobals.setProperty(JiveGlobals.java:724) at org.jivesoftware.openfire.admin.server_002dproperties_jsp._jspService(server_00 2dproperties_jsp.java:156) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1669) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:76) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:53) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:80) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:162) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 3) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:11 27) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185 ) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:106 1) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:215) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:110) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635 ) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745){code} The end result of this is that vcards are not returned. The reason it took me so long to realize this, is that if an openfire installation has a healthy vcard cache built up, that information is returned (and the picture is resized if present and the client doesn't already have it), thus it looks like everything works. But if the cache is cleared, vcards are not returned. I have already tried the obvious things like: * restarting openfire * reloading the plugin * verifying the information is still in LDAP Switching provider.vcard.className back to the default immediately starts to return vcards as expected (just without the picture resizing).
    via by Guus der Kinderen,
  • avatarResizer plugin replaces the default provider.vcard.className, but that your replacement appears to be missing a few things. {code} 2016.09.13 12:51:43 org.jivesoftware.openfire.vcard.VCardManager - Error loading vcard provider: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider java.lang.ClassNotFoundException: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider 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:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:76) at org.jivesoftware.util.ClassUtils.forName(ClassUtils.java:48) at org.jivesoftware.openfire.vcard.VCardManager.initialize(VCardManager.java:262) at org.jivesoftware.openfire.XMPPServer.initModules(XMPPServer.java:566) at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:453) at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:169) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105) at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56) 2016.09.13 13:04:05 org.jivesoftware.openfire.vcard.VCardManager - Error loading vcard provider: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider java.lang.ClassNotFoundException: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider 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:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:76) at org.jivesoftware.util.ClassUtils.forName(ClassUtils.java:48) at org.jivesoftware.openfire.vcard.VCardManager.initialize(VCardManager.java:262) at org.jivesoftware.openfire.vcard.VCardManager$2.propertySet(VCardManager.java:28 4) at org.jivesoftware.util.PropertyEventDispatcher.dispatchEvent(PropertyEventDispat cher.java:91) at org.jivesoftware.util.JiveProperties.put(JiveProperties.java:255) at org.jivesoftware.util.JiveGlobals.setProperty(JiveGlobals.java:724) at org.jivesoftware.openfire.admin.server_002dproperties_jsp._jspService(server_00 2dproperties_jsp.java:156) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1669) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:76) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:53) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:80) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:162) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1652) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:22 3) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:11 27) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185 ) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:106 1) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:215) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:110) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635 ) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745){code} The end result of this is that vcards are not returned. The reason it took me so long to realize this, is that if an openfire installation has a healthy vcard cache built up, that information is returned (and the picture is resized if present and the client doesn't already have it), thus it looks like everything works. But if the cache is cleared, vcards are not returned. I have already tried the obvious things like: * restarting openfire * reloading the plugin * verifying the information is still in LDAP Switching provider.vcard.className back to the default immediately starts to return vcards as expected (just without the picture resizing).
    via by Guus der Kinderen,
  • Errors when writing to DB
    via Stack Overflow by Johan Magnusson
    ,
  • Gradle build sourcecompatibility
    via Stack Overflow by pafm
    ,
  • Hibernate 5 in standalone application
    via Stack Overflow by Daniel
    ,
  • Start Jersey application with Jetty
    via Stack Overflow by ViT-Vetal-
    ,
    • java.lang.ClassNotFoundException: org.igniterealtime.openfire.plugin.avatarresizer.DelegateVCardProvider 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:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.jivesoftware.util.ClassUtils.loadClass(ClassUtils.java:76) at org.jivesoftware.util.ClassUtils.forName(ClassUtils.java:48) at org.jivesoftware.openfire.vcard.VCardManager.initialize(VCardManager.java:262) at org.jivesoftware.openfire.XMPPServer.initModules(XMPPServer.java:566) at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:453) at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:169) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    Users with the same issue

    tyson925tyson925
    5 times, last one,
    HandemelindoHandemelindo
    1 times, last one,
    Unknown visitor
    Unknown visitor2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    2285 more bugmates