Why is Cassandra client failing without epoll in production? [duplicate] - java

This question already has an answer here:
How to fix the "Found Netty's native epoll transport in the classpath, but epoll is not available. Using NIO instead" warning?
(1 answer)
Closed 5 years ago.
When I run my service locally, I get a warning that epoll isn't available, so it's using NIO. Fair enough. When I deploy it in Kubernetes, I get this, which prevents the service from running:
2017-03-29T19:09:22.739482458Z 19:09:22.739 WARN com.datastax.driver.core.NettyUtil - Found Netty's native epoll transport in the classpath, but epoll is not available. Using NIO instead.
2017-03-29T19:09:22.739505903Z java.lang.UnsatisfiedLinkError: could not load a native library: netty-transport-native-epoll
2017-03-29T19:09:22.739509966Z at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:224)
2017-03-29T19:09:22.739513326Z at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:269)
2017-03-29T19:09:22.739516421Z at io.netty.channel.epoll.Native.<clinit>(Native.java:64)
2017-03-29T19:09:22.739519628Z at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:33)
2017-03-29T19:09:22.739522527Z at java.lang.Class.forName0(Native Method)
2017-03-29T19:09:22.739525253Z at java.lang.Class.forName(Class.java:264)
2017-03-29T19:09:22.739528047Z at com.datastax.driver.core.NettyUtil.<clinit>(NettyUtil.java:68)
2017-03-29T19:09:22.739530907Z at com.datastax.driver.core.NettyOptions.eventLoopGroup(NettyOptions.java:99)
2017-03-29T19:09:22.739533585Z at com.datastax.driver.core.Connection$Factory.<init>(Connection.java:769)
2017-03-29T19:09:22.739544382Z at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1400)
2017-03-29T19:09:22.739547340Z at com.datastax.driver.core.Cluster.init(Cluster.java:159)
2017-03-29T19:09:22.739550134Z at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:330)
2017-03-29T19:09:22.739555749Z at com.datastax.driver.core.Cluster.connect(Cluster.java:280)
2017-03-29T19:09:22.739558846Z at io.getquill.context.cassandra.CassandraSessionContext.<init>(CassandraSessionContext.scala:38)
2017-03-29T19:09:22.739562704Z at io.getquill.CassandraAsyncContext.<init>(CassandraAsyncContext.scala:19)
2017-03-29T19:09:22.739565629Z at io.xxxxxxxxx.platform.db.Datastore.<init>(Datastore.scala:26)
2017-03-29T19:09:22.739568481Z at DatastoreModule.configure(DatastoreModule.scala:22)
2017-03-29T19:09:22.739571234Z at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
2017-03-29T19:09:22.739574009Z at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
2017-03-29T19:09:22.739576726Z at com.google.inject.spi.Elements.getElements(Elements.java:110)
2017-03-29T19:09:22.739579348Z at com.google.inject.util.Modules$OverrideModule.configure(Modules.java:177)
2017-03-29T19:09:22.739581979Z at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
2017-03-29T19:09:22.739584688Z at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340)
2017-03-29T19:09:22.739587416Z at com.google.inject.spi.Elements.getElements(Elements.java:110)
2017-03-29T19:09:22.739590109Z at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138)
2017-03-29T19:09:22.739592859Z at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
2017-03-29T19:09:22.739595643Z at com.google.inject.Guice.createInjector(Guice.java:99)
2017-03-29T19:09:22.739598376Z at com.google.inject.Guice.createInjector(Guice.java:84)
2017-03-29T19:09:22.739600979Z at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:181)
2017-03-29T19:09:22.739603649Z at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:123)
2017-03-29T19:09:22.739606361Z at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
2017-03-29T19:09:22.739609008Z at play.core.server.ProdServerStart$.start(ProdServerStart.scala:47)
2017-03-29T19:09:22.739611618Z at play.core.server.ProdServerStart$.main(ProdServerStart.scala:22)
2017-03-29T19:09:22.739614246Z at play.core.server.ProdServerStart.main(ProdServerStart.scala)
2017-03-29T19:09:22.739616846Z Caused by: java.lang.RuntimeException: failed to get field ID: DefaultFileRegion.transfered
2017-03-29T19:09:22.739619540Z at java.lang.ClassLoader$NativeLibrary.load(Native Method)
2017-03-29T19:09:22.739624975Z at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
2017-03-29T19:09:22.739627704Z at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
2017-03-29T19:09:22.739630403Z at java.lang.Runtime.load0(Runtime.java:809)
2017-03-29T19:09:22.739632988Z at java.lang.System.load(System.java:1086)
2017-03-29T19:09:22.739635608Z at io.netty.util.internal.NativeLibraryUtil.loadLibrary(NativeLibraryUtil.java:36)
2017-03-29T19:09:22.739638288Z at io.netty.util.internal.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:255)
2017-03-29T19:09:22.739640937Z at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:222)
2017-03-29T19:09:22.739643779Z ... 33 common frames omitted
2017-03-29T19:09:22.902948521Z 19:09:22.902 WARN i.n.util.concurrent.DefaultPromise - An exception was thrown by com.datastax.driver.core.Connection$1.operationComplete()
2017-03-29T19:09:22.902975391Z java.lang.NullPointerException: null
2017-03-29T19:09:22.902979455Z at io.netty.channel.group.DefaultChannelGroup.add(DefaultChannelGroup.java:146)
2017-03-29T19:09:22.902982663Z at io.netty.channel.group.DefaultChannelGroup.add(DefaultChannelGroup.java:42)
2017-03-29T19:09:22.902985588Z at com.datastax.driver.core.Connection$1.operationComplete(Connection.java:162)
2017-03-29T19:09:22.902988575Z at com.datastax.driver.core.Connection$1.operationComplete(Connection.java:149)
2017-03-29T19:09:22.902991374Z at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:514)
2017-03-29T19:09:22.902995665Z at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:488)
2017-03-29T19:09:22.902998584Z at io.netty.util.concurrent.DefaultPromise.access$000(DefaultPromise.java:34)
2017-03-29T19:09:22.903001524Z at io.netty.util.concurrent.DefaultPromise$1.run(DefaultPromise.java:438)
2017-03-29T19:09:22.903004958Z at io.netty.util.concurrent.GlobalEventExecutor$TaskRunner.run(GlobalEventExecutor.java:233)
2017-03-29T19:09:22.903008073Z at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
2017-03-29T19:09:22.903011054Z at java.lang.Thread.run(Thread.java:745)
How do I:
a) Stop the error; and
b) Make it use epoll if that's more performant than whatever NIO uses otherwise (is it really using select?)

Adding this dependency fixed the problem:
"io.netty" % "netty-transport-native-epoll" % "4.1.6.Final" classifier "linux-x86_64"

Related

Java 11 upgrade: java.lang.NoClassDefFoundError: org/omg/CORBA/portable/IDLEntity

I am working on uplifting a java component to Java 11 but I an encountering a runtime error. Java component builds successfully but getting this error: java.lang.NoClassDefFoundError: org/omg/CORBA/portable/IDLEntity when try to smoke test service.
After some research I found CORBA is not supported in java 11 and I'll need to externally download GlassFish CORBA JAR files externally http://support.sas.com/kb/63/716.html
I also tried adding glassfish dependency like mentioned here in second answer Is there a replacement library for CORBA in JDK 11 but still same error.
I downloaded glassfish jars and pointed them to CLASSPATH in .bash_profile
export CLASSPATH=${CLASSPATH}:/usr/local/glassfish-corba-internal-api-4.2.4.jar:/usr/local/glassfish-corba-omgapi-4.2.4.jar:/usr/local/glassfish-corba-orb-4.2.4.jar:/usr/local/pfl-basic-4.1.2.jar:/usr/local/pfl-tf-4.1.2.jar
Here's the complete error log:
21/11/07 15:52:39.865 GMT INFO [qtp1201454821-16] com.cerner.pophealth.bi.bodsp.service.lib.serviceclients.AnalyticsBiDirectoryServiceClient [cid:fa29ac1a-f394-44a5-abed-4055cf966362] Retrieving info from BI Directory Service for tenant 50187c3d-b72c-4f7a-9a34-b2abe35be868\n
21/11/07 15:52:41.726 GMT INFO [qtp1201454821-16] com.cerner.pophealth.bi.bodsp.service.lib.serviceclients.AnalyticsBiDirectoryServiceClient [cid:fa29ac1a-f394-44a5-abed-4055cf966362] Retrieving info from BI Directory Service for cluster 1ac5c9a5-4fca-4eb5-a5a8-9e73d53a1871\n
21/11/07 15:52:42.463 GMT INFO [qtp1201454821-16] com.cerner.pophealth.bi.bodsp.service.handlers.SessionUtil [cid:fa29ac1a-f394-44a5-abed-4055cf966362] Opening session to CMS: boapp1.northamerica.cerner.net\n
21/11/07 15:52:42.679 GMT ERROR [qtp1201454821-16] com.cerner.beadledom.jaxrs.exceptionmapping.ThrowableExceptionMapper [cid:fa29ac1a-f394-44a5-abed-4055cf966362] An unhandled exception was thrown.\njava.lang.NoClassDefFoundError: org/omg/CORBA/portable/IDLEntity\n at java.base/java.lang.ClassLoader.defineClass1(Native Method)\n at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)\n at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)\n at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)\n at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)\n at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)\n at java.base/java.security.AccessController.doPrivileged(Native Method)\n at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)\n at org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:642)\n at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:615)\n at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:529)\n at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n at java.base/java.lang.ClassLoader.defineClass1(Native Method)\n at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)\n at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)\n at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)\n at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)\n at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)\n at java.base/java.security.AccessController.doPrivileged(Native Method)\n at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)\n at org.eclipse.jetty.webapp.WebAppClassLoader.foundClass(WebAppClassLoader.java:642)\n at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:615)\n at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:529)\n at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n at com.crystaldecisions.thirdparty.com.ooc.OBCORBA.ORB_impl.initializeDefaultPolicies(ORB_impl.java:369)\n at com.crystaldecisions.thirdparty.com.ooc.OBCORBA.ORB_impl.initialize(ORB_impl.java:196)\n at com.crystaldecisions.thirdparty.com.ooc.OBCORBA.ORB_impl.setParameters(ORB_impl.java:812)\n at com.crystaldecisions.thirdparty.com.ooc.OBCORBA.ORB_impl.init(ORB_impl.java:1313)\n at com.crystaldecisions.enterprise.ocaframework.idl.helper.ORBHelper.init(ORBHelper.java:57)\n at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.<init>(ServiceMgr.java:402)\n at com.crystaldecisions.enterprise.ocaframework.ServiceMgrFactory.getServiceMgr(ServiceMgrFactory.java:66)\n at com.crystaldecisions.sdk.occa.security.internal.LogonService.ensureServiceStub(LogonService.java:646)\n at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLogon(LogonService.java:829)\n at com.crystaldecisions.sdk.occa.security.internal.LogonService.doUserLogon(LogonService.java:806)\n at com.crystaldecisions.sdk.occa.security.internal.LogonService.userLogon(LogonService.java:211)\n at com.crystaldecisions.sdk.occa.security.internal.SecurityMgr.userLogon(SecurityMgr.java:166)\n at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody0(SessionMgr.java:458)\n at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon_aroundBody1$advice(SessionMgr.java:521)\at com.crystaldecisions.sdk.framework.internal.SessionMgr.logon(SessionMgr.java:1)\n at com.cerner.pophealth.bi.bodsp.service.handlers.SessionUtil.openSession(SessionUtil.java:100)\n at com.cerner.pophealth.bi.bodsp.service.handlers.ServiceProvider.<init>(ServiceProvider.java:47)\n at com.cerner.pophealth.bi.bodsp.service.resource.BODSPResourceImpl.getBODSPHandler(BODSPResourceImpl.java:237)\n at com.cerner.pophealth.bi.bodsp.service.resource.BODSPResourceImpl.getBODSPs(BODSPResourceImpl.java:71)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:138)\n at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:517)\n at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:406)\n at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:370)\n at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:356)\n at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:372)\n at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:344)\n at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:317)\n at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:440)\n at org.jboss.resteasy.core.AsynchronousDispatcher.invoke(AsynchronousDispatcher.java:312)\n at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:229)\n at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:135)\n at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:356)\n at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:138)\n at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:215)\n at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)\n at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)\n at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)\n at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1450)\n at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799)\n at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)\n at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)\n at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)\n at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)\n at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)\n at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)\n at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)\n at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)\n at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)\n at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)\n at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)\n at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:191)\n at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)\n at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n at org.eclipse.jetty.webapp.logging.ContextLogHandler.handle(ContextLogHandler.java:64)\n at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)\n at org.eclipse.jetty.server.Server.handle(Server.java:516)\n at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)\n at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)\n at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)\n at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)\n at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)\n at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)\n at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)\n at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:338)\n at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:315)\n at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:173)\n at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:137)\n at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:883)\n at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1034)\n at java.base/java.lang.Thread.run(Thread.java:829)\nCaused by: java.lang.ClassNotFoundException: org.omg.CORBA.portable.IDLEntity\n at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)\n at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)\n at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:538)\n at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)\n ... 102 common frames omitted\n
172.17.0.1 - - [21/11/07 15:52:42.738 GMT] "GET /data-security-profiles?tenantId=50187c3d-b72c-4f7a-9a34-b2abe35be868 HTTP/1.1" 500 64 "-" "PostmanRuntime/7.28.3" "localhost:8080" "-" "fa29ac1a-f394-44a5-abed-4055cf966362"
From your example classpath, I presume that you are not using a dependency management system in your build process.
Using one would eliminate the possibility that you mis-typed your classpath, or forgot a transient dependency, both of which seem likely culprits here.
The most-often used dependency management tools for Java are Gradle and Maven.

Spark 1.6 java.io.IOException: Filesystem closed

I have a strange issue. I'm not closing file system by .close() or .abort().
Locally my application is working perfectly, but when I try to do spark-submit on cluster I have got a lot of Exceptions
> ERROR scheduler.LiveListenerBus: Listener EventLoggingListener threw an exception
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.scheduler.EventLoggingListener$$anonfun$logEvent$3.apply(EventLoggingListener.scala:150)
at org.apache.spark.scheduler.EventLoggingListener$$anonfun$logEvent$3.apply(EventLoggingListener.scala:150)
at scala.Option.foreach(Option.scala:236)
at org.apache.spark.scheduler.EventLoggingListener.logEvent(EventLoggingListener.scala:150)
at org.apache.spark.scheduler.EventLoggingListener.onApplicationEnd(EventLoggingListener.scala:196)
at org.apache.spark.scheduler.SparkListenerBus$class.onPostEvent(SparkListenerBus.scala:54)
at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
at org.apache.spark.util.ListenerBus$class.postToAll(ListenerBus.scala:55)
at org.apache.spark.util.AsynchronousListenerBus.postToAll(AsynchronousListenerBus.scala:38)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(AsynchronousListenerBus.scala:87)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1$$anonfun$apply$mcV$sp$1.apply(AsynchronousListenerBus.scala:72)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1$$anonfun$apply$mcV$sp$1.apply(AsynchronousListenerBus.scala:72)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply$mcV$sp(AsynchronousListenerBus.scala:71)
at org.apache.spark.util.Utils$.tryOrStopSparkContext(Utils.scala:1182)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1.run(AsynchronousListenerBus.scala:70)
Caused by: java.io.IOException: Filesystem closed
at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:858)
at org.apache.hadoop.hdfs.DFSOutputStream.flushOrSync(DFSOutputStream.java:2350)
at org.apache.hadoop.hdfs.DFSOutputStream.hflush(DFSOutputStream.java:2296)
at org.apache.hadoop.fs.FSDataOutputStream.hflush(FSDataOutputStream.java:130)
... 20 more
But application is still running, until I have got. This error kills my app.
> ERROR util.Utils: Uncaught exception in thread Thread-3
java.io.IOException: Filesystem closed
at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:858)
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:2120)
at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1253)
at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1249)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1249)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1417)
at org.apache.spark.scheduler.EventLoggingListener.stop(EventLoggingListener.scala:224)
at org.apache.spark.SparkContext$$anonfun$stop$8$$anonfun$apply$mcV$sp$5.apply(SparkContext.scala:1744)
at org.apache.spark.SparkContext$$anonfun$stop$8$$anonfun$apply$mcV$sp$5.apply(SparkContext.scala:1744)
at scala.Option.foreach(Option.scala:236)
at org.apache.spark.SparkContext$$anonfun$stop$8.apply$mcV$sp(SparkContext.scala:1744)
at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1220)
at org.apache.spark.SparkContext.stop(SparkContext.scala:1743)
at org.apache.spark.SparkContext$$anonfun$3.apply$mcV$sp(SparkContext.scala:604)
at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:267)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:239)
at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1818)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:239)
at scala.util.Try$.apply(Try.scala:161)
at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:218)
at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54)
The last error is totally randomly, but it occurs 90% times when I'm using my app. Can be there be some with cluster configuration or my code is wrong?
Thanks
If the FileSystem is closed somewhere , the error will also occur when you use it again.

java.lang.ClassNotFoundException: java.util.Base64 error in clojure

I'm learning clojure in Ubuntu(Linux) OS. I'm facing an unexpected error. Everything is working fine in my system. When I move same code & data in different system, I got an error. I run following command:
$ lein run
Exception in thread "main" java.lang.ClassNotFoundException: java.util.Base64, compiling:(com/data/common/jwt.clj:86:23)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6875)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6269)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6856)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2797)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6001)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6319)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6856)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$IfExpr$Parser.parse(Compiler.java:2797)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:6001)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5380)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3972)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6866)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6856)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.access$300(Compiler.java:38)
at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java:589)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6868)
at clojure.lang.Compiler.analyze(Compiler.java:6669)
at clojure.lang.Compiler.analyze(Compiler.java:6625)
at clojure.lang.Compiler.eval(Compiler.java:6931)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:703)
at binutils.core$eval20$loading__5569__auto____21.invoke(core.clj:1)
at binutils.core$eval20.invokeStatic(core.clj:1)
at binutils.core$eval20.invoke(core.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6916)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.RT.loadResourceScript(RT.java:372)
at clojure.lang.RT.loadResourceScript(RT.java:363)
at clojure.lang.RT.load(RT.java:453)
at clojure.lang.RT.load(RT.java:419)
at clojure.core$load$fn__5677.invoke(core.clj:5893)
at clojure.core$load.invokeStatic(core.clj:5892)
at clojure.core$load.doInvoke(core.clj:5876)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5697)
at clojure.core$load_one.invoke(core.clj:5692)
at clojure.core$load_lib$fn__5626.invoke(core.clj:5737)
at clojure.core$load_lib.invokeStatic(core.clj:5736)
at clojure.core$load_lib.doInvoke(core.clj:5717)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$load_libs.invokeStatic(core.clj:5774)
at clojure.core$load_libs.doInvoke(core.clj:5758)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:648)
at clojure.core$require.invokeStatic(core.clj:5796)
at clojure.core$require.doInvoke(core.clj:5796)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at user$eval5$fn__7.invoke(form-init2263747695343924382.clj:1)
at user$eval5.invokeStatic(form-init2263747695343924382.clj:1)
at user$eval5.invoke(form-init2263747695343924382.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6927)
at clojure.lang.Compiler.eval(Compiler.java:6917)
at clojure.lang.Compiler.load(Compiler.java:7379)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: java.util.Base64
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:1030)
at clojure.lang.Compiler.macroexpand1(Compiler.java:6807)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6854)
... 107 more
lein retrieve required library, but I'm not sure whether It retrieve all required lib or not. I don't understand, why it is happening? can anyone help me to fix this error? Thanks.
It's likely that your Java version is lower than 8.
You can either switch to use Java 8 to run your compiled clojure code (or update to Java 8 if you don't have one), or use Base64 from Apache Commons Codec library, you can check this post for detail: java.lang.NoClassDefFoundError: java/util/Base64
I had this problem with OpenJDK 8...
turned out I was missing the fact that it is a nested class
I had tried to import it like this
[java.util.Base64 Encoder]
which is incorrect, this is correct:
[java.util Base64$Encoder]

Drools 6.3 error when using java 8

I am new to Drools and I am using Drools 6.3 final along with java 1.8 on eclipse. I am not using ant/Maven for building my project. The same project used to work fine with java 1.6 and Drools 5.1.
Now when i try to run the project, I get an error :
java.lang.Exception: java.lang.ClassCastException: org.drools.core.base.accumulators.BigDecimalAverageAccumulateFunction cannot be cast to org.drools.runtime.rule.AccumulateFunction
com.ibm.msg.client.jms.DetailedJMSException: JMSCC0037: A runtime exception was thrown by the MessageListener.onMessage() method. A message consumer with a registered message listener received an exception from the onMessage() method. The onMessage() method should be changed to avoid throwing exceptions.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:388)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.handleOnMessageThrowable(JmsMessageConsumerImpl.java:1178)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:1050)
at com.ibm.msg.client.wmq.internal.WMQAsyncConsumerShadow.honourNoLocal(WMQAsyncConsumerShadow.java:566)
at com.ibm.msg.client.wmq.internal.WMQAsyncConsumerShadow.consumer(WMQAsyncConsumerShadow.java:400)
at com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.driveConsumer(RemoteAsyncConsume.java:1527)
at com.ibm.mq.jmqi.remote.internal.RemoteDispatchThread.run(RemoteDispatchThread.java:395)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209)
at com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298)
at com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220)
Caused by: java.lang.Exception: java.lang.ClassCastException: org.drools.core.base.accumulators.BigDecimalAverageAccumulateFunction cannot be cast to org.drools.runtime.rule.AccumulateFunction
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.handleOnMessageThrowable(JmsMessageConsumerImpl.java:1180)
... 10 more
I have also tried the solution mentioned here.
Also earlier I was getting this error which sometimes occurs or sometimes doesnt :
java.lang.Exception: java.lang.NoClassDefFoundError: org/drools/builder/CompositeKnowledgeBuilder
com.ibm.msg.client.jms.DetailedJMSException: JMSCC0037: A runtime exception was thrown by the MessageListener.onMessage() method. A message consumer with a registered message listener received an exception from the onMessage() method. The onMessage() method should be changed to avoid throwing exceptions.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:388)
at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.handleOnMessageThrowable(JmsMessageConsumerImpl.java:1178)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:1050)
at com.ibm.msg.client.wmq.internal.WMQAsyncConsumerShadow.honourNoLocal(WMQAsyncConsumerShadow.java:566)
at com.ibm.msg.client.wmq.internal.WMQAsyncConsumerShadow.consumer(WMQAsyncConsumerShadow.java:400)
at com.ibm.mq.jmqi.remote.internal.RemoteAsyncConsume.driveConsumer(RemoteAsyncConsume.java:1527)
at com.ibm.mq.jmqi.remote.internal.RemoteDispatchThread.run(RemoteDispatchThread.java:395)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209)
at com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298)
at com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220)
Caused by: java.lang.Exception: java.lang.NoClassDefFoundError: org/drools/builder/CompositeKnowledgeBuilder
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.handleOnMessageThrowable(JmsMessageConsumerImpl.java:1180)
... 10 more
Caused by: java.lang.NoClassDefFoundError: org/drools/builder/CompositeKnowledgeBuilder
Can anyone please guide me as to why these errors are occuring and what could be the possible solutions?
PS : the Drools jar which I have included in my build path :
drools-compiler-6.3.0.Final.jar
drools-core-6.3.0.Final.jar
kie-api-6.3.0.Final.jar
kie-internal-6.3.0.Final.jar
knowledge-api-6.3.0.Final-sources.jar
org.apache.servicemix.bundles.drools-5.6.0.Final_1.jar -- this is the latest which i could find

Sending packets using Craftbukkits API not working

I have been trying to send JSON Raw messages to players using a lot of different methods and none of them seem to work. One thing I have tried is to do this:
String json = "{text:\"Test!\",hoverEvent:{action:show_text,value:\"test\"}}";
PacketPlayOutChat packet = new PacketPlayOutChat(ChatSerializer.a(json), true);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
Now when eclipse validates the code, no errors appear and it's only when the server runs this code, it gives me this error:
java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R3/Packet
at bukkit.pangea.terms.Main.registerCommands(Main.java:31) ~[?:?]
at bukkit.pangea.terms.Main.onEnable(Main.java:21) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) ~[c
raftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
.java:335) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
r.java:405) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugin(CraftServer.jav
a:356) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.enablePlugins(CraftServer.
java:316) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.reload(CraftServer.java:74
6) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.Bukkit.reload(Bukkit.java:534) [craftbukkit.jar:git-Spigot
-952179b-e87122e]
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:
25) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:14
1) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServe
r.java:646) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchServerCommand(Craf
tServer.java:632) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at net.minecraft.server.v1_8_R1.DedicatedServer.aM(DedicatedServer.java:
353) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:3
17) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:6
23) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java
:526) [craftbukkit.jar:git-Spigot-952179b-e87122e]
at java.lang.Thread.run(Unknown Source) [?:1.7.0_71]
Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_7_R3.Packet
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:91) ~[craftbukkit.jar:git-Spigot-952179b-e87122e]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
java:86) ~[craftbukkit.jar:git-Spigot-952179b-e87122e]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_71]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.7.0_71]
... 18 more
A lot of the other things that I have tried also gives me a similar error. If anyone could help me with this problem it would be very helpful, thank you.
Your method works perfectly fine in my version of spigot/craftbukkit, although it seems that I am using a newer version (1.8.3), in which the constructor for the PacketPlayOutChat takes a byte as a second argument instead of a boolean. This byte (values 1 or 2) determines whether the chat message is sent normally or is displayed above the action bar. I would update your craftbukkit/spigot jar to the newest version using BuildTools.
Well it could be, that you use another spigot/bukkit jar on your server, than you work with. Use exactly the same. Otherwise it couldn't find the main class of the server Packet version.
java.lang.NoClassDefFoundError: net/minecraft/server/v1_7_R3/Packet
Here it says, that it can't find the class. Which Spigot/Bukkit version are you using on your server? And which are you using to developing?
You need to have a later version of Spigot in your build path for your project. If you cannot build it as described by the answer above, then you can depend on the jar used by the server instead.

Categories

Resources