Bug 258407 - Error when creating a Grails 3.1.x project.
Error when creating a Grails 3.1.x project.
Status: VERIFIED FIXED
Product: groovy
Classification: Unclassified
Component: Grails
8.1
All All
: P1 with 1 vote (vote)
: Dev
Assigned To: bruno.flavio
issues@groovy
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-16 18:10 UTC by Afonso
Modified: 2016-10-08 22:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
IDE log (108.57 KB, text/plain)
2016-03-16 18:11 UTC, Afonso
Details
Proposed patch: places the --non-interactive parameter after the application name. (1.04 KB, patch)
2016-08-09 18:54 UTC, bruno.flavio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Afonso 2016-03-16 18:10:51 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Linux version 3.13.0-83-generic running on i386
Java; VM; Vendor = 1.8.0_65
Runtime = Java HotSpot(TM) Client VM 25.65-b01

Reproducibility: Happens every time

STEPS:
  * Open dialog New Project > Groovy
  * Set project name
  * Click on button "Finish"

ACTUAL:
  Error message appears: "Error Specify an application name or use --inplace to create an application in the current directory".
  Maybe Netbeans is issuing the command `grails create-app' without the proper project name as argument.

EXPECTED:
  Project to be created
Comment 1 Afonso 2016-03-16 18:11:03 UTC
Created attachment 158899 [details]
IDE log
Comment 2 bruno.flavio 2016-03-19 19:42:18 UTC
Afonso,

Thank you for reporting this bug.
I've confirmed the behaviour you've described with grails releases 3.1.0 up to 3.1.4.

The cli switch --non-interactive is no longer valid and thus the command executed throws an error:

"grails create-app --non-interactive GrailsApplication3"

the correct invocation would be:

"grails create-app GrailsApplication3"

The documentation[1] doesn't seem to indicate that there is a replacement for the  --non-interactive flag.

I'm upgrading this issue to P2 as the workaround is to manually create the grails project with the aforementioned cli invocation.


[1] https://grails.github.io/grails-doc/3.1.4/ref/Command%20Line/create-app.html

-Bruno
Comment 3 bruno.flavio 2016-08-09 10:16:24 UTC
> the correct invocation would be:
> 
> "grails create-app GrailsApplication3"
(In reply to bruno.flavio from comment #2)

It's noteworthy that "grails create-app GrailsApplication3 --non-interactive" is still a valid invocation (as of grails 3.1.9). I don't think it makes any difference: although --non-interactive is defined in the sources [1] I can't find any usages [2].

Thus as long as we don't separate the "create-app" from the application name there should be no problems. I can no longer use grails v1.1.x on my machine but looking at it's sources [3] this change makes no difference to the behaviour.


[1] https://github.com/grails/grails-core/blob/639d7039d24031dbc1353f95b6d2c88a100da850/grails-bootstrap/src/main/groovy/org/grails/build/parsing/CommandLine.java#L39

[2] https://github.com/grails/grails-core/search?utf8=%E2%9C%93&q=NON_INTERACTIVE_ARGUMENT

[3] https://github.com/grails/grails-core/blob/1.1.x/scripts/_GrailsArgParsing.groovy#L33

-Bruno
Comment 4 bruno.flavio 2016-08-09 18:54:47 UTC
Created attachment 161606 [details]
Proposed patch: places the --non-interactive parameter after the application name.
Comment 5 bruno.flavio 2016-09-10 22:41:34 UTC
Hi, I've applied the patch.

http://hg.netbeans.org/core-main/rev/18a913a3be69

Please verify that it works as intended on the next dev nightly build.
Comment 6 Quality Engineering 2016-09-12 02:00:46 UTC
Integrated into 'main-silver', will be available in build *201609120002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/18a913a3be69
User: Bruno Fl
Comment 7 Shaun_RSA 2016-09-27 11:26:50 UTC
Good Day

How do you install the patch on netbeans?
Comment 8 bruno.flavio 2016-09-27 12:03:51 UTC
(In reply to Shaun_RSA from comment #7)
> Good Day
> 
> How do you install the patch on netbeans?

Hello,

The patch has already been integrated into the main-silver repository. This means you can download the patched distribution from the development version at http://bits.netbeans.org/dev/nightly/latest/ (be sure to choose the 'All' package, which includes Groovy support.


This bug is still pending verification, so I kindly ask you that if you verify that this issue is resolved to change the status accordingly (Resolved, Verified).

Regards,
-Bruno Flávio.
Comment 9 Shaun_RSA 2016-09-27 13:15:33 UTC
(In reply to bruno.flavio from comment #8)
> (In reply to Shaun_RSA from comment #7)
> > Good Day
> > 
> > How do you install the patch on netbeans?
> 
> Hello,
> 
> The patch has already been integrated into the main-silver repository. This
> means you can download the patched distribution from the development version
> at http://bits.netbeans.org/dev/nightly/latest/ (be sure to choose the 'All'
> package, which includes Groovy support.
> 
> 
> This bug is still pending verification, so I kindly ask you that if you
> verify that this issue is resolved to change the status accordingly
> (Resolved, Verified).
> 
> Regards,
> -Bruno Flávio.

I have installed the "All" NetBeans IDE Bundles. I then did download grails-3.1.12 and then pointed the home grails folder to the downloaded file.

I'm still experiencing this issue, I was able to create a php project.
Comment 10 bruno.flavio 2016-09-28 23:43:27 UTC
Hello. I've just tried it and it seems to work fine?

Please give me some more details on the steps you took and which errors you see.


Here's what I did:

1. in Tools>Options>Miscellaneous set the grails home to the directory where grails was unziped.
2. File>New Project>Groovy>Grails Application, then give the project a name and click finish.

The following output shows in the console:

 Resolving dependencies..
 | Application created at /tmp/GrailsApplication14



-Bruno
Comment 11 charly_ry 2016-09-29 16:33:54 UTC
I have the same issue, i follow the same steps as Bruno does, but it doesn't work for me. I have last version of netbeans (downloaded yesterday).(In reply to bruno.flavio from comment #10)
> Hello. I've just tried it and it seems to work fine?
> 
> Please give me some more details on the steps you took and which errors you
> see.
> 
> 
> Here's what I did:
> 
> 1. in Tools>Options>Miscellaneous set the grails home to the directory where
> grails was unziped.
> 2. File>New Project>Groovy>Grails Application, then give the project a name
> and click finish.
> 
> The following output shows in the console:
> 
>  Resolving dependencies..
>  | Application created at /tmp/GrailsApplication14
> 
> 
> 
> -Bruno

I am having the same issue when creating a grails project, I follow ur same steps but it doesn't work. I have the lastest version of netbeans (downloaded yesterday).
Comment 12 charly_ry 2016-09-29 16:35:46 UTC
What does work for me is creating a grails project with the windows terminal and then opening the project from netbeans.
Comment 13 bruno.flavio 2016-09-29 17:28:40 UTC
(In reply to charly_ry from comment #12)
> What does work for me is creating a grails project with the windows terminal
> and then opening the project from netbeans.


Please, could you provide some additional information regarding the following 3 points:

1: To be clear, in Help > About can you give me the complete "Product Version"? i.e. "Product Version: NetBeans IDE Dev (Build 201607180002)". Let me know what shows in your NetBeans.

2: Which OS are you using? (I've tested on Linux, Java 8)

3: When you click to create the project I'm guessing that you get an error. After you click OK can you inspect the OUTPUT pane and give me it's contents? (see Comment 10 for an example of my output).


Thank you very much for your help, lets see if we can get this sorted out.
-Bruno.
Comment 14 charly_ry 2016-09-29 21:28:36 UTC
(In reply to bruno.flavio from comment #13)
> (In reply to charly_ry from comment #12)
> > What does work for me is creating a grails project with the windows terminal
> > and then opening the project from netbeans.
> 
> 
> Please, could you provide some additional information regarding the
> following 3 points:
> 
> 1: To be clear, in Help > About can you give me the complete "Product
> Version"? i.e. "Product Version: NetBeans IDE Dev (Build 201607180002)". Let
> me know what shows in your NetBeans.
> 
> 2: Which OS are you using? (I've tested on Linux, Java 8)
> 
> 3: When you click to create the project I'm guessing that you get an error.
> After you click OK can you inspect the OUTPUT pane and give me it's
> contents? (see Comment 10 for an example of my output).
> 
> 
> Thank you very much for your help, lets see if we can get this sorted out.
> -Bruno.

Product Version: NetBeans IDE 8.1 (Build 201510222201)
Java: 1.8.0_102; Java HotSpot(TM) 64-Bit Server VM 25.102-b14
System: Windows 10

After pressing the finish button while creating a grails project i get this error: Unexpected error occurred while creating the application. See output window for more details.

The output windows says: 
Error |
Specify an application name or use --inplace to create an application in the current directory
Comment 15 bruno.flavio 2016-09-29 22:17:38 UTC
(In reply to charly_ry from comment #14)
> Product Version: NetBeans IDE 8.1 (Build 201510222201)
> Java: 1.8.0_102; Java HotSpot(TM) 64-Bit Server VM 25.102-b14
> System: Windows 10

Thank you very much for the information. This patch was applied and is currently available on the development version of NetBeans, sorry if I didn't make that clear before.

You can get NetBeans latest development build from here:

http://bits.netbeans.org/download/trunk/nightly/latest/


Let me know if it works :-) Thank you for the patience.

-Bruno
Comment 16 juanramonrico 2016-10-06 07:58:00 UTC
This error is NOT FIXED in Netbeans 8.2 final version.

-------------------------------------------------------------------
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)


Plugin Groovy & Grails (default)

Version: 1.34.1 Source: NetBeans Distribution  
Plugin Description
This module provides all Groovy and Grails functionality available in NetBeans. It is wrapper for all single modules in this area

Netbeans 8.2 (final version)

Tested in versions of Grails: 3.1.11, 3.1.12 and 3.2.0
--------------------------------------------------------------------
Comment 17 Jiri Kovalsky 2016-10-06 08:02:45 UTC
As Bruno stated this bug is fixed in development builds not 8.2 FCS. Please verify in http://bits.netbeans.org/download/trunk/nightly/latest/ and let us know.

Thanks!
Comment 18 juanramonrico 2016-10-06 14:41:09 UTC
(In reply to Jiri Kovalsky from comment #17)
> As Bruno stated this bug is fixed in development builds not 8.2 FCS. Please
> verify in http://bits.netbeans.org/download/trunk/nightly/latest/ and let us
> know.
> 
> Thanks!

I try with latest dev version and it work ok. But when I load a Grails 3.x previous project a new error appear:
   Error occurred running Grails CLI: No profile found for name [web]

So, I don't understand why this bug isn't fixed in 8.2 FCS, due to this bug was fixed in dev version.

In fact, I impart a course every year about the implementation of web applications. Until now, I used Netbeans 8.1 with Grails 2.x and worked properly.

Which version of Netbeans will support Grails 3.x correctly?


Thanks in advanced.
Comment 19 Jiri Kovalsky 2016-10-06 15:30:11 UTC
(In reply to juanramonrico from comment #18)

> So, I don't understand why this bug isn't fixed in 8.2 FCS, due to this bug
> was fixed in dev version.

Because 8.2 codebase was branched earlier than the fix was pushed to trunk which was unfortunately too late for merging to release82 branch.
Comment 20 bruno.flavio 2016-10-06 21:47:17 UTC
(In reply to juanramonrico from comment #18)

Hello,

> I try with latest dev version and it work ok. But when I load a Grails 3.x
> previous project a new error appear:
>    Error occurred running Grails CLI: No profile found for name [web]

Thank you for testing this bug, Regarding the error you've got, I'm thinking it may not be about NetBeans - could you please check whether it works in the CLI [1]? Should it subside please open a new issue for this.

If you do confirm that this issue is solved please set the status to Resolved > Verified.

> Which version of Netbeans will support Grails 3.x correctly?

The aforementioned development build is where most support for Grails 3.x is available. By using it you could also help us by testing the newest features before they get into NetBeans 8.2.1 or 9.0 [2].

1: http://stackoverflow.com/a/33601413
2: https://netbeans.org/community/releases/roadmap.html

Best regards,
-Bruno
Comment 21 juanramonrico 2016-10-07 08:24:00 UTC
(In reply to bruno.flavio from comment #20)
> (In reply to juanramonrico from comment #18)
> 
> Hello,
> 
> > I try with latest dev version and it work ok. But when I load a Grails 3.x
> > previous project a new error appear:
> >    Error occurred running Grails CLI: No profile found for name [web]
> 
> Thank you for testing this bug, Regarding the error you've got, I'm thinking
> it may not be about NetBeans - could you please check whether it works in
> the CLI [1]? Should it subside please open a new issue for this.

I send a new issue. I try in a shell command line and runs ok.
The toy example used is https://github.com/grails-samples/grails-petclinic (changing the gradle version by Grails used default).
> 
> If you do confirm that this issue is solved please set the status to
> Resolved > Verified.
> 
> > Which version of Netbeans will support Grails 3.x correctly?
> 
> The aforementioned development build is where most support for Grails 3.x is
> available. By using it you could also help us by testing the newest features
> before they get into NetBeans 8.2.1 or 9.0 [2].
> 
> 1: http://stackoverflow.com/a/33601413
> 2: https://netbeans.org/community/releases/roadmap.html
> 

Ok. So, I will test every week dev Netbeans version with petclinic project (Grails 3.x) and others options. For example, in the past july, a dev Netbeans version woks properly with petclinic, but in September errors appear when try run the same project. 

> Best regards,
> -Bruno

Thanks, again.
Comment 22 bruno.flavio 2016-10-08 22:21:06 UTC
(In reply to juanramonrico from comment #21)

Very well, I'll look into the newly created issue.
Thank you for verifying that this one is fixed.

-Bruno
Comment 23 bruno.flavio 2016-10-08 22:23:28 UTC
For future reference, the issue mentioned in comment 21 is #268399.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo