Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.3k views
in Java FTP by (160 points)
hi,
I would like to know( if it's possible), why i've those error messages when i try to use my applet java because when i use this in an java application i've no problems.

Could not read property 'edtftp.log.level' due to security permissions
Could not read property 'edtftp.log.log4j' due to security permissions


my: java.policy.applet is

grant{
permission java.util.PropertyPermission; permission java.util.PropertyPermission "edtftp.log.level", "read"
permission java.util.PropertyPermission "edtftp.log.log4j", "read"
};



ps: I don't have error at compilation


thanks a lot!

3 Answers

0 votes
by (162k points)
Try adding your permissions to the java.policy file.

I'm not sure that java.policy.applet is recognized by the JRE.
0 votes
by (160 points)
Thanks for your reponse but i've found my problem before.

It was just because my archive .jar was malformed and not a policy file problem.
My applet applet work well without use a policy file.


For use edtftp librairy with an applet, your signed .jar file must contain:

- YourApplet.class
- the folder: com (issue from extracting "edtftpj-1.5.2.jar").


that's all
0 votes
by (140 points)
I have exactly the same problem as you.
And, I do not understand what your solution is.

I have tried the folowing tricks:

1.
My JAR archive (ftp.jar) contains two libraries:
- mine (com.xxx)
- edtftpj-1.5.3 (com.entreprise.dt.net, com.entreprise.dt.net.ftp, com.entreprise.dt.net, com.entreprise.dt.net.ftp.test, com.entreprise.dt.net.util.debug)

2.
My JAR archive only contains my librairy.
Here's my workspace root directory:
.
|-- class
|   |-- com
|   |   `-- xxx ...
|   `-- java.policy.applet
|-- ftp.jar
|-- index.html
|-- lib
|   `-- edtftpj-1.5.3.jar
`-- src
    `-- com
        `-- xxx ...


The content of my HTML file is:
<html>
  <body>
  <applet archive="ftp.jar" code="com.xxx.MyApplet" width="150"  height="20">
    <param name="dossier" value="tt/" />
  </applet>
  </body>
</html>


And the error is:
Could not read property 'edtftp.log.level' due to security permissions
Could not read property 'edtftp.log.log4j' due to security permissions
java.security.AccessControlException: access denied (java.net.SocketPermission pixpoket.com resolve)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at java.security.AccessController.checkPermission(AccessController.java:427)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.SecurityManager.checkConnect(SecurityManager.java:1031)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1117)
        at java.net.InetAddress.getAllByName0(InetAddress.java:1098)
        at java.net.InetAddress.getAllByName(InetAddress.java:1061)
        at java.net.InetAddress.getByName(InetAddress.java:958)
        at com.enterprisedt.net.ftp.FTPClient.setRemoteHost(FTPClient.java:842)
        ...


Is it important to specify the java.policy.applet file ?
Does anybody else have a solution?

Categories

...