After upgrading to 12.1.4 "Groovyc: Internal groovyc error: code 1"

Hi,

After upgrading to 12.1.4 a simple ee7/maven/glassfish (no groovy) project doesn't compile anymore giving following error:

Information:Groovyc: Cannot compile Groovy files: no Groovy library is defined for module 'back'
Information:Compilation completed with 1 error and 0 warnings in 4 sec
Information:1 error
Information:0 warnings
Error:Groovyc: Internal groovyc error: code 1

Other projects are still fine. Restart/reimport didn't help. Any ideas?

Best regards, Eugene.

14 comments

fixed by removing <entry name="!?*.groovy" /> from project/.idea/compiler.xml. X-(

0

No, not fixed. The groovy message gone, but now I can't run anything. X-(

0

By doing this you told the compiler that any *.groovy file is a resource file. So the complier does not compile but just copies them to the output dir.

0

I don't care about groovy,  there are no groovy scripts in my project. So far I managed to run glassfish locally, but still can't run testcases - it says

Class not found: "...Test"
Class not found: "ee.test.PeoplesResourceTest"

0

Are you sure? You can simply check it by ctrl+shift+N (cmd+shift+O) and *.groovy pattern

0

Could you provide your pom.xml?

BTW you can just disable jetgroovy plugin to work around the problem.

0
here it is:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>jaxrs1</groupId>
    <artifactId>jaxrs1</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>

    <modules>
        <module>back</module>
    </modules>


    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-servlet-core</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.woodstock.dependlibs</groupId>
            <artifactId>json</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>
</project>







back:




<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>jaxrs1</artifactId>
        <groupId>jaxrs1</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <packaging>war</packaging>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>back</artifactId>


</project>
0

Just a suggestion. Please check that PeopleResourceTest is a java file rather than groovy

0

I'd be very surprized if it were groovy as I never ever used or even lerned this language before :)

The file is /home/bu/dvl/ee7/jaxrs1/back/src/main/java/ee/test/PeoplesResource.java, its content so far is just

package ee.test;

import org.junit.Test;

/**
* Created with IntelliJ IDEA.
* User: bushuyev
* Date: 6/11/13
* Time: 10:01 PM
*/
public class PeoplesResourceTest {
    @Test
    public void testGetHello() throws Exception {

    }
}

I thought it's some internal intellij deploy or something script which may be in groovy. But anyway, it was just a small try and drop project which I'm not going to use anymore. Thank you for your support!

Best regards, Eugene.

0

If it is possible to restore the project could provide it? I'm quite interested by this weird behaviour.

0

Here is it. Although it may be related to the glassfish setup, not to the project itself. It's just a feeling :), but glassfish is the only feature wich makes it different from other projects I have.

Best regards, Eugene.



Attachment(s):
jaxrs1.zip
0

I'm on IDEA 13.0.1. I've been having this problem there as well. Turns out it was because I had Groovy 2.1.1. I've rolled back to 1.8.9 and have eliminated the error. It's not very clear what version of Groovy IntelliJ supports, but it would be really nice to be able to use the newer 2.x versions of Groovy. The features in 2.1 and 2.2 over 2.0 and earlier are pretty awesome.

0

Please sign in to leave a comment.