This content has been marked as final.
Show 8 replies
-
1. Re: JBAS-6518 - spaces in paths
alesj Feb 18, 2009 10:56 AM (in response to adrian.brock)"adrian@jboss.org" wrote:
I've managed to create a testcase in jboss trunk that reproduces this problem.
It's a hack, so I haven't ported it to JBoss5.
Why in jbossas instead of vfs?
Hard to reproduce in vfs?"adrian@jboss.org" wrote:
While looking at the problem I also found:
https://jira.jboss.org/jira/browse/JBVFS-89
I don't know whether that it is the cause.
The syptom is jar files that have isLeaf() == true
and it only occurs if the spaces in the VFSContext part of the original path.
I've changed every call to File::toURL to use your suggested File::toURI::toURL.
It's already commited to trunk and deployed to snapshots. -
2. Re: JBAS-6518 - spaces in paths
adrian.brock Feb 18, 2009 11:22 AM (in response to adrian.brock)"alesj" wrote:
"adrian@jboss.org" wrote:
I've managed to create a testcase in jboss trunk that reproduces this problem.
It's a hack, so I haven't ported it to JBoss5.
Why in jbossas instead of vfs?
Hard to reproduce in vfs?
Because the original testcase was an ear and we need some tests to trap
this kind of thing anyway, even when its not VFS related."adrian@jboss.org" wrote:
While looking at the problem I also found:
https://jira.jboss.org/jira/browse/JBVFS-89
I don't know whether that it is the cause.
The syptom is jar files that have isLeaf() == true
and it only occurs if the spaces in the VFSContext part of the original path.
I've changed every call to File::toURL to use your suggested File::toURI::toURL.
It's already commited to trunk and deployed to snapshots.
I'm pretty sure there's more to it than that. I've just done the same thing
(but not committed it) and there are a few extra failures in the VFS testsuite
(which already had 15 failures????!!!!!).
I've fixed the extra issue which is in
ZipEntryContext.initRootAndPath() not decoding the URL properly,
but it doesn't seem to have resolved the original problem.
The real issue is why it thinks the jar is a leaf, which I couldn't debug yesterday
because the codebases were majorly out-of-synch. -
3. Re: JBAS-6518 - spaces in paths
alesj Feb 18, 2009 11:45 AM (in response to adrian.brock)"adrian@jboss.org" wrote:
(which already had 15 failures????!!!!!).
I guess this are from testing the temps,
where I create some new directories.
It doesn't fail for me on winz, but I do see it on my Linux box."adrian@jboss.org" wrote:
I've fixed the extra issue which is in
ZipEntryContext.initRootAndPath() not decoding the URL properly,
but it doesn't seem to have resolved the original problem.
I've already added VFSUtils::decode to ZipEntryContext::createZipSource.
More was needed?"adrian@jboss.org" wrote:
The real issue is why it thinks the jar is a leaf, which I couldn't debug yesterday
because the codebases were majorly out-of-synch.
I added some more isLeaf tests to VFS, to check if temps still behave as before. -
4. Re: JBAS-6518 - spaces in paths
adrian.brock Feb 18, 2009 12:31 PM (in response to adrian.brock)"alesj" wrote:
"adrian@jboss.org" wrote:
The real issue is why it thinks the jar is a leaf, which I couldn't debug yesterday
because the codebases were majorly out-of-synch.
I added some more isLeaf tests to VFS, to check if temps still behave as before.
I've copied across the spaces.ear into the VFS testsuite and added a
FileVFSUnitTestCase::testJarWithSpacesInContext
but it doesn't fail.
I've been trying to play with setting up the forceCopy and the caching used by JBossAS
but couldn't get it to fail either.
Maybe you know what magic incantations are required to make behave the same as JBossAS? :-) -
5. Re: JBAS-6518 - spaces in paths
adrian.brock Feb 18, 2009 12:40 PM (in response to adrian.brock)"alesj" wrote:
"adrian@jboss.org" wrote:
(which already had 15 failures????!!!!!).
I guess this are from testing the temps,
where I create some new directories.
It doesn't fail for me on winz, but I do see it on my Linux box.
Yep, more broken path manipulation.
I've portablized it. :-) -
6. Re: JBAS-6518 - spaces in paths
alesj Feb 18, 2009 1:17 PM (in response to adrian.brock)"adrian@jboss.org" wrote:
Maybe you know what magic incantations are required to make behave the same as JBossAS? :-)
Apart from forcedCopy and cache settings in jbossas's vfs.xml I wouldn't know any more magic incantations. -
7. Re: JBAS-6518 - spaces in paths
adrian.brock Feb 18, 2009 1:29 PM (in response to adrian.brock)"adrian@jboss.org" wrote:
The real issue is why it thinks the jar is a leaf, which I couldn't debug yesterday
because the codebases were majorly out-of-synch.
Actually that is not the problem. Now the codebase is no longer out-of-synch
I can properly debug it.
I added some more TRACE statements and you can see that
VFSUtils' manifest processing is not processing the paths properly2009-02-18 19:04:15,468 TRACE [org.jboss.deployers.vfs.plugins.structure.jar.JARStructure] (RMI TCP Connection(4)-127.0.0.1) Added context org.jboss.deployers.vfs.spi. structure.StructureContext@f45574 from spaces.ear 2009-02-18 19:04:15,468 TRACE [org.jboss.virtual.VFSUtils] (RMI TCP Connection(4)-127.0.0.1) Parsing Class-Path: ./spaces-lib.jar for spaces-ejb.jar parentPath=vfszip: /home/ejort/jboss-head/testsuite/output/lib/dir with spaces/spaces.ear/ 2009-02-18 19:04:15,469 TRACE [org.jboss.virtual.VFSUtils] (RMI TCP Connection(4)-127.0.0.1) Unable to find es.ear/./spaces-lib.jar from FileHandler@25523328[path= con text=file:/home/ejort/jboss-head/testsuite/output/lib/dir%20with%20spaces/ real=file:/home/ejort/jboss-head/testsuite/output/lib/dir%20with%20spaces/]
Where it is the "vfsLibPath" that is getting cutoff in the wrong place because
the "parentURL" is not escaped properly. -
8. Re: JBAS-6518 - spaces in paths
adrian.brock Feb 18, 2009 2:16 PM (in response to adrian.brock)"adrian@jboss.org" wrote:
Where it is the "vfsLibPath" that is getting cutoff in the wrong place because
the "parentURL" is not escaped properly.
The reason the parentURL was not escaped properly was because it was
getting serialized from the client side (the testsuite) where I didn't have the
version of the VFS that has the JBVFS-89 fixes.
Anyway, the code in VFSUtils looks a mess, so I'm going to correct it anyway
https://jira.jboss.org/jira/browse/JBVFS-90