Applet security

After a long long time, I’‘ve taken up my applet again. For the first time now, I’'ve tested my applet on our private webserver in a browser instead of in my IDE.

Unfortunately I keep getting this exception:

Exception occurred during event dispatching:

java.security.AccessControlException: access denied (java.util.PropertyPermission smack.debuggerClass read)

at java.security.AccessControlContext.checkPermission(Unknown Source)

I’‘m aware that an applet can only access the server it’‘s originated from, but that’'s the case here. Logic tells me I should be able to login without any problems.

Has anyone else seen this problem? Any solutions? I know I can work around this by signing my applet, but I’'d like to avoid this if I can.

Bart,

I checked in a fix for this issue. Basically, all calls to System.getProperty need to be wrapped in a try/catch block. Please try tomorrow’'s daily build and let us know how it works for you.

Regards,

Matt

Thanks Matt.

I’'ve tried the new build and found it works perfectly, but only if I disable debugging. If I use XMPPConnection.DEBUG_ENABLED = true, I get the following Exception:

java.lang.ExceptionInInitializerError

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at org.apache.xalan.serialize.SerializerFactory.getSerializer(Unknown Source)

at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler (Unknown Source)

at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Unknown Source)

at org.jivesoftware.smackx.debugger.EnhancedDebugger.formatXML(EnhancedDebugger.ja va:756)

at org.jivesoftware.smackx.debugger.EnhancedDebugger.addSentPacketToTable(Enhanced Debugger.java:727)

at org.jivesoftware.smackx.debugger.EnhancedDebugger.access$100(EnhancedDebugger.j ava:83)

at org.jivesoftware.smackx.debugger.EnhancedDebugger$2.processPacket(EnhancedDebug ger.java:202)

at org.jivesoftware.smack.PacketWriter$ListenerWrapper.notifyListener(PacketWriter .java:320)

at org.jivesoftware.smack.PacketWriter.processListeners(PacketWriter.java:283)

at org.jivesoftware.smack.PacketWriter.access$100(PacketWriter.java:66)

at org.jivesoftware.smack.PacketWriter$2.run(PacketWriter.java:98)

Caused by: java.lang.RuntimeException: The resource could not load: java.net.MalformedURLException: no protocol: XMLEntities.res

XMLEntities.res java.net.MalformedURLException: no protocol: XMLEntities.res

at org.apache.xalan.serialize.CharInfo.(Unknown Source)

at org.apache.xalan.serialize.SerializerToXML.(Unknown Source)

… 13 more

java.lang.NoClassDefFoundError

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at org.apache.xalan.serialize.SerializerFactory.getSerializer(Unknown Source)

at org.apache.xalan.transformer.TransformerIdentityImpl.createResultContentHandler (Unknown Source)

at org.apache.xalan.transformer.TransformerIdentityImpl.transform(Unknown Source)

at org.jivesoftware.smackx.debugger.EnhancedDebugger.formatXML(EnhancedDebugger.ja va:756)

at org.jivesoftware.smackx.debugger.EnhancedDebugger.addReadPacketToTable(Enhanced Debugger.java:676)

at org.jivesoftware.smackx.debugger.EnhancedDebugger.access$000(EnhancedDebugger.j ava:83)

at org.jivesoftware.smackx.debugger.EnhancedDebugger$1.processPacket(EnhancedDebug ger.java:193)

at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader .java:829)

at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:253)

at org.jivesoftware.smack.PacketReader.access$100(PacketReader.java:77)

at org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:111)

Of course, since debugging probably won’‘t be enabled once it’‘s on the server - most testing happens in my IDE - you can consider this low priority, but I thought I’'d just let you know.

HI

Can you just let me know what is the reason for the Exceptions that you have posted. I am also facing the same and trying to identify the cause.

Prabhu