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

Custom classes are used in the method of export annotation, and errors are reported during compilation #25

Open
dingjinhong opened this issue Aug 16, 2021 · 4 comments

Comments

@dingjinhong
Copy link

Exception in thread "main" de.inetsoftware.jwebassembly.WasmException: Abstract or native method can not be used: java/lang/Object.registerNatives()V
at java.lang.Object.registerNatives(Object.java)
at de.inetsoftware.jwebassembly.module.ModuleGenerator.createInstructions(ModuleGenerator.java:551)
at de.inetsoftware.jwebassembly.module.ModuleGenerator.scanFunctions(ModuleGenerator.java:226)
at de.inetsoftware.jwebassembly.module.ModuleGenerator.prepareFinish(ModuleGenerator.java:279)
at de.inetsoftware.jwebassembly.JWebAssembly.compile(JWebAssembly.java:368)
at de.inetsoftware.jwebassembly.JWebAssembly.compileToBinary(JWebAssembly.java:340)
at de.inetsoftware.jwebassembly.JWebAssembly.compileToBinary(JWebAssembly.java:308)
at TestWasm.main(TestWasm.java:41)

@Horcrux7
Copy link
Member

Which version of jwebassembly-api do you use? This should be implemented already in version 0.3. Best result will you have with the snapshot version.

@fribeiro1
Copy link

fribeiro1 commented Nov 1, 2021

I am getting a very similar error when compiling this application.

I am using JWebAssembly 0.3, OpenJDK 8, and Ubuntu 20.04.

@Horcrux7
Copy link
Member

Horcrux7 commented Nov 2, 2021

de.inetsoftware.jwebassembly.WasmException: Abstract or native method can not be used: java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;

@fribeiro1 This is not the same. It is another method. This method is not implemented in a released version. You need to use the snapshot version of jwebassembly-api https://github.com/i-net-software/JWebAssembly/wiki/Build-with-Gradle#library-dependencies

@fribeiro1
Copy link

de.inetsoftware.jwebassembly.WasmException: Abstract or native method can not be used: java/security/AccessController.doPrivileged(Ljava/security/PrivilegedAction;)Ljava/lang/Object;

@fribeiro1 This is not the same. It is another method. This method is not implemented in a released version. You need to use the snapshot version of jwebassembly-api https://github.com/i-net-software/JWebAssembly/wiki/Build-with-Gradle#library-dependencies

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants