glassfish
  1. glassfish
  2. GLASSFISH-16074

Deployer#deploy() sometimes returns null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.1_b41
    • Fix Version/s: None
    • Component/s: embedded
    • Labels:
      None

      Description

      (Note that 3.1-b41 is the latest embedded version; not sure why.)

      Sometimes a deployment using the embedded API returns null. I am using code like this:

      final Deployer deployer = this.glassfish.getDeployer();
      assertNotNull(deployer);

      final ScatteredArchive sa = new ScatteredArchive("test-classes", ScatteredArchive.Type.JAR, this.beanClassClasspathRoot);
      this.deployedApplication = deployer.deploy(sa.toURI());

      this.beanClassClasspathRoot evaluates to (in my case): /Users/ljnelson/Projects/ngp/ngp-dao-ejb/target/test-classes

      It is a directory, it exists, and it contains all classes necessary for my EJB module.

      sa.toURI() evaluates to file:/var/folders/Xd/XdAtuoEzHdOh7AR5tSGFJ++++TI/-Tmp-/test-classes.jar

      The (monstrous) log, when Level.FINE is enabled, says only this:

      PlainTextActionReporterFAILUREDescription: deploy AdminCommandError occurred during deployment: null. Please see server.log for more details.
      [name=test-classes

      Then null is returned from the deploy() method.

      I cannot reliably reproduce this, so I expect that eyeball debugging will be necessary.

      Despite this oddity, my test completes normally. That is, I am able to look up and run tests on my EJB.

        Activity

        Hide
        ljnelson added a comment -

        I've attached the output of running my test with the global log level set to FINEST.

        Show
        ljnelson added a comment - I've attached the output of running my test with the global log level set to FINEST.
        Hide
        ljnelson added a comment -

        I tried supplying it with a -name option (i.e. deploy(sa.toURI(), "-name", "test-classes")) but that didn't help.

        Show
        ljnelson added a comment - I tried supplying it with a - name option (i.e. deploy(sa.toURI(), " -name", "test-classes")) but that didn't help.
        Hide
        Bhavanishankar added a comment -

        This looks like a specific issue.

        Under normal circumstances I can not reproduce this issue.

        Please attach a testcase for me to reproduce. Otherwise I won't be able to fix this issue.

        Show
        Bhavanishankar added a comment - This looks like a specific issue. Under normal circumstances I can not reproduce this issue. Please attach a testcase for me to reproduce. Otherwise I won't be able to fix this issue.
        Hide
        Bhavanishankar added a comment -

        When the deployment fails, deploy() method will return null. You need enable deployment logging and see why it fails.

        This does not look like a issue to me.

        Show
        Bhavanishankar added a comment - When the deployment fails, deploy() method will return null. You need enable deployment logging and see why it fails. This does not look like a issue to me.
        Hide
        ljnelson added a comment -

        How do I turn on deployment logging, given that I thought I had?

        Show
        ljnelson added a comment - How do I turn on deployment logging, given that I thought I had?
        Show
        Bhavanishankar added a comment - Please refer my blog http://weblogs.java.net/blog/bhavanishankar/archive/2010/12/15/changing-log-levels-embedded-glassfish
        Hide
        marina vatkina added a comment -

        Laird, does your test include CDI? There are cases (that I do not know how to determine) when ScatteredArchive created from EJB module with CDI returns null on deploy. EJB devtests with CDI do not produce this error.

        Show
        marina vatkina added a comment - Laird, does your test include CDI? There are cases (that I do not know how to determine) when ScatteredArchive created from EJB module with CDI returns null on deploy. EJB devtests with CDI do not produce this error.
        Hide
        ljnelson added a comment -

        Honestly don't remember (this was February, after all). I doubt it, however.

        Show
        ljnelson added a comment - Honestly don't remember (this was February, after all). I doubt it, however.

          People

          • Assignee:
            Bhavanishankar
            Reporter:
            ljnelson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: