Closed ptahchiev closed 9 years ago
It looks like you have two vfs-s3 jars inside repackaged application.
That's what i thought - but no. Trust me - there's only one vfs-s3-2.3.1.jar
jar in the WEB-INF/lib
Without your sources or jar file I can't reproduce this issue
I finally made some progress. Seems like the reflections library adds a lot of URLs to the classpath and these are the URLs that are used when vfs-s3 is called:
jar:file:/home/petar/workspace/nemesis-archetype/storefront/target/storefront.war!/WEB-INF/lib/vfs-s3-2.3.1.jar!/META-INF/vfs-providers.xml
jar:file:/tmp/tomcat.3907334520961542595.8112/work/Tomcat/localhost/storefront/WEB-INF/lib/vfs-s3-2.3.1.jar!/META-INF/vfs-providers.xml
So it's the same jar, but is added twice.
So issue closed?
Yes, sorry about this - the real problem is that I have 2 times the jar in the classpath.
Hello,
I have a spring-boot project that uses org.reflections:
https://github.com/ronmamo/reflections/
It all works fine when I run the project with the maven plugin
mvn spring-boot:run
. However, when I produce a fat war file and run it withjava -jar target/storefront.war
I get the following exception:I stopped with a breakpoint in
DefaultFileSystemManager:addProvider
and indeed the s3 is registered twice. This makes sense because it is declared twice in thevfs-providers.xml
:And when I run it from the maven plugin it is only registered once! What is the difference between
operationProvider
andprovider
? Why running it from a war file registers both providers, and running it from the webapps folder registers only one? How can I avoid this exception?