glassfish
  1. glassfish
  2. GLASSFISH-16793

Directory deployment from NetBeans changes application name

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: admin_gui
    • Labels:
      None
    • Environment:

      Glassfish 3.1 bundled with NetBeans 7.0

      Description

      When a Maven enterprise application is deployed from NetBeans to Glassfish using the run button in NetBeans, Glassfish is ignoring the <application-name> element in application.xml and using the default application name (the unqualified name of the .ear file minus the extension). This doesn't appear to be a NetBeans issue but a Glassfish issue with the method that NetBeans is using to do a directory deployment.

      Please see http://www.java.net/forum/topic/glassfish/glassfish/portable-jndi-names-ejb31-enterprise-app for more detailed information, including how to reproduce.

        Activity

        Hide
        puce added a comment -

        +1
        Same issue here

        Show
        puce added a comment - +1 Same issue here
        Hide
        ymajoros added a comment -

        Same here, without maven (using ant), directory deployment.

        Same project works fine when deployed using CLI.

        application-name isn't taken into account when ran from netbeans (directory deployment).

        Show
        ymajoros added a comment - Same here, without maven (using ant), directory deployment. Same project works fine when deployed using CLI. application-name isn't taken into account when ran from netbeans (directory deployment).
        Hide
        rbento added a comment -

        I think this bug is of major priority because it breaks lookup for portable JNDI names.

        Show
        rbento added a comment - I think this bug is of major priority because it breaks lookup for portable JNDI names.
        Hide
        Hong Zhang added a comment -

        If you are doing directory deployment with CLI, does it work?

        Show
        Hong Zhang added a comment - If you are doing directory deployment with CLI, does it work?
        Hide
        rbento added a comment - - edited

        I have a Maven project which has some modules:

        • pom root
        • ear module
        • ejb module
        • web module

        I want to use Netbeans <> Glassfish hot deployment.

        By turning on the hot deployment:

        • project > properties > build > compile > compile on save [For both application and test execution]
        • project > properties > run > deploy on save [x]

        Doing the process above only in the modules, but not in pom root, the EAR module is successfully deployed with no bug in the app name but the hot deploy doesn't work.

        Then, by setting the compile on save feature in the pom root, the name becomes bugged and the hot deployment works.

        That's it

        Show
        rbento added a comment - - edited I have a Maven project which has some modules: pom root ear module ejb module web module I want to use Netbeans <> Glassfish hot deployment. By turning on the hot deployment: project > properties > build > compile > compile on save [For both application and test execution] project > properties > run > deploy on save [x] Doing the process above only in the modules, but not in pom root, the EAR module is successfully deployed with no bug in the app name but the hot deploy doesn't work. Then, by setting the compile on save feature in the pom root, the name becomes bugged and the hot deployment works. That's it
        Hide
        Hong Zhang added a comment -

        Understood, but just trying to see if the issue is in GlassFish or NetBeans. If directory deployment with CLI works, the bug is most likely in NetBeans..

        Show
        Hong Zhang added a comment - Understood, but just trying to see if the issue is in GlassFish or NetBeans. If directory deployment with CLI works, the bug is most likely in NetBeans..
        Hide
        rbento added a comment - - edited

        Ok, thanks Hong.

        I think it is a Netbeans integration issue.

        I've just tested deployment through GlassFish admin and autodeploy directory and both worked fine.

        I'm using Netbeans 7.1.2 and GlassFish 3.1.2.

        [edit]

        The app is deployed to gfdeploy folder with the wrong name.

        Show
        rbento added a comment - - edited Ok, thanks Hong. I think it is a Netbeans integration issue. I've just tested deployment through GlassFish admin and autodeploy directory and both worked fine. I'm using Netbeans 7.1.2 and GlassFish 3.1.2. [edit] The app is deployed to gfdeploy folder with the wrong name.
        Hide
        Hong Zhang added a comment -

        Thanks for trying! So you should probably file an issue under NetBeans for this to get this fixed from the NetBeans side.

        Show
        Hong Zhang added a comment - Thanks for trying! So you should probably file an issue under NetBeans for this to get this fixed from the NetBeans side.
        Hide
        pbenedict added a comment -

        Is this really limited to NetBeans/Maven? I package up an EAR and EJB module, deploy it through the Admin Console, and Glassfish 3.1.2 ignores both <application> and <module> names – so I can't specify a portable name no matter what.

        Show
        pbenedict added a comment - Is this really limited to NetBeans/Maven? I package up an EAR and EJB module, deploy it through the Admin Console, and Glassfish 3.1.2 ignores both <application> and <module> names – so I can't specify a portable name no matter what.
        Hide
        Hong Zhang added a comment -

        Can you attach your test case which could reproduce the problem so we could look into it? We do have some tests to cover the basic scenarios.

        Show
        Hong Zhang added a comment - Can you attach your test case which could reproduce the problem so we could look into it? We do have some tests to cover the basic scenarios.
        Hide
        pbenedict added a comment -

        Attached is the most simple test I can make. When I deploy the EAR, this is in my log file:
        EJB5181:Portable JNDI names for EJB MyBean: [java:global/test-ear-1.0-SNAPSHOT/my-module/MyBean!test.MyBean, java:global/test-ear-1.0-SNAPSHOT/my-module/MyBean

        However, since I specified <application-name>, the portable name should actually be java:global/my-app/my-module/MyBean....

        The <application-name> is definitely not getting processed. From p. 83 of the spec, "It defaults to the base name of the .ear file with no filename extension, unless specified by the application.xml deployment descriptor."

        Show
        pbenedict added a comment - Attached is the most simple test I can make. When I deploy the EAR, this is in my log file: EJB5181:Portable JNDI names for EJB MyBean: [java:global/test-ear-1.0-SNAPSHOT/my-module/MyBean!test.MyBean, java:global/test-ear-1.0-SNAPSHOT/my-module/MyBean However, since I specified <application-name>, the portable name should actually be java:global/my-app/my-module/MyBean .... The <application-name> is definitely not getting processed. From p. 83 of the spec, "It defaults to the base name of the .ear file with no filename extension, unless specified by the application.xml deployment descriptor."
        Hide
        pbenedict added a comment - - edited

        FYI, I confirmed things work fine using asadmin deploy command. It does not work as expected through the web admin gui.

        Show
        pbenedict added a comment - - edited FYI, I confirmed things work fine using asadmin deploy command. It does not work as expected through the web admin gui.
        Hide
        Hong Zhang added a comment -

        Thanks for the updates. I am assigning to admin console team to see if the console code path assigns an application name before goes to the server backend.

        Show
        Hong Zhang added a comment - Thanks for the updates. I am assigning to admin console team to see if the console code path assigns an application name before goes to the server backend.
        Hide
        Paul Benedict added a comment -

        Any chance this could be slated for 3.1.3?

        Show
        Paul Benedict added a comment - Any chance this could be slated for 3.1.3?

          People

          • Assignee:
            Anissa Lam
            Reporter:
            benupsavs
          • Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated: