| Hello,I have an error-
 Exception in thread "main" java.security.AccessControlException: access denied ("java.util.PropertyPermission" "hibernate.enable_specj_proprietary_syntax" "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.hibernate.cfg.Configuration.reset(Configuration.java:340)
 at org.hibernate.cfg.Configuration.<init>(Configuration.java:275)
 at org.hibernate.cfg.Configuration.<init>(Configuration.java:279)
 while trying to run this line-
 SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
 
 thats happen beacause I add a securityManager for RMI-
 if (System.getSecurityManager() == null)
 {
 System.setSecurityManager(new SecurityManager());
 }
 
 in the grant file I made it -
 permission java.security.AllPermission;
 
 and still it dosent help.
 if I perforem the buildSessionFactory() before the setSecurityManager() it work fine, but I cant skip on it.
 
 I need help. Thnx
 
 
 |