users@glassfish.java.net

Sun Message Queue throws java.security.AccessControlException

From: <glassfish_at_javadesktop.org>
Date: Tue, 14 Oct 2008 14:52:15 PDT

Hi,

   I'm using Sun Java System Application Server 9.1U2 with HADB on Linux
and I have a problem with Sun Message Queue. It works in embedded mode and
I'm not able to use JMS after some time.
It throws java.security.AccessControlException (stack trace below).
I think I've found a workaround for that problem by changing server.policy file.
I've added the following line:
permission java.io.FilePermission "${com.sun.aas.instanceRoot}${/}imq${/}instances${/}imqbroker${/}log${/}-", "delete";

   Is it a well known issue?

   Best Regards,

       Tomasz



Here's the stack trace:

java.security.AccessControlException: access denied (java.io.FilePermission /opt/SUNWappserver91u2/domains/domain1/imq/instances/imqbroker/log/log_9.txt delete)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at java.lang.SecurityManager.checkDelete(SecurityManager.java:990)
        at java.io.File.delete(File.java:902)
        at com.sun.messaging.jmq.io.RollingFileOutputStream.rolloverFile(RollingFileOutputStream.java:332)
        at com.sun.messaging.jmq.io.RollingFileOutputStream.write(RollingFileOutputStream.java:293)
        at com.sun.messaging.jmq.io.RollingFileOutputStream.write(RollingFileOutputStream.java:279)
        at com.sun.messaging.jmq.util.log.FileLogHandler.publish(FileLogHandler.java:248)
        at com.sun.messaging.jmq.util.log.Logger.publish(Logger.java:543)
        at com.sun.messaging.jmq.util.log.Logger.log(Logger.java:792)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectConnection.logConnectionInfo(IMQDirectConnection.java:447)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectConnection.logConnectionInfo(IMQDirectConnection.java:429)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectConnection.setConnectionState(IMQDirectConnection.java:421)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectConnection.authenticate(IMQDirectConnection.java:127)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.createDirectConnection(IMQDirectService.java:325)
        at com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService.createConnection(IMQDirectService.java:419)
        at com.sun.messaging.jms.ra.DirectConnectionFactory._createConnectionId(DirectConnectionFactory.java:424)
        at com.sun.messaging.jms.ra.DirectConnectionFactory._createConnection(DirectConnectionFactory.java:547)
        at com.sun.messaging.jms.ra.ManagedConnection.<init>(ManagedConnection.java:190)
        at com.sun.messaging.jms.ra.ManagedConnectionFactory.createManagedConnection(ManagedConnectionFactory.java:213)
        at com.sun.enterprise.resource.ConnectorAllocator.createResource(ConnectorAllocator.java:136)
        at com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:891)
        at com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java:1752)
        at com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:917)
        at com.sun.enterprise.resource.AbstractResourcePool.resizePoolAndGetNewResource(AbstractResourcePool.java:813)
        at com.sun.enterprise.resource.AbstractResourcePool.getResourceFromPool(AbstractResourcePool.java:781)
        at com.sun.enterprise.resource.AbstractResourcePool.getUnenlistedResource(AbstractResourcePool.java:652)
        at com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:594)
        at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:443)
        at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
        at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:337)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
        at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158)
        at com.sun.messaging.jms.ra.DirectConnectionFactory._allocateConnection(DirectConnectionFactory.java:569)
        at com.sun.messaging.jms.ra.DirectConnectionFactory.createConnection(DirectConnectionFactory.java:262)
        at com.sun.messaging.jms.ra.DirectConnectionFactory.createConnection(DirectConnectionFactory.java:241)
[Message sent by forum member 'tlw' (tlw)]

http://forums.java.net/jive/thread.jspa?messageID=306993