I have started learning Grails. For project specific purpose, I have installed Grails 3.0.0 in Ubuntu. Whenever I started a grails project in IDE(IntelliJ). I got the following error
| Error Failed to compile idea-list-injected-traits.groovy: startup failed:
idea-list-injected-traits.groovy: 2: unable to resolve class org.grails.compiler.injection.TraitInjectionSupport
# line 2, column 1.
import org.grails.compiler.injection.TraitInjectionSupport
^
1 error
(Use --stack trace to see the full trace)
| Error occurred running Grails CLI: null (Use --stack trace to see the full trace)
Process finished with exit code 1
How can I solve it? I am totally new in Grails. Thanks.
Try deleting
~/.grails/repository
Related
I forked this apache solr and when I try to build as indicated in the README, I get the following errors:
When trying to install on java version 11
[root#192 solr]# ./gradlew assemble
Exception in thread "main" java.lang.IllegalArgumentException: error: release version 11 not supported
at jdk.compiler/com.sun.tools.javac.main.Arguments.reportDiag(Arguments.java:891)
at jdk.compiler/com.sun.tools.javac.main.Arguments.handleReleaseOptions(Arguments.java:311)
at jdk.compiler/com.sun.tools.javac.main.Arguments.processArgs(Arguments.java:350)
at jdk.compiler/com.sun.tools.javac.main.Arguments.init(Arguments.java:246)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:185)
at jdk.compiler/com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:119)
at jdk.compiler/com.sun.tools.javac.launcher.Main.compile(Main.java:364)
at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:176)
at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:119)
\nSomething went wrong. Make sure you're using Java 11 or later.
Then I decided to change the version to 1.8.0, having received the following:
[root#192 solr]# ./gradlew assemble
Unrecognized option: --source
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
\nSomething went wrong. Make sure you're using Java 11 or later.
Has anyone encountered the same problem, and if you managed to solve it, then how?
I am trying to do a project using Grails and I'm really new to this subject.
I also searched and there's another similar question without a proper answer.
Anyway, I installed Grails both 3.2.9 and 3.3.0 M1 versions:
C:\Users\acer>grails -version
| Grails Version: 3.2.9
| Groovy Version: 2.4.10
| JVM Version: 1.8.0_102
And I'm getting the same Error when I'm trying to create an application.
Resolving dependencies..
Error |
Error occurred running Grails CLI: Forbidden (403) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.apache.http.client.HttpResponseException: Forbidden (403)
at org.eclipse.aether.transport.http.HttpTransporter.handleStatus(HttpTransporter.java:466)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:291)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:243)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:320)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:535)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:519)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:341)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:317)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:299)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:291)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:53)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:49)
at org.grails.cli.profile.repository.MavenProfileRepository.<init>(MavenProfileRepository.groovy:53)
at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groovy:334)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:235)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
Error |
Error occurred running Grails CLI: Forbidden (403)
It's really important for my project
I apreciate any help or suggestion in advance
This looks like it's happening during dependency resolution. Those dependencies would likely be first coming from https://repo.grails.org/grails/core/, as found in build.gradle, if you could get an app created. It looks like you're maybe having trouble accessing that repository. Confirm you can access that URL from your machine and try again.
You system is actually identify Grails Version: 3.2.9
It happens for project build issue. You need to rebuild your project by running this command
grails clean
I was able to run my application previously but since today when i tried some experiments it gives me jar hell error out of sudden. Which I have no idea what this exception about, and now my project couldn't work anymore. This is the error causes:
44 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/annotations-api.jar
55 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina-ant.jar
57 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina-ha.jar
59 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina-tribes.jar
62 [main] DEBUG org.elasticsearch.bootstrap - examining jar: /usr/local/apache-tomcat-7.0.62/lib/catalina.jar
Exception in thread "main" java.lang.IllegalStateException: failed to load bundle [] due to jar hell
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:338)
at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:109)
at org.elasticsearch.node.Node.<init>(Node.java:146)
at org.elasticsearch.node.Node.<init>(Node.java:128)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:145)
at com.elastic.Main.main(Main.java:38)
Caused by: java.lang.IllegalStateException: jar hell!
class: org.apache.catalina.util.Base64
jar1: /usr/local/apache-tomcat-7.0.62/lib/catalina-ant.jar
jar2: /usr/local/apache-tomcat-7.0.62/lib/catalina.jar
at org.elasticsearch.bootstrap.JarHell.checkClass(JarHell.java:280)
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:186)
at org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:336)
... 5 more
Why is the jar hell occurring? I never seen this before in my developer life and my application was workable before today. Am I missing something important to implement elasticsearch? Here is my code snippet.
Settings.Builder settings = Settings.settingsBuilder();
settings.put("path.home", Paths.get("").toAbsolutePath().toString() + File.separator + "resource" + File.separator + "elasticsearch-2.1.2");
settings.put("cluster.name","mySearch");
Node node = NodeBuilder.nodeBuilder().settings(settings).build().start();
Client client = node.client();
Any helps or clues are welcome and greatly appreciate
EDIT 1:
I was not using VM argument to determine the ES home path as I need to take the project into different paths and platforms when I transferring project.
EDIT 2:
I tried to change my project with elastic home path in VM argument also won't work anymore because I did following the solution that mentioned with this link, but error still raise.
Try to use:
-Dtests.jarhell.check=false
Remark: It works with my Elasticsearch 2.4. I saw comments, that it is not available in all Elasticsearch versions (see Elasticsearch jar hell when writing integration tests)
I got the same error message with catalina.jar conflicting with catalina-ant.jar. So, the quick fix was to rename catalina-ant.jar to catalina-ant.jar.orig in the $TOMCAT/lib folder.
Tomcat is still running for me, even with the one library missing.
I am getting Build Failed, while deploying the Portlets,Themes and Layouts in liferay 6.2 on ubuntu OS .
The console messages are:
The Build Failed Message on Console:
BUILD FAILED
/opt/scrum-6.2/plugins/layouttpl/20x80-layouttpl/build.xml:7: The following error occurred while executing this line:
/opt/scrum-6.2/plugins/layouttpl/build-common-layouttpl.xml:5: The following error occurred while executing this line:
/opt/scrum-6.2/plugins/build-common-plugin.xml:5: The following error occurred while executing this line:
/opt/scrum-6.2/plugins/build-common.xml:47: The following error occurred while executing this line:
/opt/scrum-6.2/plugins/build-common-ivy.xml:17: The specified destination is a directory
Can any one help me?
Solution -> Edit build-common-ivy.xml and change line 17 so that it looks like this:
dest="${ivy.home}/ivy-${ivy.version}.jar"
Also, it complains that you need Ant 1.8, so be sure to upgrade to 1.8.
I have resolved the build failed issue
The following file is missing in plugins:
---> build.username.properties file
And inside the .ivy folder,cache folder and ivy-2.3.0.jar files are missed.
I just have added the above things in plugins.
I was setting up to run graddle from my terminal using "grails dev run-app" command, then an error occurred.
I'm not sure what causing the error, but what I have installed are:
Java JDK 1.8.0_111
Grails 3.0.14
MySQL
I have tried to use "grails clean" and try to use "export=JAVA_HOME='/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home'" but still outputs the same error.
This is the simplified long error:
Running application...
objc[3493]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
Configuring Spring Security Core ...
... finished configuring Spring Security Core
ERROR org.apache.tomcat.jdbc.pool.ConnectionPool - Unable to create initial connections of pool.
java.sql.SQLException: Access denied for user 'mobileeyeclinic'#'localhost' (using password: YES)
...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':bootRun'.
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_111.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)
Deeply thanks for anyone who could provide a solution to this matter.
The warning message Running application... Which one is undefined is not matter. I think your failure cause by wrong password for 'mobileeyeclinic'#'localhost' or may be the MySQL is not running as a service. See this link Class JavaLaunchHelper is implemented in both. One of the two will be used. Which one is undefined for more info
ERROR org.apache.tomcat.jdbc.pool.ConnectionPool - Unable to create
initial connections of pool.
java.sql.SQLException: Access denied for user
'mobileeyeclinic'#'localhost' (using password: YES)
You have no rights to access to the bbdd you have set on the application.yml file.