So i got around that first exception by modifing the common logger code to do a property check but now i'm running into more security exceptions when activemq trys to request properties. Has anyone gotten activemq 5 running in a applet??

here is the current exception.

javax.jms.JMSException: Could not connect to broker URL: tcp:// localhost:43999. Reason: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.activemq.UseDedicatedTaskRunner read) at org .apache .activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35) at org .apache .activemq .ActiveMQConnectionFactory .createActiveMQConnection(ActiveMQConnectionFactory.java:280) at org .apache .activemq .ActiveMQConnectionFactory .createActiveMQConnection(ActiveMQConnectionFactory.java:224) at org .apache .activemq .ActiveMQConnectionFactory .createConnection(ActiveMQConnectionFactory.java:172) at com.corewafer.taos.ui.applets.Console.setupMessageServer(Console.java: 91)
        at com.corewafer.taos.ui.applets.Console.init(Console.java:162)
at sun.plugin2.applet.Plugin2Manager $AppletExecutionRunnable.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.activemq.UseDedicatedTaskRunner 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 .activemq.thread.TaskRunnerFactory.<init>(TaskRunnerFactory.java:62) at org .apache .activemq.thread.TaskRunnerFactory.<init>(TaskRunnerFactory.java:47) at org.apache.activemq.ActiveMQConnection.<init>(ActiveMQConnection.java: 115) at org .apache .activemq .ActiveMQConnectionFactory .createActiveMQConnection(ActiveMQConnectionFactory.java:285) at org .apache .activemq .ActiveMQConnectionFactory .createActiveMQConnection(ActiveMQConnectionFactory.java:253)
        ... 6 more

Best Regards
Kyle

ActiveMQ just uses commons-logging by default so if you don't want to
use log4j jsut don't include it in your classpath.

More details here...
http://activemq.apache.org/how-do-i-change-the-logging.html
http://commons.apache.org/logging/guide.html

2009/3/12 Kyle Watson <k...@corewafer.com>:
Hi,
I'm getting a exception when creating a connection factory in my applet.

Exception in thread "thread applet- com.corewafer.taos.ui.applets.Console-1"
java.lang.ExceptionInInitializerError
       at
org .apache .activemq .ActiveMQPrefetchPolicy.<clinit>(ActiveMQPrefetchPolicy.java:30)
       at
org .apache .activemq .ActiveMQConnectionFactory.<init>(ActiveMQConnectionFactory.java:90)
       at
com .corewafer.taos.ui.applets.Console.setupMessageServer(Console.java: 87) at com.corewafer.taos.ui.applets.Console.init(Console.java: 161)
       at
sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.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)

I've read that turning off logging using log4j.properties might help but i'm unable to get activemq in my applet to load a log4j.properties file. Is it
possible for me to turn off logging at runtime?

Best Regards,
Kyle Watson
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Kyle Watson
Member of the Technical Staff
Core Wafer Systems
+1 (505) 349-0639 ext 114 (voice, direct to office)
k...@corewafer.com





--
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Kyle Watson
Member of the Technical Staff
Core Wafer Systems
+1 (505) 349-0639 ext 114 (voice, direct to office)
k...@corewafer.com

Reply via email to