• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Setting permissions to JCA resource adapter

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm deploying a .rar file on Oracle 9iAS release 2 (9.0.3).
The deploy succeds but when I try to restart the OC4J instance,
the startup fails and the instance reports security permission
errors.
I opened the oc4j-connectors.xml file and I added some
security-permission entries to grant the needed permissions.
The changes are applied without errors but when I try to start
the instance again, I get the same errors. Just as if they
weren't introduced.
Here I show you the connectors configuration:
<oc4j-connectors>
<connector name="dance-connector" path="dance-connector.rar">
<security-permission enabled="true">
<description></description>
<security-permission-spec>grant {
permission java.lang.RuntimePermission "getClassLoader", *'
};</security-permission-spec>
</security-permission>
</connector>
</oc4j-connectors>
Something I don't understand and I could'nt find something that
would explain it to me is why should I set the permission with
those characters at the end: "*'", instead of the standard
semicolon one...
I even tried to grant the java.security.AllPermission to the
connector but I get a NullPointerException instead. I guess that
the file parser must be looking for the "target" element of the
permission entry...
Does anyone of you have initialize custom security permissions to
a resource adapter within Oracle 9iAS release 2 (9.0.3)?
Have a nice day!
Error initializing server: Error creating a Connection Factory from '...' could not be created due to reason: javax.resource.spi.EISSystemException: initTransientMembers() failed: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
java.security.AccessControlException: access denied (java.io.FilePermission D:\Oracle\OC4J\j2ee\home\persistence\transaction.state delete)
at java.security.AccessControlContext.checkPermissionAccessControlContext.java:272)
at java.security.AccessController.checkPermissionAccessController.java:399)
at java.lang.SecurityManager.checkPermissionSecurityManager.java:545)
at java.lang.SecurityManager.checkDelete(SecurityManager.java:1005)
at java.io.File.delete(File.java:712)
at com.evermind.server.ApplicationServer.destroyApplicationServer.java:1793)
at com.evermind.server.ApplicationServerLauncher.runApplicationServerLauncher.java:118)
at java.lang.Thread.run(Thread.java:484)
Exception in thread "main" java.security.AccessControlException: access denied (java.util.PropertyPermission vmId read)
at java.security.AccessControlContext.checkPermissionAccessControlContext.java:272)
at java.security.AccessController.checkPermissionAccessController.java:399)
at java.lang.SecurityManager.checkPermissionSecurityManager.java:545)
at java.lang.SecurityManager.checkPropertyAccessSecurityManager.java:1278)
at java.lang.System.getProperty(System.java:560)
at com.evermind.server.OC4JServer.main(OC4JServer.java:235)
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic