Joerg
Jorg Heymans wrote:
no prob. It shouldn't be a security problem because i have transformers reading from shared drives as well.
I just stepped through the code with a debugger, findings below From the cocoon source (directorygenerator.java)
if (!directoryFile.isDirectory()) {
throw new ResourceNotFoundException(directory + " is not a directory.");
}
--> exception thrown here, stepping into the isDirectory() call...
public boolean isDirectory() {
SecurityManager security = System.getSecurityManager();
if (security != null) {
security.checkRead(path);
}
return ((fs.getBooleanAttributes(this) & FileSystem.BA_DIRECTORY)
!= 0);
}
The security manager here is null. The return tail call are all native (bleh) so i can't peek there.
any thoughts? Could you bring this up on the dev list maybe?
Regards Jorg
Joerg Heinicke wrote:
Oh, I seem to have missed an important point: shared drive. I simply listed another drive than the Cocoon's one on the same machine. But this makes it a bit strange, doesn't it? What's the difference between a shared drive and "another" drive from Java's point of view? It's the Windows' task to handle the mapping correctly. Maybe there is only a "non access" error?
Sorry for any irritations triggered by my nonattention.
Joerg
Jorg Heymans wrote:
Hi Joerg.
Tnx for testing. It still does not work for me (winxp, java 1.4.1_02, cocoon 2.0.4)
Can anyone else on the list test a quick sitemap snippet :
<map:match pattern="remotedir"> <map:generate type="directory" src="Z:\temp" /> <map:serialize type="xml"/> </map:match>
Where Z: is a drive mapping to another windows machine, temp is the name of the share (can be anything ofcourse).
For me this is *not* working and i can't for the love of god find out why.
Something must be conflicting within cocoon because below java snippet works
File directoryFile = new File("z:\\temp");
if (!directoryFile.isDirectory()) {
System.out.println("not a directory");
}
@Joerg : is there anything else i can do to provide you with more information? If not then i setup a debugging environment and step through that very block of code. This is just too weird :)
rgds Jorg
Joerg Heinicke wrote:
Hello Jorg,
sorry I deleted your mail, so I lost the thread, I copied only the subject from the archive.
My test with latest Cocoon 2.0 code: It works. Both <map:generate type="directory" src="Z:\Temp"/> and <map:generate type="directory" src="file:///Z:/Temp"/>. Not surprising from a code point of view: nothing has changed in the handling of the src attribute.
I don't know what you are doing wrong. I can only say: It works for me (Win 2k, Sun Java 2 SDK 1.4.2).
Regards,
Joerg
-- System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 [EMAIL PROTECTED] www.virbus.de
