This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 144515 - [65cat] Cannot create grails project
Summary: [65cat] Cannot create grails project
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-20 04:02 UTC by ardavis26
Modified: 2008-10-30 14:24 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ardavis26 2008-08-20 04:02:58 UTC
[ BUILD # : 6.5 beta 1 ]
[ JDK VERSION : 1.6.0_07 ]

trying  to create a grails project.  The output window shows nothing
and the system log shows this

WARNING [org.netbeans.modules.extexecution.api.ExecutionService]
java.io.IOException: java.io.IOException:
/opt/grails-1.0.3/bin/grails: cannot execute
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
	at
org.openide.execution.NbProcessDescriptor.exec(NbProcessDescriptor.jav
a:199)
	at
org.netbeans.modules.groovy.grails.api.GrailsRuntime$GrailsCallable.ca
ll(GrailsRuntime.java:435)
	at
org.netbeans.modules.groovy.grails.api.GrailsRuntime$GrailsCallable.ca
ll(GrailsRuntime.java:371)
	at
org.netbeans.modules.groovy.grails.api.ExecutionSupport$1.call(Executi
onSupport.java:101)
	at
org.netbeans.modules.groovy.grails.api.ExecutionSupport$1.call(Executi
onSupport.java:89)
[catch] at
org.netbeans.modules.extexecution.api.ExecutionService$3.call(Executio
nService.java:250)
	at
org.netbeans.modules.extexecution.api.ExecutionService$3.call(Executio
nService.java:227)
	at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
tor.java:650)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:675)
	at java.lang.Thread.run(Thread.java:595)
SEVERE [global]
java.io.IOException: java.io.IOException:
/opt/grails-1.0.3/bin/grails: cannot execute
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
	at java.lang.ProcessImpl.start(ProcessImpl.java:65)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
	at
org.openide.execution.NbProcessDescriptor.exec(NbProcessDescriptor.jav
a:199)
	at
org.netbeans.modules.groovy.grails.api.GrailsRuntime$GrailsCallable.ca
ll(GrailsRuntime.java:435)
	at
org.netbeans.modules.groovy.grails.api.GrailsRuntime$GrailsCallable.ca
ll(GrailsRuntime.java:371)
	at
org.netbeans.modules.groovy.grails.api.ExecutionSupport$1.call(Executi
onSupport.java:101)
	at
org.netbeans.modules.groovy.grails.api.ExecutionSupport$1.call(Executi
onSupport.java:89)
	at
org.netbeans.modules.extexecution.api.ExecutionService$3.call(Executio
nService.java:250)
	at
org.netbeans.modules.extexecution.api.ExecutionService$3.call(Executio
nService.java:227)
	at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
tor.java:650)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:675)
[catch] at java.lang.Thread.run(Thread.java:595)
WARNING
[org.netbeans.modules.groovy.grailsproject.ui.wizards.NewGrailsProject
WizardIterator]: Folder was expected, but not found:
/home/alley/NetBeansProjects/GrailsApplication1

I have set the GRAILS_HOME variable to point /opt/grails-1.0.3
I have added the bin directory to the PATH variable
It is not an issue with permissions becuase i can run the task from
the command line. 
Also i get no kind of error message to the ide that project create
failed just a blank output window
Comment 1 martin_adamek 2008-08-20 07:17:41 UTC

*** This issue has been marked as a duplicate of 137725 ***
Comment 2 ardavis26 2008-08-20 13:11:44 UTC
It is not a permissions issue. I know I have permissions to the file because I can run it from command line.  
Comment 3 martin_adamek 2008-08-20 13:16:11 UTC
Ups, sorry, I didn't see your previous comment. Petre, can you please have a look?
Comment 4 Petr Hejl 2008-08-20 14:00:36 UTC
The exactly same stack trace happens when the grails script does not have execute permission. Are you sure that "which
grails" prints "/opt/grails-1.0.3/bin/grails"? Otherwise the fact that you can execute command from CL is no evidence of
correct permissions.

Please post output of "ls -l /opt/grails-1.0.3".

If you changed the grails configuration meanwhile replace all occurrences of "/opt/grails-1.0.3" in my comment with the
value configured in Options->Misc->Grails
Comment 5 ardavis26 2008-08-21 01:38:36 UTC
Here is the listing of my grails directory My user is a part of the java group

total 68
drwxrwxr-x 5 root java  4096 2008-06-06 10:24 ant
drwxrwxr-x 2 root java  4096 2008-06-06 10:24 bin
-rw-rwxr-- 1 root java  1033 2008-06-06 10:24 build.properties
-rw-rwxr-- 1 root java  1666 2008-06-06 10:24 build.xml
drwxrwxr-x 2 root java  4096 2008-06-06 10:24 conf
drwxrwxr-x 2 root java  4096 2008-06-06 10:24 dist
drwxrwxr-x 3 root java  4096 2008-06-06 10:24 doc
-rw-rwxr-- 1 root java   117 2008-06-06 10:24 INSTALL
drwxrwxr-x 3 root java  4096 2008-06-06 10:24 lib
-rw-rwxr-- 1 root java 11564 2008-06-06 10:24 LICENSE
drwxrwxr-x 3 root java  4096 2008-06-06 10:24 media
-rw-rwxr-- 1 root java  2453 2008-06-06 10:24 README
drwxrwxr-x 2 root java  4096 2008-06-06 10:24 samples
drwxrwxr-x 2 root java  4096 2008-06-06 10:24 scripts
drwxrwxr-x 4 root java  4096 2008-06-06 10:24 src
Comment 6 Petr Hejl 2008-08-21 07:37:44 UTC
Can you provide "ls -l /opt/grails-1.0.3/bin" too? Thanks.
Comment 7 ardavis26 2008-08-21 22:47:27 UTC
Listing of bin directory
total 36
-rw-rwxr-- 1 root java  216 2008-06-06 10:24 cygrails
-rw-rwxr-- 1 root java  127 2008-06-06 10:24 grails
-rw-rwxr-- 1 root java  431 2008-06-06 10:24 grails.bat
-rw-rwxr-- 1 root java  273 2008-06-06 10:24 grails-debug
-rw-rwxr-- 1 root java  563 2008-06-06 10:24 grails-debug.bat
-rw-rwxr-- 1 root java 7038 2008-06-06 10:24 startGrails
-rw-rwxr-- 1 root java 4664 2008-06-06 10:24 startGrails.bat
Comment 8 Petr Hejl 2008-08-22 14:33:12 UTC
I can't reproduce the issue.

I've tested following:
grails installation with owner same as nb user and executable for owner - works
grails installation with owner root and group configured to nb user's primary group and executable for group only - works
grails installation with owner root and group configured to nb user's secondary group and executable for group only - works

I've tested Sun JDK 1.5.0_15 and JDK 1.6.0_06.

The only way I was able to reproduce the stack trace so far was to make grails not executable.

Is it possible to create app when you configure your primary group for the grails installation? There was a JDK bug (at
least on solaris) similar to behaviour you observed:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4052517
Comment 9 ardavis26 2008-08-27 02:01:31 UTC
It looks like a problem with permissions on Opensuse 10.2 and JDK 1.6.  I was able to get it to work when i changed the
owner to my user name and updated all the permissions.  now it works
Comment 10 Petr Hejl 2008-08-27 10:53:31 UTC
Can you provide "java -version". Seems to be mentioned JDK issue.
Comment 11 ardavis26 2008-08-28 16:02:50 UTC
Java version is 1.5.0_10
Comment 12 Petr Hejl 2008-08-28 16:07:53 UTC
Is it the same version used by NetBeans (please invoke it for the java used by Netbeans if not)?

Please attach the whole output of the "java -version" to figure out build, vendor, etc.

Thanks.
Comment 13 Lukas Jungmann 2008-09-29 14:29:27 UTC
v.