[GLASSFISH-16793] Directory deployment from NetBeans changes application name Created: 02/Jun/11  Updated: 13/Jul/12

Status: Open
Project: glassfish
Component/s: admin_gui
Affects Version/s: 3.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: benupsavs Assignee: Anissa Lam
Resolution: Unresolved Votes: 6
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Glassfish 3.1 bundled with NetBeans 7.0


Attachments: Zip Archive test-parent.zip     Zip Archive test.zip    
Tags: deployment, ear, maven, netbeans

 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.



 Comments   
Comment by puce [ 25/Jan/12 ]

+1
Same issue here

Comment by ymajoros [ 27/Jan/12 ]

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).

Comment by rbento [ 15/May/12 ]

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

Comment by Hong Zhang [ 15/May/12 ]

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

Comment by rbento [ 15/May/12 ]

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

Comment by Hong Zhang [ 15/May/12 ]

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..

Comment by rbento [ 15/May/12 ]

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.

Comment by Hong Zhang [ 15/May/12 ]

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

Comment by pbenedict [ 01/Jun/12 ]

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.

Comment by Hong Zhang [ 01/Jun/12 ]

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.

Comment by pbenedict [ 01/Jun/12 ]

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."

Comment by pbenedict [ 01/Jun/12 ]

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

Comment by Hong Zhang [ 01/Jun/12 ]

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.

Comment by Paul Benedict [ 13/Jul/12 ]

Any chance this could be slated for 3.1.3?

Generated at Fri Sep 30 04:44:17 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.