Unhandled SecurityException in 
DefaultFTPFileEntryParserFactory.createFileEntryParser when using applets
--------------------------------------------------------------------------------------------------------

                 Key: NET-286
                 URL: https://issues.apache.org/jira/browse/NET-286
             Project: Commons Net
          Issue Type: Bug
            Reporter: Jory Geerts
            Priority: Minor


When using a commons.net.ftp in a (signed) applet, we encountered an unhandles 
_SecurityException_ in _DefaultFTPFileEntryParserFactory.createFileEntryParser_ 
in some cases.
If the applet was being hosted on my Windows Vista devmachine, connecting to 
FTP servers was no issue.
However, as soon as we uploaded the applet to our webserver (CentOS), things 
stopped working. After some debugging, we found that there was a 
_SecurityException_ being thrown by the following code in 
_DefaultFTPFileEntryParserFactory.createFileEntryParser_:
{{parserClass = Class.forName(key);}}
{{parser = (FTPFileEntryParser) parserClass.newInstance();}}
The toString() of the exception gave:
{{java.lang.SecurityException: class "UNIX Type: L8"'s signer information does 
not match signer information of other classes in the same package}}
(Note: When using a different FTP server, the string was obviously different.)
The exception got caught by the generic catchblock at the bottom that doesn't 
really do anything.
We managed to solve this by taking the code inside the catching of 
_ClassNotFoundException_ and use that to catch the _SecurityException_.

I hope this is somewhat helpfull. :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to