activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bear.giles" <Bear.Gi...@si-intl.com>
Subject Re: ActiveMQ 5.0 & java applets
Date Wed, 27 Feb 2008 20:06:50 GMT

I've been able to learn more about the problem.  It appears to be a problem
initializing log4j within the ActiveMQConnectionFactory initialization. 
Others have reported this problem with applets (in log4j, not activemq) in
the log4j mailing list.

I've given the applet full permission in java.policy, so it's not a simple
problem with the security policy. (I'm using 'http://10.10.6.5/*', but it
doesn't work in the main stanza either.)

The stack trace is

java.lang.ExceptionInInitializerError
            at
org.apache.activemq.ActiveMQConnection.<clinit>(ActiveMQConnection.java:106)
            at com.si.applet.JmsApplet.<init>(JmsApplet.java:36)
            at
com.si.applet.ProducerConsumerApplet.<init>(ProducerConsumerApplet.java:36)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source)
            at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at java.lang.Class.newInstance0(Unknown Source)
            at java.lang.Class.newInstance(Unknown Source)
            at sun.applet.AppletPanel.createApplet(Unknown Source)
            at sun.plugin.AppletViewer.createApplet(Unknown Source)
            at sun.applet.AppletPanel.runLoader(Unknown Source)
            at sun.applet.AppletPanel.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)

Caused by: java.security.AccessControlException: access denied
(java.util.PropertyPermission
org.apache.commons.logging.LogFactory.HashtableImpl read)
            at java.security.AccessControlContext.checkPermission(Unknown
Source)
            at java.security.AccessController.checkPermission(Unknown
Source)
            at java.lang.SecurityManager.checkPermission(Unknown Source)
            at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
            at java.lang.System.getProperty(Unknown Source)
            at
org.apache.commons.logging.LogFactory.createFactoryStore(LogFactory.java:320)
            at
org.apache.commons.logging.LogFactory.<clinit>(LogFactory.java:1725)
            ... 14 more
 
The obvious solution of putting my own (empty) log4j.properties file in the
default package didn't work, nor did setting the system property to disable
log4j initialization in a static block.

-- 
View this message in context: http://www.nabble.com/ActiveMQ-5.0---java-applets-tp15665219s2354p15721861.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message