-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Spring boot is not supported? #612
Comments
The 'IKVM.Runtime.Launcher.Run (..' in the information of the provided link seems to be an error that occurs regardless of Spring Boot when running the compiled version with ikvmc.exe parameters set. (It seems to be an error that occurs because the version does not match based on the error content.) The error content is slightly different due to the difference in the date of registration of the article in the provided link and the versions of IKVM. However, the error with 'IKVM.Runtime.Launcher.Run (..' seems to be an error that occurs regardless of Spring Boot.
If you create a project with 'dotnet new' and add IKVM, add jar with ikvmReference, build, and run it instead of directly setting the parameters, you will get the same error as in the first question. It seems that Spring Boot's jar is not a pure jar, but the Spring Boot team configures the contents of the jar or war according to their own structure and reads it with an internal dedicated loader (jar in jar and classes under a separate folder, and classes with business logic are in them, and the only part that matches the pure jar is the Spring Boot loader), so IKVM did not make it work according to this structure, so it is pure when converting statically or dynamically. It seems that the exception occurs because only the loader part of Spring Boot remains while the ones that do not fit the structure are removed. Can I assume that IKVM does not support structures like Spring Boot? When running the build using ikvmRefererence, an exception occurs as below. Unhandled exception: java.lang.IllegalStateException: java.lang.NullPointerException ---> java.lang.NullPointerException
|
Additional test results show that if an exception containing 'IKVM.Runtime.Launcher.Run (..' occurs, it is because the [executable file name].config file is missing. Exception in thread "Thread-0" java.lang.IllegalStateException: java.lang.NullPointerException |
I thought the question in the post was asking how to solve the IKVM.Runtime.Launcher.Run error that appears when running Spring Boot, so I searched for various answers and hesitated to write an answer. I read it again now and it doesn't match my issue because it asks how to use the launcher (IKVM.Runtime.Launcher.Run) (I left the rough usage of the launcher and Spring Boot information I found as an additional answer to the question.) What I registered as an issue was that when I ran it with the format java -jar SpringBoot.jar Exception in thread "Thread-0" java.lang.IllegalStateException: java.lang.NullPointerException I registered it as a question to see if IKVM supports running SpringBoot because I got an error like this. |
It should work, and whatever is causing it to not work should be fixed. So, in that sense, it's "supported". But I do not know what is actually wrong, and haven't had time to look at it. |
When starting Spring Boot with IKVM, it dies with the following exception based on the net472 version.
Exception in thread "Thread-0" java.lang.IllegalStateException: java.lang.NullPointerException
at org.springframework.boot.loader.ExecutableArchiveLauncher.(ExecutableArchiveLauncher.java:57)
at org.springframework.boot.loader.WarLauncher.(WarLauncher.java:34)
at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)
Caused by: java.lang.NullPointerException
at org.springframework.boot.loader.jar.JarFile.getName(JarFile.java:415)
at IKVM.Java.Externs.java.util.zip.ClassStubZipEntry.expandIkvmClasses(ClassStubZipEntry.cs:197)
at java.util.zip.ClassStubZipEntry.expandIkvmClasses(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:203)
at java.util.zip.ZipFile.(ZipFile.java:165)
at java.util.jar.JarFile.(JarFile.java:169)
at java.util.jar.JarFile.(JarFile.java:133)
at org.springframework.boot.loader.jar.AbstractJarFile.(AbstractJarFile.java:39)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:135)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:130)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:116)
at org.springframework.boot.loader.jar.JarFile.(JarFile.java:107)
at org.springframework.boot.loader.archive.JarFileArchive.(JarFileArchive.java:69)
at org.springframework.boot.loader.Launcher.createArchive(Launcher.java:163)
at org.springframework.boot.loader.ExecutableArchiveLauncher.(ExecutableArchiveLauncher.java:53)
... 2 more
The text was updated successfully, but these errors were encountered: