Classpath error while configuring grails on Windows - grails

I want to install grails on my windows 10 (x64). The grails version I have is 3.3.4, groovy version 2.4.14, JVM version 1.8.0_141. I can create an app but when I run it an error comes out:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'hello'.
Could not resolve all dependencies for configuration ':classpath'.
Could not resolve org.grails:grails-gradle-plugin:3.3.4.
Required :
project :
Could not resolve org.grails:grails-gradle-plugin:3.3.4.
Could not get resource 'https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/3.3.4/grails-gradle-plugin-3.3.4.pom'.
Could not GET 'https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/3.3.4/grails-gradle-plugin-3.3.4.pom'.
Connect to repo.grails.org:443 [repo.grails.org/198.18.1.217] failed: Connection timed out: connect
Could not resolve org.grails.plugins:hibernate5:6.1.9.
Required by:
project :
Could not resolve org.grails.plugins:hibernate5:6.1.9.
Could not get resource
'https://repo.grails.org/grails/core/org/grails/plugins/hibernate5/6.1.9/hibernate5-6.1.9.pom'.
Could not GET 'https://repo.grails.org/grails/core/org/grails/plugins/hibernate5/6.1.9/hibernate5-6.1.9.pom'.
Connect to repo.grails.org:443 [repo.grails.org/198.18.1.217] failed: Connection timed out: connect
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
CONFIGURE FAILED
Total time: 1 mins 4.547 secs
Error Error initializing classpath: Connection timed out: connect (Use --stacktrace to see the full trace)
I have searched everywhere but haven't found a solution. Please help me to resolve this.
PS: Every time I try to run the app, strangely the net becomes unbelievably slow.

Related

FAILURE: Build failed with an exception

I'm trying to run my app from inside Visual studio code, but every time I try i get this error:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:validateSigningDebug'.
java.util.concurrent.ExecutionException: com.android.builder.utils.SynchronizedFile$ActionExecutionException: java.io.IOException: com.android.ide.common.signing.KeytoolException: Failed to create keystore.
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1
Although I searched on Google, but I did not get a suitable solution to my problem

Grails 3.1.8 application not running

My Grails 3.1.8 application not running,
Following log found when i want to run application-
|Resolving Dependencies. Please wait...
|Running application...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> A problem occurred starting process 'command 'C:\Program
Files\Java\jdk1.8.0_92\bin\java.exe''
* 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)

ElasticSearch plugin causing server to stop in Grails 3.1.6

I'm trying to add ElasticSearch plugin in my Grails 3.1.6 project.
I installed plugin as:
dependencies {
//..
compile 'org.grails.plugins:elasticsearch:1.0.0.2'
//..}
And configured application.yml as
elasticSearch:
client:
node: local
datastoreImpl: hibernateDatastore
But when I try to run application, i'm getting error as below:
BUILD SUCCESSFUL
Total time: 5.118 secs
|Running application...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe''
* 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
I'm using IntellijIdea v2016 as IDE.
Would someone please help me to figure out the error spot please.
Thanks.
This isn't related to the plugin, it's a Boot/Gradle problem caused by having a classpath that causes the process to fail because the combined length of the process command is larger than the max Windows allows. This was fixed in 3.1.2 but you have to add a small config setting to build.gradle since it's not a problem in Linux or OSX:
grails {
pathingJar = true
}
See https://github.com/grails/grails-core/issues/9125 for more info.

grails -version FATAL ERROR in native method

I'm trying to get grails version, but getting error all the time. OS: windows server 2012 and windows 8. I suspect that the port is busy, and I can't release it - need another exit from situation
So, I'm doing something like this in command line:
{PATH_TO_/bin/grails.bat} -version
The result is:
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
ERROR: transport error 202: bind failed: Address already in use
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:750]
So.. what can I do with it?
Thanks.
To resolve problem I've just set JAVA_OPTS
with
-Xrunjdwp:transport=dt_shmem,server=y,suspend=n
Documentation link

Grails unable to install uploadr plugin

I am facing same error every time m trying to install uploadr plugin through "grails install-plugin uploadr" command , i have mapped compile ":uploadr:0.8.2" in the BuildConfig.groovy but then also getting this
error.![error][1]
| Error Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails.plugins:uploadr:zip:0.8.2 (Use --stacktrace to see the full trace)
| Error Failed to read artifact descriptor for org.grails.plugins:uploadr:zip:0.8.2
The stacktrace output looks something like that:-
Caused by:
org.apache.http.client.HttpResponseException: Proxy Authorization Required (407)
at org.eclipse.aether.transport.http.HttpTransporter.handleStatus(HttpTransporter.java:458)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:283)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:235)
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)
| Error Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails.plugins:uploadr:zip:0.8.2
| Error Failed to read artifact descriptor for org.grails.plugins:uploadr:zip:0.8.2
You are working behind a HTTP proxy and Grails cannot access the internet. You need to
grails add-proxy My-Proxy --host=proxy-server --port=4300 // according to [this][1]
and then activate the proxy configuration by
grails set-proxy My-Proxy

Resources