aspose file tools*
The moose likes Oracle/OAS and the fly likes Setting permissions to JCA resource adapter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Setting permissions to JCA resource adapter" Watch "Setting permissions to JCA resource adapter" New topic
Author

Setting permissions to JCA resource adapter

Luis Alfredo Perez
Greenhorn

Joined: Mar 04, 2002
Posts: 7
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)


bla bla
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Setting permissions to JCA resource adapter