GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Question: How to solve the java.lang.AbstractMethodError exception? · Issue #7675 · netty/netty

Question: How to solve the java.lang.AbstractMethodError exception? #7675

New issue
Copy link
New issue
Copy link
Closed
Closed
Question: How to solve the java.lang.AbstractMethodError exception?#7675
Copy link

Description

@dingrui37
dingrui37
opened on Feb 1, 2018
Issue body actions

Hi all, when I use gRPC in karaf environment, it always throw an exception(AbstractMethodError), can someone help me or give me some advice, thanks.

About AbstractMethodError exception:(https://docs.oracle.com/javase/7/docs/api/java/lang/AbstractMethodError.html)
Thrown when an application tries to call an abstract method. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of some class has incompatibly changed since the currently executing method was last compiled.

Netty version

[INFO] |  +- io.grpc:grpc-netty:jar:1.8.0:compile
[INFO] |  |  +- io.netty:netty-codec-http2:jar:4.1.16.Final:compile (version selected from constraint [4.1.16.Final,4.1.16.Final])
[INFO] |  |  |  +- io.netty:netty-codec-http:jar:4.0.37.Final:compile
[INFO] |  |  |  |  \- io.netty:netty-codec:jar:4.1.16.Final:compile
[INFO] |  |  |  \- io.netty:netty-handler:jar:4.0.37.Final:compile
[INFO] |  |  |     \- io.netty:netty-buffer:jar:4.0.37.Final:compile
[INFO] |  |  |        \- io.netty:netty-common:jar:4.1.16.Final:compile
[INFO] |  |  \- io.netty:netty-handler-proxy:jar:4.1.16.Final:compile
[INFO] |  |     +- io.netty:netty-transport:jar:4.0.37.Final:compile
[INFO] |  |     \- io.netty:netty-codec-socks:jar:4.1.16.Final:compile

JVM version (e.g. java -version)

openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

OS version (e.g. uname -a)

dr@dr:/home/opendaylight/oscp-telemetry$ uname -a
Linux dr 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Exception:

Unable to initialize bean provider
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to initialize bean provider
	at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)
	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)
	at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
	at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
	at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
	at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:682)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
	at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:294)
	at org.apache.aries.blueprint.container.BlueprintExtender.access$900(BlueprintExtender.java:66)
	at org.apache.aries.blueprint.container.BlueprintExtender$BlueprintContainerServiceImpl.createContainer(BlueprintExtender.java:577)
	at org.opendaylight.controller.blueprint.BlueprintBundleTracker.modifiedBundle(BlueprintBundleTracker.java:210)
	at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:191)
	at org.opendaylight.controller.blueprint.BlueprintBundleTracker.addingBundle(BlueprintBundleTracker.java:51)
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:467)
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:414)
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:443)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1568)
	at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1504)
	at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1499)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:391)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:292)
	at org.apache.karaf.features.internal.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:501)
	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:459)
	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:400)
	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:378)
	at Proxye788188b_fe8f_4e37_9f09_28e82f5177e4.installFeature(Unknown Source)
	at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:67)
	at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:38)
	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
	at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
	at Proxya27e1c98_f299_4b2b_b04a_2ffdc34e972a.execute(Unknown Source)
	at Proxya27e1c98_f299_4b2b_b04a_2ffdc34e972a.execute(Unknown Source)
	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)
	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)
	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)
	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:92)
	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:208)
	at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1$1.run(LocalConsoleManager.java:109)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:57)
	at org.apache.karaf.shell.console.impl.jline.LocalConsoleManager$2$1.run(LocalConsoleManager.java:102)
Caused by: java.lang.AbstractMethodError: io.netty.util.concurrent.MultithreadEventExecutorGroup.newChild(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Lio/netty/util/concurrent/EventExecutor;
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:84)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:58)
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:47)
	at io.netty.channel.MultithreadEventLoopGroup.<init>(MultithreadEventLoopGroup.java:49)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:68)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:63)
	at io.netty.channel.nio.NioEventLoopGroup.<init>(NioEventLoopGroup.java:54)
	at io.grpc.netty.Utils$DefaultEventLoopGroupResource.create(Utils.java:184)
	at io.grpc.netty.Utils$DefaultEventLoopGroupResource.create(Utils.java:168)
	at io.grpc.internal.SharedResourceHolder.getInternal(SharedResourceHolder.java:104)
	at io.grpc.internal.SharedResourceHolder.get(SharedResourceHolder.java:74)
	at io.grpc.netty.NettyServer.allocateSharedGroups(NettyServer.java:209)
	at io.grpc.netty.NettyServer.start(NettyServer.java:123)
	at io.grpc.internal.ServerImpl.start(ServerImpl.java:149)
	at io.grpc.internal.ServerImpl.start(ServerImpl.java:73)
	at com.zte.sdn.oscp.telemetry.channel.server.TelemetryServer.start(TelemetryServer.java:42)
	at com.zte.sdn.oscp.telemetry.channel.server.GrpcProvider.init(GrpcProvider.java:32)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)
	at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)
	at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)
	... 54 more

Activity

  1. slandelle commented on Feb 1, 2018

    @slandelle
    slandelle
    on Feb 1, 2018
    Contributor
    More actions

    You're mixing Netty modules with different/incompatible version:

    io.netty:netty-codec-http2:jar:4.1.16.Final:compile (version selected from constraint [4.1.16.Final,4.1.16.Final])
    [INFO] |  |  |  +- io.netty:netty-codec-http:jar:4.0.37.Final:compile
    

    You must keep all of them aligned (4.1.16 everywhere), eg with some dependencyManagement config in maven.

    Reacted by dingrui37 and farvoid
  2. johnou commented on Feb 1, 2018

    @johnou
    johnou
    on Feb 1, 2018
    Contributor
    More actions

    Or the Netty BOM 🎉

    Reacted by dingrui37 and deepsikhak
  3. normanmaurer
    closed this as completedon Feb 1, 2018
  4. dingrui37 commented on Feb 2, 2018

    @dingrui37
    dingrui37
    on Feb 2, 2018
    Author
    More actions

    Thanks @slandelle @johnou I have solved the problem. This problem is caused by parent in my pom.xml, it pollutes netty modules with different/incompatible version. After I use dependencyManagement to manage versions explicitly, it works.

  5. Saurabh7064 commented on Jul 26, 2021

    @Saurabh7064
    Saurabh7064
    on Jul 26, 2021
    More actions

    @dingrui37 Can you share the code using which u resolved this issue?

  6. deepsikhak commented on Aug 22, 2022

    @deepsikhak
    deepsikhak
    on Aug 22, 2022
    More actions

    Or the Netty BOM 🎉

    Netty bom worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.