Issue when run app with Grails - java

I'm a newbie in Grails Framework, I've downloaded Grails version 2.4.4 and set Path to it.
I create new application (like "hello world") but when run it with command (after cd application folder): grails run-app ,
cmd was stopped at this line : Configuring classpath.
Then I google, and try to use this way : setting "verbose" in BuildConfig.groovy file and it still like before with these errors :
| Error Resolve error obtaining dependencies: Failed to read artifact descriptor for org.slf4j:jcl-over-slf4j:jar:1.7.5
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.slf4j:jcl-over-slf4j:jar:1.7.5
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:370)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:525)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:509)
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.doRecurse(DefaultDependencyCollector.java:494)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:458)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
What can I do next?? and why it has these error, and what can I do for running this application.
P/s : Java version that I use is Java 1.6.0, OS: window 7.
Thank for any help.

This is a proxy issue, you can execute below commands:
grails add-proxy "client" "--host=yourHostName" "--port=8080" "--username=***" "--password='PASSWORD_GOES_HERE'"
grails set-proxy client

I believe the notation is incorrect for your dependency. You have:
org.slf4j:jcl-over-slf4j:jar:1.7.5
this includes a jar reference, which is unnecessary. Can you try:
org.slf4j:jcl-over-slf4j:1.7.5
Also, it looks like version 1.7.9 is available as of December 2014, if you want to use the latest.

Related

How to fix netty dependency when executing a java jar containing google-cloud app in raspbian

I have a java application in which I am using google cloud speech recognition. Everything works fine when I execute the runnable jar in Ubuntu, but when I execute the runnable jar in my raspberry pi 3 with OS Raspbian using the command java -jar JarFile.jar I get an error about a dependency with netty, which I have never used.
I have read this question
Failed to load libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
which is exactly the same as mine, but I don't know how to carry out the answer provided there. If someone could give me more information about how to do that I would be very pleased.
I have already tried:
Using netty in my maven dependencies although I don't need it.
Installing tomcat apache (I thought it could provide some SSL solution)
Adding latest netty .jar to my dependencies
These are the first lines of the error trace I get:
dic 30, 2018 11: 14: 39 PM io.grpc.netty.shaded.io.grpc.netty.GrpcSslContexts defaultSslProvider
INFORMACIÓN: netty - tcnative unavailable(this may be normal)
java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_arm_32, netty_tcnative_linux_arm_32_fedora, netty_tcnative_arm_32, netty_tcnative]
at io.grpc.netty.shaded.io.netty.util.internal.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java: 93)
at
Netty does not provide a netty-tcnative artifact for arm32 so you will need to either build it yourself or use another SSL implementation together with grpc. As far as I know they also support using the one which is provided as part of the JDK or allow to use conscrypt.

Why do i get Forbidden <403> error while trying to start Grails 3+ on windows?

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

How do I bundle a Custom C Shared Library with Java Application in Cloud Foundry?

I have previously been deploying a java application successfully in Cloud Foundry. However, now the developers have added a shared library compiled from C. I have added the .so to the .zip file (I'm using universal packager and deploying to Cloud Foundry by zip file) and ensured the .so is executable. However, when I deploy I get an error:
2016-12-23T14:39:01.013+00:00 [STG/0] [OUT] -----> Java Buildpack Version: eba4df6 | git://github.com/cloudfoundry/java-buildpack.git#eba4df6
2016-12-23T14:39:01.017+00:00 [STG/0] [ERR] [Buildpack] ERROR Compile failed with exception #<RuntimeError: No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
2016-12-23T14:39:01.017+00:00 [STG/0] [ERR] No container can run this application. Please ensure that you’ve pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
2016-12-23T14:39:01.022+00:00 [STG/0] [ERR] Failed to compile droplet
2016-12-23T14:39:01.024+00:00 [STG/0] [OUT] Exit status 223
So my understanding is that I need to created a Custom Buildpack from the Java Buildpack. However, I am getting stuck with the code at this point:
https://github.com/ONSdigital/java-buildpack/blob/master/bin/compile#L28
# Adding crf tagger library
status "Adding crf tagger support"
cp $bp_dir/parsers/src/main/resources/libbackend.so $build_dir/vendor/
# update the PATH
status "Building runtime environment"
mkdir -p $build_dir/.profile.d
echo "export PATH=\"$HOME/bin:\$HOME/vendor/:\$PATH\";" > $build_dir/.profile.d/crftagger.sh
echo "export LD_LIBRARY_PATH=\"\$HOME/vendor/\";" >> $build_dir/.profile.d/crftagger.sh
From what I can gather I only need to modify the compile stage. What do I need to do to copy over the .so and have the Buildpack run successfully.
Please take a look to this https://docs.cloudfoundry.org/devguide/deploy-apps/deploy-app.html#profile
Pre-Runtime Hooks that's you need. I can't give you more details because you haven't provided enough information (project structure, do you have .profile in you root and etc.).
If you need to add shared libs try to use attr_reader :additional_libraries https://github.com/cloudfoundry/java-buildpack/blob/master/docs/extending-droplet.md

Failed to customize Java Version in Bluemix

I've deployed my app to Bluemix and want to change the default Java version from 8 to 7. Then I run the cf command "cf set-env myapp JBP_CONFIG_IBMJDK "version: 1.7+"", then run "cf restage myapp", but error occurred. Below is the log.
Anyone can give me some tips on how to customize Java version, instead of using the default one? Thanks so much!
Updated app with guid 978e8006-6211-47c7-aa67-2931be310519 ({"environment_json"=>"PRIVATE DATA HIDDEN"})
Got staging request for app with id 978e8006-6211-47c7-aa67-2931be310519
-----> Downloaded app package (12M)
-----> Downloaded app buildpack cache (4.0K)
-----> Liberty Buildpack Version: v2.3-20151208-1311
E, [2016-01-10T09:42:28.093168 #73] ERROR -- /var/vcap/data/dea_next/admin_buildpacks/24690e4f-31f1-4172-b295-80c16598b357_bb01df5b768b9bb0430b0a8427293feda0a920cc/lib/liberty_buildpack/buildpack.rb:50:in `rescue in drive_buildpack_with_logger': Compile failed with exception #<NoMethodError: undefined method `include?' for nil:NilClass>
undefined method `include?' for nil:NilClass
Staging failed: Buildpack compilation step failed
encountered error: App staging failed in the buildpack compile phase
Stopped app instance (index 0) with guid 978e8006-6211-47c7-aa67-2931be310519
The error is related with the buildpack not compiling successfully.
Check if you are using any feature related to jre 1.8 version.
All the options to configure the jre used in your liberty application are documented here:
https://www.ng.bluemix.net/docs/#starters/liberty/index.html#liberty

Building single Maven modules is not implemented for Maven 3, yet

I am getting this error while running selenium script in jenkins:
Building in workspace /home/jenkins_home/jobs/fe-integration-test/workspace
$ /usr/local/jdk1.6.0_34/bin/java -cp /home/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/usr/local/apache-maven-3.0.4/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /usr/local/apache-maven-3.0.4 /opt/wikiandsonartomcat/apache-tomcat-7.0.30/webapps/jenkins/WEB-INF/lib/remoting-2.16.jar /home/jenkins_home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 42127
<===[JENKINS REMOTING CAPACITY]===>channel started
Building single Maven modules is not implemented for Maven 3, yet!
Finished: ABORTED'
My server is CENT OS.
Can any one tell me how to get out of this error.
Today I got around this error by simply restarting Jenkins service (windows 7).
The root cause comes from Jenkins maven-plugin, so it should be fixed there first.
As of 2014-03-12 the code seems to have been improved.

Categories