On 18/09/12 21:39, Justin Deoliveira wrote: > So yeah... i don't actually know... i just did a quick test creating an > h2 db in a path with spaces and it worked ok for me on my mac so would > have to dig into this specific case more and perhaps try to do something > that does "suck gigantically".
Does your test-case create an absolute URL before using it? This is how imagemosaic handles its URLs; when combined with H2's URL handling behaviour (not unescaping), it causes the problem. Another workaround might be to change imagemosaic to not use absolute URLs, but that looks like it might default its rather strenuous checks for file and transport types. For the record, my "suck gigantically" remark was about H2's handling of URLs, not GeoTools'. Anyone familiar with our DataUtilities.urlToFile will be able to spot the problems that the H2 implementation is going to have handling any escaped character in a connection URL: http://h2database.googlecode.com/svn/trunk/h2/src/main/org/h2/engine/ConnectionInfo.java private void parseName() { if (".".equals(name)) { name = "mem:"; } if (name.startsWith("tcp:")) { remote = true; name = name.substring("tcp:".length()); } else if (name.startsWith("ssl:")) { remote = true; ssl = true; name = name.substring("ssl:".length()); } else if (name.startsWith("mem:")) { persistent = false; if ("mem:".equals(name)) { unnamed = true; } } else if (name.startsWith("file:")) { name = name.substring("file:".length()); persistent = true; } else { persistent = true; } if (persistent && !remote) { if ("/".equals(SysProperties.FILE_SEPARATOR)) { name = name.replace('\\', '/'); } else { name = name.replace('/', '\\'); } } } There is no attempt to unescape characters. Even the handling of separators is dodgy. Kind regards, -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel