On Tue, Feb 11, 2020 at 3:50 PM Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> What is the proper place to report issues with
> https://github.com/apache/tomcat-jakartaee-migration ?
> Since it is under `apache` org there is no 'Issues' tab.
> Bugzilla ?!
>
> I've faced an issue with Spring Boot jars.
> Once migrated trying to use it fails with:
>
>
> Exception in thread "main" java.lang.IllegalStateException: Failed to get
> nested archive for entry
> BOOT-INF/lib/spring-boot-starter-web-2.2.4.RELEASE.jar
> at
> org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:113)
> at
> org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:87)
> at
> org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:69)
> at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
> at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52)
> Caused by: java.io.IOException: Unable to open nested jar file
> 'BOOT-INF/lib/spring-boot-starter-web-2.2.4.RELEASE.jar'
> at
> org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:261)
> at
> org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:247)
> at
> org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:109)
> ... 4 more
> Caused by: java.lang.IllegalStateException: Unable to open nested entry
> 'BOOT-INF/lib/spring-boot-starter-web-2.2.4.RELEASE.jar'. It has been
> compressed and nested jar files must be stored without compression. Please
> check the mechanism used to create your executable jar file
> at
> org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:287)
> at
> org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:269)
> at
> org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:258)
> ... 6 more
>
>
> i.e. it needs to use `destEntry.setMethod(ZipEntry.STORED);` (for jars
> nested in /BOOT-INF/lib/**.jar)
> in org.apache.tomcat.jakartaee.Migration#migrateArchive()
> I am reworking it to return a Result object instead of a boolean
> (isSuccess) that will contain: the
> isSuccess boolean, the accumulated size and CRC for all entries in the
> nested jar.
>
> If I am on the wrong track please share your ideas!
>
> To reproduce it one can create a new application at
> https://start.spring.io/, package it, migrate it and try to run it.
>

Ok, so I guess use of this tool got a bit experimental very quickly ;)

The purpose of the tool is to run Java EE (web)apps on *Tomcat* 10+ (or
another *compliant* EE 9 server I suppose). It seems you are trying to
convert something like "Spring boot with an embedded app", which isn't the
goal of the tool at the moment. If it works, great, but it's a bit hard to
promise support for everything. So ... Does it work ?

Rémy


>
> Martin
>

Reply via email to