apache / apache/grails-intellij-plugin
Gradle-Grails commands fail when creating controllers and views using grails navigation buttons (which are in editor's top)
- Dominant language
- Java
- Stars
- 17
- Forks
- 4
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
**Build 138.1269**
Get a gradle-grails project (sample project is attached).
Create a domain class **foo.bar.Baz** using** File -> New -> Grails Domain Class** action on **grails-app/domain** package.
Domain class is created. Open it.
In editor top press **BazController -> Generate controller**.
_⚠️ attachment `11.png` was not included in the export_
Creation of the controller fails with the errors below.
Now try to create **foo.bar.BazController** using **File -> New -> Grails Controller** action on **grails-app/controllers** package - the controller is created.
The same for views.
Tests and domain classes are created normally.
```
8:43:21 PM: Executing external task 'grails-generate-controller'...
:grails-generate-controller
|Loading Grails 2.3.5
|Configuring classpath
|Running pre-compiled script
Error |
Fatal error forking Grails JVM: null
Error |
java.lang.reflect.InvocationTargetException
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Error |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Error |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Error |
at java.lang.reflect.Method.invoke(Method.java:601)
Error |
at org.grails.launcher.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:57)
Error |
at org.grails.launcher.context.DelegatingGrailsLaunchContext.launch(DelegatingGrailsLaunchContext.java:409)
Error |
at org.grails.launcher.ReflectiveGrailsLauncher.launch(ReflectiveGrailsLauncher.java:32)
Error |
at org.grails.launcher.InProcessGrailsLauncher.launch(InProcessGrailsLauncher.java:27)
Error |
at org.grails.launcher.Main.run(Main.java:62)
Error |
at org.grails.launcher.Main.main(Main.java:38)
Error |
Caused by: org.codehaus.groovy.grails.cli.ScriptNotFoundException
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.loadScriptClass(GrailsScriptRunner.java:708)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.attemptPrecompiledScriptExecute(GrailsScriptRunner.java:520)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeScriptWithCaching(GrailsScriptRunner.java:473)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.callPluginOrGrailsScript(GrailsScriptRunner.java:414)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeCommand(GrailsScriptRunner.java:378)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeCommand(GrailsScriptRunner.java:345)
Error |
at org.codehaus.groovy.grails.cli.GrailsScriptRunner.executeCommand(GrailsScriptRunner.java:323)
Error |
... 10 more
:grails-generate-controller FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':grails-generate-controller'.
> No signature of method: org.gradle.util.LinePerThreadBufferingOutputStream.writeTo() is applicable for argument types: (org.gradle.util.LinePerThreadBufferingOutputStream) values: [org.gradle.util.LinePerThreadBufferingOutputStream@2ab08afc]
Possible solutions: write([B), write(int), write([B), write(int), write(int), write([B)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 7.297 secs
No signature of method: org.gradle.util.LinePerThreadBufferingOutputStream.writeTo() is applicable for argument types: (org.gradle.util.LinePerThreadBufferingOutputStream) values: [org.gradle.util.LinePerThreadBufferingOutputStream@2ab08afc]
Possible solutions: write([B), write(int), write([B), write(int), write(int), write([B)
8:43:28 PM: External task execution finished 'grails-generate-controller'.
```
---
*1 attachment(s) referenced here (`11.png`) are not part of the CSV export.*
*Imported from [IDEA-127691](https://youtrack.jetbrains.com/issue/IDEA-127691) · Type: Bug · Votes: 0*
*Comments, attachments, dates and reporter are not part of the export — follow the link above for the full history.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the `grails-generate-controller` external task from the editor’s `BazController -> Generate controller` navigation button, then compare it with the working File -> New -> Grails Controller action. Done means controllers and views can be created through the editor’s top navigation buttons without the reported Grails or Gradle errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100