users@glassfish.java.net

Axis2 and Glassfish on a Unix environment

From: theqmaster <theqmaster_at_gmail.com>
Date: Fri, 29 May 2009 14:04:24 -0700 (PDT)

Anyone seen these exceptions while deploying axis2 to a glassfish in a Unix
environment ?
In a windows box works great! It must be a java policy that too strict -
anyone can point me out to the right Java Policy for a Unix env. with
respect to Glassfish ? Thanks in advance!

[#|2009-05-29T15:32:22.924-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=36;_ThreadName=RMI
TCP
Connection(85)-172.16.81.67;_RequestID=cbc6b37f-ee80-4277-b66c-adab9069d338;|WebModule[/axis2]PWC1396:
Servlet /axis2 threw load() exception
java.security.AccessControlException: access denied (java.io.FilePermission
/opt/glassfish/imq/lib/jaxm-api.jar read)
        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.checkRead(SecurityManager.java:871)
        at java.io.File.isFile(File.java:776)
        at
org.apache.axis2.deployment.RepositoryListener.loadClassPathModules(RepositoryListener.java:184)

This is the code that's doing it it

  168 ClassLoader cl =
deploymentEngine.getAxisConfig().getModuleClassLoader();
  169 while (cl != null) {
  170 if (cl instanceof URLClassLoader) {
  171 URL[] urls = ((URLClassLoader)cl).getURLs();
  172 for (int i = 0; (urls != null) && i < urls.length;
i++) {
  173 String path = urls[i].getPath();
  174 //If it is a drive letter, adjust accordingly.
  175 if (path.length() >= 3 && path.charAt(0) == '/'
&& path.charAt(2) == ':') {
  176 path = path.substring(1);
  177 }
  178 try {
  179 path = URLDecoder.decode(path,
Utils.defaultEncoding);
  180 } catch (UnsupportedEncodingException e) {
  181 // Log this?
  182 }
  183 File file = new File(path.replace('/',
File.separatorChar).replace('|', ':'));
  184 if (file.isFile()) {
  185 if
(DeploymentFileData.isModuleArchiveFile(file.getName())) {
  186 //adding modules in the class path
  187 addFileToDeploy(file, deployer,
WSInfo.TYPE_MODULE);
  188 }
  189 }
  190 }
  191 }
  192 cl = cl.getParent();

-- 
View this message in context: http://www.nabble.com/Axis2-and-Glassfish-on-a-Unix-environment-tp23787032p23787032.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.