akhikhl / gretty

Advanced gradle plugin for running web-apps on jetty and tomcat.
MIT License
657 stars 173 forks source link

Jetty Startup Hangs #264

Open vcatalano opened 8 years ago

vcatalano commented 8 years ago

I'm attempting to switch my project over to Gretty from the default Gradle Jetty plugin, however, when I run the project with the jettyRun command, the command will hang on after the following output for about 3-5 minutes:

12:59:11 PM: Executing external task 'jettyRun'...
:server:prepareInplaceWebAppFolder UP-TO-DATE
:server:createInplaceWebAppFolder UP-TO-DATE
:TrackProcess:compileJava UP-TO-DATE
:TrackProcess:processResources UP-TO-DATE
:TrackProcess:classes UP-TO-DATE
:TrackProcess:jar UP-TO-DATE
:server:compileJava UP-TO-DATE
:server:processResources UP-TO-DATE
:server:classes UP-TO-DATE
:server:prepareInplaceWebAppClasses UP-TO-DATE
:server:prepareInplaceWebApp UP-TO-DATE
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider org.codehaus.groovy.jsr223.GroovyScriptEngineFactory not found

After this time, the script will output the following remaining logs. The script never actually serves my project, it simply completes and exits.

:server:jettyRun
2016-06-08 13:02:29,863 main ERROR Unable to access file://log4j2.xml
2016-06-08 13:02:29,981 main ERROR Unable to access file://log4j2.xml
ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider org.codehaus.groovy.jsr223.GroovyScriptEngineFactory not found
13:02:36 INFO  Jetty 9.2.10.v20150310 started and listening on port 8080
13:02:36 INFO  neuro runs at:
13:02:36 INFO    http://localhost:8080/server
Press any key to stop the server.

BUILD SUCCESSFUL

Total time: 3 mins 25.129 secs
1:02:37 PM: External task execution finished 'jettyRun'.

It appears that this might be due to the GroovyScriptEngineFactory not being found. However, I'm currently using Gradle 2.13.

saladinkzn commented 8 years ago

Hello.

Can you please provide a simple example of your buildscript/files?

vcatalano commented 8 years ago

The following is my build.gradle file. It's the only build file for my project:

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin: 'org.akhikhl.gretty'

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'org.akhikhl.gretty:gretty:+'
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile 'org.apache.logging.log4j:log4j-web:2.5'
    compile 'org.glassfish.jersey.containers:jersey-container-servlet-core:2.22.2'
    compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.22.2'
    compile 'org.glassfish.jersey.core:jersey-common:2.22.2'
    compile 'org.glassfish.jersey.core:jersey-client:2.22.2'
    compile 'org.glassfish.jersey.core:jersey-server:2.22.2'
    compile 'org.glassfish.jersey.ext:jersey-mvc:2.22.2'
    compile 'org.glassfish.jersey.ext:jersey-mvc-mustache:2.22.2'
    compile 'org.glassfish.jersey.media:jersey-media-json-jackson:2.22.2'
    compile 'org.glassfish.jersey.media:jersey-media-moxy:2.22.2'
    compile 'org.glassfish.jersey.media:jersey-media-multipart:2.22.2'
    compile 'com.google.guava:guava:17.0'

    testCompile 'junit:junit:4.12'
}