2 Replies Latest reply on Sep 5, 2012 8:23 AM by Mylos Kathos

    Troubles with URL JNDI resources

    Mylos Kathos Master

      Hiall,

      I have a web application which is running fine on JBoss 4.2.2 and uses in web.xml a resource-ref to refer to an URL resource:

       

      <resource-ref>

              <description>Backup directory</description>

              <res-ref-name>com.telco.backupdir</res-ref-name>

              <res-type>java.net.URL</res-type>

              <res-auth>Container</res-auth>

              <res-sharing-scope>Shareable</res-sharing-scope>

      </resource-ref>  

       

      Unfortunately when deploying the application on JBoss AS 7.1.1 (after all the other needed fixes) I wasn't unable to deploy the resource-ref. This is the error I get:

       

      JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.naming.context.java.jboss.resources.url."com.telco.backupdir" (missing) dependents: [service jboss.naming.context.java.module.ArcEar.Webapp.env.url."com.telco.backupdir"]

       

      09:24:58,574 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.ArcEar.Webapp.env.url.\"com.telco.backupdir\"jboss.naming.context.java.jboss.resources.url.\"

      it.portal.edoc.temp.folder\"Missing[jboss.naming.context.java.module.ArcEar.Webapp.env.url.\"com.telco.backupdir\"jboss.naming.context.java.jboss.resources.url.\"com.telco.backupdir\"]"]}}}

       

      It seems there are some issues with JBoss AS 7 naming subsystem and URLs: as a matter of fact, if I try to store in the standalone.xml file a naming entry of type="java.net.URL" the application server raises an exception that just primitive types are accepted.

      Is it a bug or there's a workaround for it ?

      Thanks a lot

      Mylos