Unfortunately, pre-encoding the "##" doesn't work. :( I have a reasonable workaround with a separate context.xml. On top of that, it's pretty simple to patch tomcat to use a different version marker other than "##". I figure if I get desperate I can patch, build, and run my own.
On Thu, Oct 1, 2015 at 5:45 PM, Aurélien Terrestris <aterrest...@gmail.com> wrote: > Hello > > maybe the Java documentation is badly written, because it is saying ( > http://docs.oracle.com/javase/7/docs/api/java/io/File.html#toURL%28%29 > ) : "This method does not automatically escape characters that are > illegal in URLs." > > # character is not illegal, but reserved (see gen-delims definition in > RFC 3986). It means the character is quite legal, and really, it is > widely used for anchoring. > > As a quick-and-dirty, did you try renaming your file yourWar##12345 to > yourWar%23%2312345 ? > > regards > A.T. > > > 2015-10-01 17:51 GMT+02:00 Chris Gamache <cgama...@gmail.com>: > > Hi all, > > > > I'm stuck using axis2-1.5.4. > > > > Here's what I think is happening: > > > > Axis2 does this sort of container-in-a-container thing. It creates its > own > > classloader and pulls in all of its jar libraries dynamically. The > problem > > is that it uses a java.net.URL to target the files. This would be fine > > except for the problem that the folder name, when using parallel > > deployment, is > > > > /path/to/yourWar##12345 > > > > So (from org.apache.axis2.deployment.util.Utils) > > > > public static URL[] getURLsForAllJars(URL url, File tmpDir) { > > FileInputStream fin = null; > > InputStream in = null; > > ZipInputStream zin = null; > > try { > > ArrayList array = new ArrayList(); > > in = url.openStream(); > > > > The problem is that URL was constructed from a File object in the > > > org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(boolean, > > ClassLoader, File) method using the toURL() method. The toURL() method is > > deprecated because it doesn't escape special characters, namely the "##" > in > > the path. > > > > When it hits url.openStream() it is discarding everything after the > ##nnnnn > > part of the path (think hash value in a web URL). It throws a > > "java.io.FileNotFoundException: /path/to/yourWar (No such file or > > directory)" > > > > Getting in there and patching axis2-1.5.4 is less-than-desirable. So many > > things to go wrong. > > > > Is there a way to alter the way tomcat unpacks the warfile? Is there a > way > > to configure the version delimiters from ## to perhaps ~~ or $$ ? > > > > CG > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >