gradle jettyRun fails

i can successfully run gradle:jettyRun from the console.

but when i start or debug it from idea eap 13 (130.1105), i get the following error:

Failed startup of context org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext@2be4d632{/mws,/home/andreas/MRD/MPS-mvn/mws/src/main/webapp}
javax.naming.NoInitialContextException: Cannot instantiate class: com.intellij.execution.rmi.RemoteServer$Jndi [Root exception is java.lang.ClassNotFoundException: com.intellij.execution.rmi.RemoteServer$Jndi]

full stacktrace at

any idea what this is caused by?

Comment actions Permalink

Hi Andreas,

Could you provide a sample project?


Comment actions Permalink

it is not trivially possible to downsize the project to something i could share. i have found a workaround to launch gradle via

export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n"

gradle jettyRun

then i connect intellij via remote debug

the module itself is a straigtforward war project, though it is depending on a list of other projects.

apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'jetty'

dependencies {
    compile fileTree(dir: 'lib', includes: ['*.jar'])
    compile project(':public:bitlib')
    compile project(':public:mbwapi')
    compile project(':api')
    compile project(':pdf')
    compile project(':mds')
    compile 'com.h2database:h2:1.3.170'
    compile 'javax.mail:mail:1.4.7'
    compile 'org.slf4j:slf4j-log4j12:'+slf4jVersion
    testCompile 'junit:junit:'+junitVersion

Please sign in to leave a comment.