java.lang.IllegalAccessError: tried to access class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1$1 from class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1

JIRA | Steve Hummingbird | 2 years ago
  1. 0

    I have a groovy class, which runs in vert.x that makes use of the java driver: {code} final EventBus eb final Container container final Logger logger final MongoClient mongo final MongoDatabase db public Service(EventBus eb, Container container) { this.eb = eb this.container = container logger = container.logger mongo = MongoClients.create(new MongoClientURI('mongodb://localhost:27017'), MongoClientOptions.builder().build()) logger.info('got mongo client: ' + mongo) db = mongo.getDatabase('mydb') logger.info('got db: ' + db) } public void terminate() { mongo.close() } {code} In case vert.x redeploys the module containing this class I see the following exception: {code} got mongo client: org.mongodb.async.MongoClientImpl@6e16e721 got db: org.mongodb.async.MongoDatabaseImpl@169e0757 Exception in thread "Thread-6" java.lang.IllegalAccessError: tried to access class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1$1 from class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1 at org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1.completed(AsynchronousSocketChannelStream.java:183) at org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1.completed(AsynchronousSocketChannelStream.java:180) at org.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:140) at org.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:137) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:278) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) at sun.nio.ch.KQueuePort$EventHandlerTask.run(KQueuePort.java:301) at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code} I have not seen this error when using the synchronous driver. It only showed up when using the async driver.

    JIRA | 2 years ago | Steve Hummingbird
    java.lang.IllegalAccessError: tried to access class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1$1 from class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1
  2. 0

    I have a groovy class, which runs in vert.x that makes use of the java driver: {code} final EventBus eb final Container container final Logger logger final MongoClient mongo final MongoDatabase db public Service(EventBus eb, Container container) { this.eb = eb this.container = container logger = container.logger mongo = MongoClients.create(new MongoClientURI('mongodb://localhost:27017'), MongoClientOptions.builder().build()) logger.info('got mongo client: ' + mongo) db = mongo.getDatabase('mydb') logger.info('got db: ' + db) } public void terminate() { mongo.close() } {code} In case vert.x redeploys the module containing this class I see the following exception: {code} got mongo client: org.mongodb.async.MongoClientImpl@6e16e721 got db: org.mongodb.async.MongoDatabaseImpl@169e0757 Exception in thread "Thread-6" java.lang.IllegalAccessError: tried to access class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1$1 from class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1 at org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1.completed(AsynchronousSocketChannelStream.java:183) at org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1.completed(AsynchronousSocketChannelStream.java:180) at org.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:140) at org.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:137) at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:278) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198) at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) at sun.nio.ch.KQueuePort$EventHandlerTask.run(KQueuePort.java:301) at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code} I have not seen this error when using the synchronous driver. It only showed up when using the async driver.

    JIRA | 2 years ago | Steve Hummingbird
    java.lang.IllegalAccessError: tried to access class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1$1 from class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1
  3. 0

    Ran a plugin using {{maven-hpi-plugin:1.74:run}}. {{the.hpl}} included {{ui-samples-plugin-1.447.jar}} since 4ace69e in 1.87 was not yet applied. Got some errors, initially {code:none} Aug 29, 2012 9:37:57 AM hudson.ExtensionFinder$AbstractGuiceFinder$2$1 get WARNING: Failed to instantiate. Skipping this component com.google.inject.ProvisionException: Guice provision errors: 1) Error injecting constructor, java.lang.IllegalAccessError: tried to access class jenkins.plugins.ui_samples.DropdownList$1 from class jenkins.plugins.ui_samples.DropdownList at jenkins.plugins.ui_samples.DropdownList$DescriptorImpl.<init>(DropdownList.java:55) 1 error at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52) at com.google.inject.Scopes$1$1.get(Scopes.java:59) at hudson.ExtensionFinder$AbstractGuiceFinder$2$1.get(ExtensionFinder.java:365) at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41) at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011) at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961) at hudson.ExtensionFinder$AbstractGuiceFinder._find(ExtensionFinder.java:336) at hudson.ExtensionFinder$AbstractGuiceFinder.find(ExtensionFinder.java:327) at hudson.ExtensionFinder._find(ExtensionFinder.java:147) at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:289) at hudson.ExtensionList.load(ExtensionList.java:278) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:231) at hudson.ExtensionList.getComponents(ExtensionList.java:149) at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:182) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:231) at hudson.ExtensionList.iterator(ExtensionList.java:138) at org.apache.commons.jelly.expression.ExpressionSupport.evaluateAsIterator(ExpressionSupport.java:101) at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:89) at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119) at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95) at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105) at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63) at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53) at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:107) at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:125) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:552) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477) at org.kohsuke.stapler.Stapler.service(Stapler.java:159) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:162) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:285) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475) Caused by: java.lang.IllegalAccessError: tried to access class jenkins.plugins.ui_samples.DropdownList$1 from class jenkins.plugins.ui_samples.DropdownList at java.lang.Class.getDeclaringClass(Native Method) at java.lang.Class.getEnclosingClass(Class.java:1105) at hudson.model.Descriptor.<init>(Descriptor.java:236) at jenkins.plugins.ui_samples.UISampleDescriptor.<init>(UISampleDescriptor.java:8) at jenkins.plugins.ui_samples.DropdownList$DescriptorImpl.<init>(DropdownList.java:55) at jenkins.plugins.ui_samples.DropdownList$DescriptorImpl$$FastClassByGuice$$f8fe1cda.newInstance(<generated>) at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40) at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61) at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108) at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87) at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:259) at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46) at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1018) at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40) ... 63 more {code} and later every page load and other things fail with {code:none} java.lang.IllegalAccessError: jenkins/plugins/ui_samples/DropdownList$1 at java.lang.Class.getDeclaringClass(Native Method) at java.lang.Class.getEnclosingClass(Class.java:1105) at java.lang.Class.getSimpleBinaryName(Class.java:1240) at java.lang.Class.getSimpleName(Class.java:1132) at jenkins.plugins.ui_samples.DropdownList$FruitDescriptor.getDisplayName(DropdownList.java:72) at hudson.ExtensionComponent.compareTo(ExtensionComponent.java:80) at hudson.ExtensionComponent.compareTo(ExtensionComponent.java:36) at java.util.ComparableTimSort.binarySort(ComparableTimSort.java:232) at java.util.ComparableTimSort.sort(ComparableTimSort.java:176) at java.util.ComparableTimSort.sort(ComparableTimSort.java:146) at java.util.Arrays.sort(Arrays.java:472) at java.util.Collections.sort(Collections.java:155) at hudson.ExtensionList.sort(ExtensionList.java:298) at hudson.ExtensionList.ensureLoaded(ExtensionList.java:233) at hudson.ExtensionList.iterator(ExtensionList.java:138) {code} Not exactly sure what is going on here (two different class loaders finding nested classes from the same source file?) but {{DropdownList$1}} can at least be elided by making the {{Fruit}} constructor be accessible to subclasses without compiler fakery; and the second exception can be made nonfatal.

    Jenkins JIRA | 4 years ago | Jesse Glick
    java.lang.IllegalAccessError: tried to access class jenkins.plugins.ui_samples.DropdownList$1 from class jenkins.plugins.ui_samples.DropdownList
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Inactive - [SEC] BigBrother 1.11.0 - Catch griffers red-handed [1060] | Page 4 | Bukkit Forums

    bukkit.org | 7 months ago
    java.lang.IllegalAccessError: tried to access class org.anjocaido.groupmanager.GroupManager$1 from class org.anjocaido.groupmanager.GroupManager
  6. 0

    After applying new updates, problems with opening SQL*Worksheet window

    Oracle Community | 9 years ago | 442119
    java.lang.IllegalAccessError: tried to access class oracle.ide.net.IdeURLStreamHandler from class oracle.ide.net.URLFileSystem$1

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalAccessError

      tried to access class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1$1 from class org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1

      at org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1.completed()
    2. org.mongodb.connection
      AsynchronousSocketChannelStream$2.completed
      1. org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1.completed(AsynchronousSocketChannelStream.java:183)
      2. org.mongodb.connection.AsynchronousSocketChannelStream$AsyncWritableByteChannelAdapter$1.completed(AsynchronousSocketChannelStream.java:180)
      3. org.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:140)
      4. org.mongodb.connection.AsynchronousSocketChannelStream$2.completed(AsynchronousSocketChannelStream.java:137)
      4 frames
    3. Java RT
      Thread.run
      1. sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
      2. sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:278)
      3. sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198)
      4. sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)
      5. sun.nio.ch.KQueuePort$EventHandlerTask.run(KQueuePort.java:301)
      6. sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
      7. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      8. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      9. java.lang.Thread.run(Thread.java:745)
      9 frames