unable to start grails application - grails

Hi since 2 days i've got an error i can't understand when i try to run my app asset pipeline have some trouble
Error |Resolve error obtaining dependencies: Could not transfer artifact org.grails.plugins:asset-pipeline:zip:1.9.9 from/to grailsCentral (https://repo.grails.org/grails/plugins): Received fatal alert: protocol_version (Use --stacktrace to see the full trace)
If any idea for these kind of problems known that i've the same issues with all my grails version

Related

How to set grails proxy have error & grails install

i want to know error grails can you help me
|Loading Grails 2.4.0
|Configuring classpath
Error |
Resolve error obtaining dependencies: Failed to read artifact descriptor for xalan:serializer:jar:2.7.1 (Use --stacktrace to see the full trace)
Error |
Required Grails build dependencies were not found. This is normally due to internet connectivity issues (such as a misconfigured proxy) or missing repositories in grails-app/conf/BuildConfig.groovy. Please verify your configuration to continue.
Process finished with exit code 1
In Grails 2, the proxy is configured and set in a file that (I believe) is in your ~/.grails directory. There are command-line arguments for setting that documented in the grails documentation here: https://grails.github.io/grails2-doc/2.4.2/ref/Command%20Line/add-proxy.html
In general you would do something like
grails add-proxy client --host=proxy-server --port=4300 --username=guest --password=guest
And then activate it like
grails set-proxy client

Cannot create application with Grails

I've downloaded Grails from
Manual Installation
https://docs.grails.org/latest/guide/gettingStarted.htm
and followed all the instructions there.
But when I ran
grails create-app helloworld --stacktrace
I got the error:
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public) (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
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.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:318)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:300)
at org.springframework.boot.cli.compiler.grape.AetherGrapeEngine.resolve(AetherGrapeEngine.java:292)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:54)
at org.grails.cli.boot.GrailsDependencyVersions.<init>(GrailsDependencyVersions.groovy:50)
at org.grails.cli.profile.repository.MavenProfileRepository.<init>(MavenProfileRepository.groovy:53)
at org.grails.cli.GrailsCli.createMavenProfileRepository(GrailsCli.groovy:333)
at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:234)
at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public)
Has anyone experienced the same issue? I've googled it but there aren't many results and the suggested solutions didn't help me.
The one "did nothing" and it started working, and the other suggested cleaning maven repository. I didn't do the last one as I didn't see how a fresh Grails installation is related to installed Maven... However I'm new to Grails.
Maybe a proxy should be set...
Nope. When I tried to set proxy I got:
grails add-proxy client --host=<ip> --port=<port>
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public) (Use --stacktrace to see the full trace)
All that happened when I used Grails 3.3.9 on Windows 10
Using Grails version 2.5.0 fixed the error for me.

Issue with C# sonarqube plugin

I have a SonarQube 5.6 installed since a year now, It's integrated with TFS. Installed with few additional plugins, C#, dependency-check, fxcop, java, Checkmarx, scm-cvs, scm-git, scm-svn and scm-tfvc.
everything was working fine. Today it's started failing build with error
2017-06-26T17:54:22.7387533Z Downloading SonarQube.MSBuild.Runner.Implementation.zip from http://xxxxxxx:9000/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip to E:\agnt\_work\41\.sonarqube\bin\SonarQube.MSBuild.Runner.Implementation.zip
2017-06-26T17:54:22.7397520Z ##[error]Could not find a file on the SonarQube server. Url: http://xxxxxxxxxx:9000/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip
2017-06-26T17:54:22.7407523Z ##[error]Failed to update the SonarQube Scanner for MSBuild binaries. Check the server url, verify that the C# plugin is correctly installed on the SonarQube server and that the SonarQube server has been restarted.
2017-06-26T17:54:22.7417526Z ##[error]Pre-processing failed. Exit code: 1
2017-06-26T17:54:22.8678238Z ##[error]System.Exception: Unexpected exit code received from batch file: 1
2017-06-26T17:54:22.8698250Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeBatchScriptCmdlet.ProcessRecord()
2017-06-26T17:54:22.8708248Z ##[error] at System.Management.Automation.CommandProcessor.ProcessRecord()
From the error, I can it's something related to C# plugin. I checked that plugin under /extensions/plugins and it's there. I thought it can be something compatibility issue, I tried to upgrade it to latest one 6.0
After installing 6.0 tried again and got the same error.
I also tried with old version of same plugins. tried 5.3, 5.0. After manually copied jar file under /plugins. Tried to restart the sonar server and it didn't started successfully. I got the error as below,
2017.06.26 18:31:11 ERROR web[o.s.s.p.Platform] Fail to stop server - ignored
java.lang.IllegalStateException: Cannot stop. Current container state was: CONSTRUCTED at org.picocontainer.lifecycle.DefaultLifecycleState.stopping(DefaultLifecycleState.java:72) ~[picocontainer-2.15.jar:na] at org.picocontainer.DefaultPicoContainer.stop(DefaultPicoContainer.java:794) ~[picocontainer-2.15.jar:na]
2017.06.26 18:31:11 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
java.lang.IllegalStateException: Fail to load plugin FxCop [fxcop] at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:74) ~[sonar-server-5.6.jar:na] at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:691) ~[sonar-server-5.6.jar:na] at org.sonar.server.platform.Platform.start(Platform.java:216) ~[sonar-server-5.6.jar:na]
Caused by: java.lang.IllegalStateException: Unable to register extension org.sonar.api.config.PropertyDefinition at org.sonar.core.platform.ComponentContainer.addExtension(ComponentContainer.java:248) ~[sonar-core-5.6.jar:na] at org.sonar.server.plugins.ServerExtensionInstaller.installExtension(ServerExtensionInstaller.java:111) ~[sonar-server-5.6.jar:na] at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:66) ~[sonar-server-5.6.jar:na]
Caused by: org.picocontainer.PicoCompositionException: Duplicate Keys not allowed. Duplicate for 'org.sonar.api.config.PropertyDefinition-sonar.cs.fxcop.timeoutMinutes'at org.picocontainer.DefaultPicoContainer.addAdapterInternal(DefaultPicoContainer.java:438) ~[picocontainer-2.15.jar:na]
2017.06.26 18:31:11 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file 2017.06.26 18:31:11 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2017.06.26 18:31:11 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread
2017.06.26 18:31:11 WARN web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: Webapp did not start at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-5.6.jar:na]at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-5.6.jar:na]at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-5.6.jar:na]at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server5.6.jar:na]
can someone please help to fix this issue?
You need to update the Scanner for MsBuild as well. The old versions are not compatible with SonarC# 6+.
I fixed this issue by removing FxCop plugin. Somehow that plugin stopped working. can be the version what i was using that was not compatible with C# plugin. I installed C# plugin version 5.0 (latest is 6.0)
as mentioned above, if i want to use C# latest version, i need to update sonar scanner for MSBuild.

Grails : Error in run the application

I have tried to run grails application but it shows the below error
Problem updating profiles from origin git repository (Use --stacktrace
to see the full trace)
someone pls help me.
You are facing this issue mainly because of network issues. Run "Grails Dependencies" you will see the exact error. Which is the file which it is not able to download and what is the reason will be shown.

Grails App fails to deploy to Heroku?

I have developed a Grails application and have deployed it many times to Heroku without an issue. However just recently I have changed the solution to use plugins from within a folder I have called "plugins". I have then basically added the following code to the BuildConfig in order to include those plugins in the application:
grails.plugin.location.'spring-security-ui'="plugins/grails-spring-security-ui"
Now when I run the delpoy to Heroku I get the following error:
|Generating plugin.xml for inline plugin
Error |
Error executing script War: java.lang.NullPointerException: Cannot get property 'file' on null object (Use --stacktrace to see the full trace)
! Failed to build app
! Heroku push rejected, failed to compile Grails app
I think this is due to the new plugins I have added to the solution via the new method. Can anyone tell me if I am missing something or what is wrong??
Also I have tested this locally and runs fine :-S
Thanks
EDIT 1......
I have tried to build the WAR file locally i got the following:
Building WAR file.....
| Error Exception occurred trigger event [CreateWarStart]: /home/admin/workspace/APP_NAME/grails-app/migrations does not exist. (Use --stacktrace to see the full trace)
| Done creating WAR target/APP_NAME-0.1.war
Try grails war locally to see if you can reproduce the problem.
This might possibly be related to GRAILS-9006 which was fixed in 2.0.4.
From trying multiple different things I have found that Heroku is rubbish at handling local plugins within Grails. So I moved over to Jelastic and runs like a dream :-)
Thanks for the help!!

Resources