glassfish
  1. glassfish
  2. GLASSFISH-19021

Fail to validate component-level resource definitions with same JNDI in different component scope

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: future release
    • Fix Version/s: 4.0
    • Component/s: deployment
    • Labels:
      None

      Description

      I found a problem when running the devtest connector/v3/datasource-definition/. I add one data source (as below) in each of the EJB class HelloEJB.java and HelloStatefulEJB.java respectively. Although these two component-level data sources share the same JNDI name, they do not conflict because they are in different EJB scope.

      @DataSourceDefinition(name = "java:comp/env/Test_DataSource",
      minPoolSize = 0,
      initialPoolSize = 0,
      className = "org.apache.derby.jdbc.ClientXADataSource",
      portNumber = 1527,
      serverName = "localhost",
      user = "APP",
      password = "APP",
      databaseName = "hello-stateful-ejb-comp",
      properties =

      {"connectionAttributes=;create=true"}

      )

      But the application deployment fails when validate resource descriptors, and throws out the following exception. Could you take a look?

      [#|2012-08-19T20:39:21.708-0700|SEVERE|44.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=12;_ThreadName=Thread-2;|Application validation fails for given application [datasource-definitionApp] for jndi-name [java:comp/env/Test_DataSource]
      java.lang.IllegalStateException: Application validation fails for given application [datasource-definitionApp] for jndi-name [java:comp/env/Test_DataSource]
      at com.sun.enterprise.deployment.util.ApplicationValidator.accept(ApplicationValidator.java:106)
      at com.sun.enterprise.deployment.BundleDescriptor.visit(BundleDescriptor.java:621)
      at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(ApplicationArchivist.java:755)
      at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(ApplicationArchivist.java:244)
      at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:235)
      at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:188)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222)
      at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:871)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:811)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:373)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:228)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:466)

      For your convenience, the HelloEJB.java, HelloStatefulEJB.java and the server's log file are attached.

      1. HelloEJB.java
        7 kB
        dapeng_hu
      2. HelloStatefulEJB.java
        7 kB
        dapeng_hu
      3. server.log
        81 kB
        dapeng_hu

        Activity

        Hide
        naman_mehta added a comment -

        Fixed the issue.

        Sending dol/src/main/java/com/sun/enterprise/deployment/util/ApplicationValidator.java
        Transmitting file data .
        Committed revision 55618.

        Show
        naman_mehta added a comment - Fixed the issue. Sending dol/src/main/java/com/sun/enterprise/deployment/util/ApplicationValidator.java Transmitting file data . Committed revision 55618.

          People

          • Assignee:
            naman_mehta
            Reporter:
            dapeng_hu
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: