Uploaded image for project: 'Teiid Spring Boot'
  1. Teiid Spring Boot
  2. TEIIDSB-203

A .vdb file nested inside the Spring Repackage jar can not be read

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.5.0
    • 1.4.0
    • core
    • None
    • DV Sprint 64
    • 0.5

      When user is using a .VDB file as VDB and builds a spring repackage based application, at runtime the loading of the VDB is failed as it is being read as classpath resource. The exception you see is

      Caused by: java.lang.IllegalArgumentException: URI: jar:file:/home/rareddy/development/teiid-spring-boot/samples/vdb/target/spring-vdb-example-1.5.0-SNAPSHOT.jar does not contain path info ex. jar:file:/c:/foo.zip!/BAR
      	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:155) ~[jdk.zipfs:na]
      	at java.base/java.nio.file.Path.of(Path.java:208) ~[na:na]
      	at java.base/java.nio.file.Paths.get(Paths.java:98) ~[na:na]
      	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.uriToPath(ZipFileSystemProvider.java:77) ~[jdk.zipfs:na]
      	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:167) ~[jdk.zipfs:na]
      	at java.base/java.nio.file.FileSystems.getFileSystem(FileSystems.java:231) ~[na:na]
      	at org.teiid.query.metadata.NioZipFileSystem.mount(NioZipFileSystem.java:67) ~[teiid-engine-14.0.0-SNAPSHOT.jar!/:14.0.0-SNAPSHOT]
      	at org.teiid.query.metadata.NioZipFileSystem.mount(NioZipFileSystem.java:51) ~[teiid-engine-14.0.0-SNAPSHOT.jar!/:14.0.0-SNAPSHOT]
      	at org.teiid.spring.autoconfigure.TeiidAutoConfiguration.loadVDB(TeiidAutoConfiguration.java:214) ~[teiid-spring-boot-starter-1.5.0-SNAPSHOT.jar!/:1.5.0-SNAPSHOT]
      

      basically one cannot read a nested jar files. The issue also explained here https://stackoverflow.com/questions/37634452/urlclassloader-cant-handle-jarfile-urls

            rhn-engineering-rareddy Ramesh Reddy
            rhn-engineering-rareddy Ramesh Reddy
            Archiver:
            rhn-support-adandapa Aitik Dandapat

              Created:
              Updated:
              Resolved:
              Archived:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours Time Not Required
                3h