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 142695 - [65cat] Cannot enable Groovy on Java project
Summary: [65cat] Cannot enable Groovy on Java project
Status: RESOLVED DUPLICATE of bug 142230
Alias: None
Product: groovy
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: martin_adamek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-02 22:17 UTC by dynamite
Modified: 2008-10-30 14:24 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 85666


Attachments
stacktrace (6.59 KB, text/plain)
2008-08-02 22:18 UTC, dynamite
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dynamite 2008-08-02 22:17:59 UTC
Build: NetBeans IDE Dev (Build 200808010201)
VM: Java HotSpot(TM) 64-Bit Server VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Linux, 2.6.24-20-generic, amd64

User Comments: 
I created a new project using Java->Java Application.  I then went straight to the project properties and checked the "Enable Groovy" option and clicked "OK".

Stacktrace: 
java.io.IOException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'extension'. One of '{"http://www.netbeans.org/ns/ant-build-extender/1":extension}' is expected.
        at org.netbeans.spi.project.support.ant.AntProjectHelper.saveXml(AntProjectHelper.java:321)
        at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:589)
        at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:99)
        at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:137)
        at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactorySingleton.java:221)
        at org.netbeans.api.project.ProjectManager$7.run(ProjectManager.java:611)
Comment 1 dynamite 2008-08-02 22:18:08 UTC
Created attachment 66401 [details]
stacktrace
Comment 2 dynamite 2008-08-02 22:20:58 UTC
Could this have something to do with the upgrade of ant to 1.7.1?
Comment 3 dynamite 2008-08-02 22:29:05 UTC
A probably related problem, so I'll state it here:

If I create a Groovy file on a Java project and then create a Groovy file I find that "fix imports" doesn't work for
that file.  If I try to compile that project I get the following error in the output window:

Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac
Created dir: /home/dshe/NetBeansProjects/spbuild/build/classes
/home/dshe/NetBeansProjects/spbuild/nbproject/build-impl.xml:339: The following error occurred while executing this line:
/home/dshe/NetBeansProjects/spbuild/nbproject/groovy-build.xml:16: groovyc doesn't support the nested "javac" element.
BUILD FAILED (total time: 0 seconds)
Comment 4 Milos Kleint 2008-08-04 09:30:57 UTC
duplicate of #142230

*** This issue has been marked as a duplicate of 142230 ***