Closed cihanzengin closed 7 years ago
What version of Grails?
| Grails Version: 3.2.4 | Groovy Version: 2.4.7 | JVM Version: 1.8.0_112
How are you running the application? Does it work if you run ./grails run-app
from the command line?
No i created application in Intellij Idea and run from Intellij idea with run button, i have tried from terminal in intellij too with ./grails run-app but result is same
Does it work if you add or the following to build.gradle
under the dependencies
section?:
runtime "org.javassist:javassist:3.17.1-GA"
Like that? it's my build.gradle file
buildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.11.6"
classpath "org.grails.plugins:hibernate5:6.0.4"
}
}
version "0.1"
group "untitled3"
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"org.grails.grails-gsp"
apply plugin:"asset-pipeline"
runtime "org.javassist:javassist:3.17.1-GA"
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:hibernate5"
compile "org.hibernate:hibernate-core:5.1.2.Final"
compile "org.hibernate:hibernate-ehcache:5.1.2.Final"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.11.6"
runtime "com.h2database:h2"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
}
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
}
assets {
minifyJs = true
minifyCss = true
}
No within the dependencies
block:
dependencies {
runtime "org.javassist:javassist:3.17.1-GA"
...
}
Yes i tried that but get this error
/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin/java -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:CICompilerCount=3 -Dfile.encoding=UTF-8 -classpath "/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.grails/grails-shell/3.2.4/69634595f7a8a34962a63bc345bbc107eaedc971/grails-shell-3.2.4.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-simple/1.7.21/be4b3c560a37e69b6c58278116740db28832232c/slf4j-simple-1.7.21.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.plexus/plexus-component-api/1.0-alpha-33/7d9560effcadf867937ac6885d0d1045ea98ab59/plexus-component-api-1.0-alpha-33.jar:/Users/macintosh_laptop/.m2/repository/org/codehaus/groovy/groovy/2.4.7/groovy-2.4.7.jar:/Users/macintosh_laptop/.m2/repository/org/slf4j/slf4j-api/1.7.21/slf4j-api-1.7.21.jar:/Users/macintosh_laptop/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.21/jcl-over-slf4j-1.7.21.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.grails/grails-bootstrap/3.2.4/eb4bf0d01ea98674deec36d43524106cd43e6dfc/grails-bootstrap-3.2.4.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.grails/grails-gradle-model/3.2.4/293bb63a6a55b81a31384ad545b0fc5d02a78814/grails-gradle-model-3.2.4.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant/1.9.7/3b2a10512ee6537d3852c9b693a0284dcab5de68/ant-1.9.7.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-ant/2.4.7/c56eb616e1485df8df5493a09bf30cdf8c7c36b0/groovy-ant-2.4.7.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-json/2.4.7/c62bc909e3bb996cbc9509435a522f6fb8cf1461/groovy-json-2.4.7.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-jmx/2.4.7/c3dcb5c6a35f3df8d0c10558c4afcf7ea6ae09f3/groovy-jmx-2.4.7.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.fusesource.jansi/jansi/1.14/38ce7f9fb0171cd20f9acfd13858751d0fb0d3e2/jansi-1.14.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/jline/jline/2.12/ce9062c6a125e0f9ad766032573c041ae8ecc986/jline-2.12.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.gradle/gradle-tooling-api/3.0/478c6d62d601738702110da8f10aa3b7b5fc9711/gradle-tooling-api-3.0.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-cli/1.4.2.RELEASE/3c96280eb11d4ecd4d41b6961a51f2038ce15735/spring-boot-cli-1.4.2.RELEASE.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.plexus/plexus-classworlds/1.2-alpha-10/fc41205635dab152bf794785be80a0a70fda686e/plexus-classworlds-1.2-alpha-10.jar:/Users/macintosh_laptop/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-xml/2.4.7/864b9dc44fb0e05f329fad473e8b4df172f1b48f/groovy-xml-2.4.7.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-templates/2.4.7/3153f11ab70d65526109d9bcbe4f7b11f60b6fb6/groovy-templates-2.4.7.jar:/Users/macintosh_laptop/.m2/repository/org/yaml/snakeyaml/1.17/snakeyaml-1.17.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-launcher/1.9.7/224857a490283e72da13ffe3082dea62c558ec76/ant-launcher-1.9.7.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-antlr/1.9.4/4cf30025981dc2344324a0ef0e40063c3ef08f0a/ant-antlr-1.9.4.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-groovydoc/2.4.7/6327c63b9f0820849dd73749c14c56a7449a97d9/groovy-groovydoc-2.4.7.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.ant/ant-junit/1.9.4/b063757dacaa716b643c2f9270e469183636ff11/ant-junit-1.9.4.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-loader-tools/1.4.2.RELEASE/196fd2cc6079cdffbebaa813bfb8816beb602da3/spring-boot-loader-tools-1.4.2.RELEASE.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/4.6/306816fb57cf94f108a43c95731b08934dcae15c/jopt-simple-4.6.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.3.4.RELEASE/da373e491d3863477568896089ee9457bc316783/spring-core-4.3.4.RELEASE.jar:/Users/macintosh_laptop/.m2/repository/org/json/json/20140107/json-20140107.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-aether-provider/3.2.1/ab57cafec4e9c2650df963d83cb173d311fcadf0/maven-aether-provider-3.2.1.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-settings-builder/3.1.1/e2d5e96ea4bbd4fc463dbb76d07dd8aefac05e3c/maven-settings-builder-3.1.1.jar:/Users/macintosh_laptop/.m2/repository/org/eclipse/aether/aether-api/1.0.2.v20150114/aether-api-1.0.2.v20150114.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.eclipse.aether/aether-connector-basic/1.0.2.v20150114/d55c03b16efc16f25e1fd9fe0f37878fddbeed68/aether-connector-basic-1.0.2.v20150114.jar:/Users/macintosh_laptop/.m2/repository/org/eclipse/aether/aether-impl/1.0.2.v20150114/aether-impl-1.0.2.v20150114.jar:/Users/macintosh_laptop/.m2/repository/org/eclipse/aether/aether-spi/1.0.2.v20150114/aether-spi-1.0.2.v20150114.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.eclipse.aether/aether-transport-file/1.0.2.v20150114/79ffcce2aa9c525ad5a1d0fc3f9669133c3f9572/aether-transport-file-1.0.2.v20150114.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.eclipse.aether/aether-transport-http/1.0.2.v20150114/262b7fb2e9872f470c059bc4053a3f2f7449932d/aether-transport-http-1.0.2.v20150114.jar:/Users/macintosh_laptop/.m2/repository/org/eclipse/aether/aether-util/1.0.2.v20150114/aether-util-1.0.2.v20150114.jar:/Users/macintosh_laptop/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/macintosh_laptop/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-model/3.2.1/328a3c5cfaf9b2832e6e1d21c76fcefe01e01fde/maven-model-3.2.1.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-model-builder/3.2.1/48611e08f8d8e967e6df591c8eb9c9eba329b1fc/maven-model-builder-3.2.1.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-repository-metadata/3.2.1/e171898b9fa61449e1ca3eea45c071fd82c48789/maven-repository-metadata-3.2.1.jar:/Users/macintosh_laptop/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar:/Users/macintosh_laptop/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.17/plexus-utils-3.0.17.jar:/Users/macintosh_laptop/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.19/plexus-interpolation-1.19.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-settings/3.1.1/311d38cf15ec7f5c713985862632db91b7a827af/maven-settings-3.1.1.jar:/Users/macintosh_laptop/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.2/733db77aa8d9b2d68015189df76ab06304406e50/httpclient-4.5.2.jar:/Users/macintosh_laptop/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.5/e7501a1b34325abb00d17dde96150604a0658b54/httpcore-4.4.5.jar:/Users/macintosh_laptop/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.10/4b95f4897fa13f2cd904aee711aeafc0c5295cd8/commons-codec-1.10.jar:/Applications/IntelliJ IDEA 2.app/Contents/plugins/Grails/lib/grails-rt.jar" org.grails.cli.GrailsCli run-app
| Resolving Dependencies. Please wait...
CONFIGURE FAILED
FAILURE: Build failed with an exception.
Total time: 10.018 secs
* Where:
Build file '/Users/macintosh_laptop/IdeaProjects/untitled3/build.gradle' line: 7
* What went wrong:
A problem occurred evaluating root project 'untitled3'.
> Could not find method runtime() for arguments [org.javassist:javassist:3.17.1-GA] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Error initializing classpath: Could not find method runtime() for arguments [org.javassist:javassist:3.17.1-GA] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. (Use --stacktrace to see the full trace)
Process finished with exit code 1
@cihanzengin Can you provide exact steps to reproduce this problem?
At intellij idea create new project > grails and after creating project i just push to run button and here is result
I can't reproduce
Reproduce what? :)
Problem is clear empty grails project can't boot:run
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':bootRun'.
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. | Error Failed to start server (Use --stacktrace to see the full trace)
Process finished with exit code 1
Try and remove your Maven and Gradle caches
$ rm -rf ~/.m2/repository
$ rm -rf ~/.gradle/caches
O yeah it's working thank u so much!! :)
For me deleting does not help, it just leads to the next error.
grails run-app
| Error Error occurred running Grails CLI: No profile found for name [web]. (Use --stacktrace to see the full trace)
I fixed it like this:
In addition to remove Maven and Gradle caches ,
$ rm -rf ~/.m2/repository $ rm -rf ~/.gradle/caches
I did add ojdbc6.jar in the path ( ../.m2/repository/oracle/ojdbc6/11.2.0.1.0/ojdbc6-11.2.0.1.0.jar) as guided by the grails CLI .
This worked !
P.S : grails app with Oracle 11g here
Hello, i just started to learn grails :)
I have created new grails project with Idea IDE when i try to run my app , i get this error ;
I don't know what to do. I use jdk1.8 but this is too same