Another applet security issue.
When I try to call this function from a javascript I get a security violation aswell:
public void joinMUC(String nick, String room)
{
try
{
MultiUserChat muc = new MultiUserChat(connection,room);
muc.join(nick);
muc.sendMessage(“hi there”);
/- if I remove theese lines below it works to pass the message-/
PacketListener pl = new PacketListener()
{
public void processPacket(Packet packet)
{
callback(“MUCMessage”,packet); //register callback handler for incomming message
}
};
muc.addMessageListener(pl);
/**----
**/
}
catch(XMPPException xmppe)
{
System.out.println(“could not join room:”+xmppe.toString());
}
}
The error I get is below, everything in the jar packet is totally unjared and rejared and signed:
java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(SecureInvocation.java:204)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(SecureInvocation.java:183)
at sun.plugin.navig.motif.AThread.handleRequest(Native Method)
at sun.plugin.navig.motif.AThread.JNIHandleLoop(AThread.java:35)
at sun.plugin.navig.motif.AThread.run(AThread.java:27)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.plugin.javascript.invoke.JSInvoke.invoke(JSInvoke.java:19)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at sun.plugin.javascript.JSClassLoader.invoke(JSClassLoader.java:44)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(SecureInvocation.java:572 )
… 7 more
Caused by: java.lang.SecurityException: class “jabberClient$1”’'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:775)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:163)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:119)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at jabberClient.joinMUC(jabberClient.java:62)
… 17 more
java.lang.ClassCastException: org.jivesoftware.smack.packet.DefaultPacketExtension
at org.jivesoftware.smackx.muc.MultiUserChat.getMUCUserExtension(MultiUserChat.jav a:1955)
at org.jivesoftware.smackx.muc.MultiUserChat.access$600(MultiUserChat.java:46)
at org.jivesoftware.smackx.muc.MultiUserChat$8.processPacket(MultiUserChat.java:21 75)
at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader .java:822)
at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:260)
at org.jivesoftware.smack.PacketReader.access$100(PacketReader.java:43)
at org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:72)