Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java error running ghidra export #144

Open
BonusPlay opened this issue Dec 29, 2024 · 4 comments
Open

Java error running ghidra export #144

BonusPlay opened this issue Dec 29, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@BonusPlay
Copy link

Running latest commit, JDK 21, ghidra 11.2.1.

Could not initialize class com.google.security.zynamics.BinExport$BinExport2
java.lang.NoClassDefFoundError: Could not initialize class com.google.security.zynamics.BinExport$BinExport2
	at com.google.security.binexport.BinExport2Builder.<init>(BinExport2Builder.java:81)
	at com.google.security.binexport.BinExportExporter.export(BinExportExporter.java:92)
	at ghidra.app.plugin.core.exporter.ExporterDialog$ExportTask.run(ExporterDialog.java:578)
	at ghidra.util.task.Task.monitoredRun(Task.java:134)
	at ghidra.util.task.TaskRunner.lambda$startTaskThread$0(TaskRunner.java:106)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.IllegalAccessError: class com.google.security.zynamics.BinExport$BinExport2 tried to access method 'com.google.protobuf.LazyStringArrayList com.google.protobuf.LazyStringArrayList.emptyList()' (com.google.security.zynamics.BinExport$BinExport2 and com.google.protobuf.LazyStringArrayList are in unnamed module of loader ghidra.GhidraClassLoader @483bf400) [in thread "Task - Export visualboyadvance-m---.exe"]
	at com.google.security.zynamics.BinExport$BinExport2.<init>(BinExport.java:19352)
	at com.google.security.zynamics.BinExport$BinExport2.<clinit>(BinExport.java:25089)
	... 8 more

---------------------------------------------------
Build Date: 2024-Nov-05
Ghidra Version: 11.2.1
Java Home: /nix/store/f042x32jfm94d3cgaga8d6xl8vy6sg46-openjdk-21.0.5+11/lib/openjdk
JVM Version: N/A 21.0.5
OS: Linux 6.12.6 amd64
@cblichmann cblichmann added the bug Something isn't working label Jan 6, 2025
@cblichmann
Copy link
Member

Did you build the extension yourself or did you use the release binary?

How did you launch Ghidra? Is this using it headless from the command-line?

@BonusPlay
Copy link
Author

Built myself (latest commit is newer than release binary), ghidra ran with UI.

@cblichmann
Copy link
Member

This is odd, it looks like the Gradle build did not add the Protobuf dependency correctly.

@BonusPlay
Copy link
Author

I'll try to debug this issue a bit, as this might be caused by nix-related build stuff. I can see following classes in the ghidra-binexport.jar, but have no clue why it isn't working...

1980-02-01 00:00:00 .....         2112          905  com/google/protobuf/LazyStringArrayList$ByteArrayListView.class
1980-02-01 00:00:00 .....         2419          921  com/google/protobuf/LazyStringArrayList$ByteStringListView.class
1980-02-01 00:00:00 .....        11117         3951  com/google/protobuf/LazyStringArrayList.class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants