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

jnimarshalmethod-gen.exe doesn't work in the installed XA #3234

Closed
radekdoulik opened this issue Jun 17, 2019 · 0 comments · Fixed by #3235
Closed

jnimarshalmethod-gen.exe doesn't work in the installed XA #3234

radekdoulik opened this issue Jun 17, 2019 · 0 comments · Fixed by #3235
Assignees

Comments

@radekdoulik
Copy link
Member

When @pjcollins is trying to run our tests with the system installation #3042, the jnimarshalmethod-gen is failing with:

Error: jnimarshalmethod-gen: Unable to create Java VM
System.TypeInitializationException: The type initializer for 'Types' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Java.Interop.JniEnvironment+Types.FindClass (System.String classname) [0x000b2] in <3d0cf794364146b58e1c173deac04834>:0 
  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0 
  at Java.Interop.JniEnvironment+Types..cctor () [0x000d2] in <3d0cf794364146b58e1c173deac04834>:0 
   --- End of inner exception stack trace ---
  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0 
  at Java.Interop.JniRuntime..ctor (Java.Interop.JniRuntime+CreationOptions options) [0x001b4] in <3d0cf794364146b58e1c173deac04834>:0 
  at Java.Interop.JreRuntime..ctor (Java.Interop.JreRuntimeOptions builder) [0x00007] in <0837e9ee267c4328a98bfd16059a729d>:0 
  at Java.Interop.JreRuntimeOptions.CreateJreVM () [0x00000] in <0837e9ee267c4328a98bfd16059a729d>:0 
  at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.CreateJavaVM (System.String jvmDllPath) [0x0000d] in <c1d2f255a4b541868afd675bdc42a188>:0 
@radekdoulik radekdoulik self-assigned this Jun 17, 2019
radekdoulik added a commit to radekdoulik/xamarin-android that referenced this issue Jun 17, 2019
Fixes: dotnet#3234

We had trouble creating the required java types, because
`java-interop.jar` was missing.

Thus we endup with:

	Error: jnimarshalmethod-gen: Unable to create Java VM
	System.TypeInitializationException: The type initializer for 'Types' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
	  at Java.Interop.JniEnvironment+Types.FindClass (System.String classname) [0x000b2] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniEnvironment+Types..cctor () [0x000d2] in <3d0cf794364146b58e1c173deac04834>:0
	   --- End of inner exception stack trace ---
	  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniRuntime..ctor (Java.Interop.JniRuntime+CreationOptions options) [0x001b4] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JreRuntime..ctor (Java.Interop.JreRuntimeOptions builder) [0x00007] in <0837e9ee267c4328a98bfd16059a729d>:0
	  at Java.Interop.JreRuntimeOptions.CreateJreVM () [0x00000] in <0837e9ee267c4328a98bfd16059a729d>:0
	  at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.CreateJavaVM (System.String jvmDllPath) [0x0000d] in <c1d2f255a4b541868afd675bdc42a188>:0
jonpryor pushed a commit that referenced this issue Jun 17, 2019
Fixes: #3234

We had trouble creating the required java types, because
`java-interop.jar` was missing.

Thus we end up with:

	Error: jnimarshalmethod-gen: Unable to create Java VM
	System.TypeInitializationException: The type initializer for 'Types' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
	  at Java.Interop.JniEnvironment+Types.FindClass (System.String classname) [0x000b2] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniEnvironment+Types..cctor () [0x000d2] in <3d0cf794364146b58e1c173deac04834>:0
	   --- End of inner exception stack trace ---
	  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniRuntime..ctor (Java.Interop.JniRuntime+CreationOptions options) [0x001b4] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JreRuntime..ctor (Java.Interop.JreRuntimeOptions builder) [0x00007] in <0837e9ee267c4328a98bfd16059a729d>:0
	  at Java.Interop.JreRuntimeOptions.CreateJreVM () [0x00000] in <0837e9ee267c4328a98bfd16059a729d>:0
	  at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.CreateJavaVM (System.String jvmDllPath) [0x0000d] in <c1d2f255a4b541868afd675bdc42a188>:0
jonpryor pushed a commit that referenced this issue Jun 17, 2019
Fixes: #3234

We had trouble creating the required java types, because
`java-interop.jar` was missing.

Thus we end up with:

	Error: jnimarshalmethod-gen: Unable to create Java VM
	System.TypeInitializationException: The type initializer for 'Types' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object
	  at Java.Interop.JniEnvironment+Types.FindClass (System.String classname) [0x000b2] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniEnvironment+Types..cctor () [0x000d2] in <3d0cf794364146b58e1c173deac04834>:0
	   --- End of inner exception stack trace ---
	  at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JniRuntime..ctor (Java.Interop.JniRuntime+CreationOptions options) [0x001b4] in <3d0cf794364146b58e1c173deac04834>:0
	  at Java.Interop.JreRuntime..ctor (Java.Interop.JreRuntimeOptions builder) [0x00007] in <0837e9ee267c4328a98bfd16059a729d>:0
	  at Java.Interop.JreRuntimeOptions.CreateJreVM () [0x00000] in <0837e9ee267c4328a98bfd16059a729d>:0
	  at Xamarin.Android.Tools.JniMarshalMethodGenerator.App.CreateJavaVM (System.String jvmDllPath) [0x0000d] in <c1d2f255a4b541868afd675bdc42a188>:0
@ghost ghost locked as resolved and limited conversation to collaborators Jun 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant