[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
AccessControlException: access denied ("javax.management.MBeanTrustPermission" "register")  XML
Forum Index -> General
Author Message
mperdike

neo

Joined: 08/30/2012 06:14:18
Messages: 1
Offline

I am trying to reproduce the simple ColorsCache distributed EhCache sample
with the Terracota Server Array for a much simpler console application of my own
to experiment with the system and libraries.

I 've built my own Ant build.xml file to run the script. The thing is, the
code fails at the invocation of new CacheManager() below:

Code:
 public class TranslationCache {
     private static final CacheManager cacheManager = new CacheManager();
     private static final TranslationDatabase translationDatabase = new  TranslationDatabase();
 (...)
 


... and the stack trace is complaining about a MBeanTrustPermission
(full trace attached as a file) although I've explicitly
granted that permission. I suspect it's got to do something with
the evaluation version of enterprise Terracotta I'm using.

Here's my Ant <java> task:

Code:
         <java classname ="${project.MainClass.name}">
               <permissions>
                    <grant class="javax.management.MBeanTrustPermission" name="register"/> 
                     <grant class="java.security.AllPermission"/>
                </permissions>
                <classpath refid="run.classpath"/>
         </java>
 


and my ehcache.xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
 
 <ehcache name="ColorCache">
   <defaultCache
       maxElementsInMemory="10000"
       eternal="false"
       timeToIdleSeconds="120"
       timeToLiveSeconds="120"
       overflowToDisk="true"
       diskSpoolBufferSizeMB="30"
       maxElementsOnDisk="10000000"
       diskPersistent="false"
       diskExpiryThreadIntervalSeconds="120"
       memoryStoreEvictionPolicy="LRU"/>
   <cache name="colors"
          maxElementsInMemory="100"
          maxElementsOnDisk="0"
          eternal="false"
          timeToIdleSeconds="120"
          timeToLiveSeconds="0"
          memoryStoreEvictionPolicy="LFU">
     <terracotta/>
   </cache>
   <terracottaConfig url="localhost:9510"/>
 </ehcache>
 


Do I have to configure a security policy of some kind somewhere?
I suspect it's related to the trial version / licence-key.
Full stack trace is attached.

 Filename stacktrace [Disk] Download
 Description
 Filesize 9 Kbytes
 Downloaded:  405 time(s)

rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1491
Offline

This could be due to the fact that your application may not be able to create socket with terracotta , Can you please check that permission.

Rakesh Joshi
Senior Consultant
Terracotta.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.7 © JForum Team