]
Work on TEIIDSB-203 started by Ramesh Reddy.
--------------------------------------------
A .vdb file nested inside the Spring Repackage jar can not be read
------------------------------------------------------------------
Key: TEIIDSB-203
URL:
https://issues.redhat.com/browse/TEIIDSB-203
Project: Teiid Spring Boot
Issue Type: Bug
Components: core
Affects Versions: 1.4.0
Reporter: Ramesh Reddy
Assignee: Ramesh Reddy
Priority: Major
Fix For: 1.5.0
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
{code}
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]
{code}
basically one cannot read a nested jar files. The issue also explained here
https://stackoverflow.com/questions/37634452/urlclassloader-cant-handle-j...