ghidra: Debugger: NoSuchMethodException

Describe the bug DbgEngNative.INSTANCE fails to initialize due to: java.lang.NoSuchMethodError: 'com.sun.jna.Library com.sun.jna.Native.load(java.lang.String, java.lang.Class)'

To Reproduce Steps to reproduce the behavior:

  1. Open pe in debugger.
  2. Start session.

Environment (please complete the following information):

  • OS: Microsoft Windows [Version 10.0.19042.685]
  • Java Version: 15.0.1
  • Ghidra Version: 9.3_DEV

Additional context I’m not sure if this is a result of a newer Java version or something in my debugger setup.

stacktrace
java.lang.NoSuchMethodError: 'com.sun.jna.Library com.sun.jna.Native.load(java.lang.String, java.lang.Class)' at agent.dbgeng.jna.dbgeng.DbgEngNative.<clinit>(DbgEngNative.java:32)
DbgEngNative.java:32 at agent.dbgeng.dbgeng.DbgEng.debugCreate(DbgEng.java:147)
DbgEng.java:147 at agent.dbgeng.manager.impl.DbgManagerImpl.lambda$start$0(DbgManagerImpl.java:347)
DbgManagerImpl.java:347 at agent.dbgeng.gadp.impl.DbgEngClientThreadExecutor.init(DbgEngClientThreadExecutor.java:50)
DbgEngClientThreadExecutor.java:50 at agent.dbgeng.gadp.impl.AbstractClientThreadExecutor.run(AbstractClientThreadExecutor.java:113)
AbstractClientThreadExecutor.java:113 at java.base/java.lang.Thread.run(Thread.java:832)
Thread.java:832

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

Oh interesting. I would only expect that for the GhidraServer, but it wouldn’t surprise me if that snuck into our general configuration. 5.4.0 is not the latest and greatest, anymore. They’ve released 5.6.0. The question of when to upgrade is classic CM. The version we use is declared in our Gradle scripts. That doesn’t necessarily spare us from Jar hell, though. Anyway, thanks for pointing out we have a 4.5.0 version clash via yajsw.