I have imported a gradle spring boot project in Eclipse (latest version). When I go to Gradle Tasks -> bootRun. I am able to run the gradle tasks. The application is working fine and am able to call controller classes using Postman.
But, I need to debug the code. So, I right click on project and Debug As -> Java Application. But application fails to run with following error
ERROR o.a.tomcat.jdbc.pool.ConnectionPool - Unable to create initial connections of pool.
IO Error: IO Error PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
...
Caused by: java.io.IOException: IO Error PKIX path building failed:..
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed:
Why I can bootRun the application but not Debug As -> Java Application
Related
It throws me this error every mdk file i use
Description Resource Path Location Type
Could not run phased build action using connection to Gradle distribution 'https://services.gradle.org/distributions/gradle-6.8-bin.zip'.
Initialization script 'C:\Users####\eclipse-workspace.metadata.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'
Could not compile initialization script 'C:\Users####\eclipse-workspace.metadata.plugins\org.eclipse.buildship.core\init.d\eclipsePlugin.gradle'.
startup failed:
General error during semantic analysis: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61
When I do Eclipse maven install, it fails with the below error message:
Access denied to http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom. Error code 403, Forbidden
Below is the complete error message :
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project IoTIPDev: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:maven-surefire-common:jar:2.12.4 -> org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.1: Failed to read artifact descriptor for org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.1: Could not transfer artifact org.apache.maven.plugin-tools:maven-plugin-annotations:pom:3.1 from/to central (http://repo.maven.apache.org/maven2): Access denied to http://repo.maven.apache.org/maven2/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.pom. Error code 403, Forbidden -> [Help 1]
[ERROR]
What can be the issue?
For some reason eclipse's maven is not allowed access to maven-plugin-annotations-3.1.pom.
Verify that Eclipse is using the same version of maven than the one used with command line.
If running in windows run Eclipse as Admin.
I have been trying to play around with the libgdx framework. I'm following this book called "LibGDX Game development essentials" by Juwal Bose.
The book recommended checking out some game demos libGDX made available. I downloaded this one: github.com/badlogic/theplanethatcouldntflygood.
I tried importing it to eclipse through gradle and during the import preview this message appeared:
Loading Gradle project preview failed due to an error in the referenced Gradle build.
Could not fetch model of type 'GradleBuild' using Gradle distribution 'http://services.gradle.org/distributions/gradle-2.10-all.zip'.
A problem occurred configuring project ':android'.
failed to find target with hash string 'android-20' in: C:\Users\Daniel\android-sdks
Details:
org.gradle.tooling.BuildException: Could not fetch model of type 'GradleBuild' using Gradle distribution 'http://services.gradle.org/distributions/gradle-2.10-all.zip'.
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:51)
at org.gradle.tooling.internal.consumer.ExceptionTransformer.transform(ExceptionTransformer.java:29)
at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:41)
at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
at org.gradle.tooling.internal.consumer.DefaultModelBuilder.get(DefaultModelBuilder.java:51)
at com.gradleware.tooling.toolingclient.internal.DefaultToolingClient.executeAndWait(DefaultToolingClient.java:106)
at com.gradleware.tooling.toolingclient.internal.DefaultModelRequest.executeAndWait(DefaultModelRequest.java:79)
at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository$1.get(BaseModelRepository.java:95)
at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeAndWait(BaseModelRepository.java:163)
at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.access$000(BaseModelRepository.java:41)
at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository$2.call(BaseModelRepository.java:121)
at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4724)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3522)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2315)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2278)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2193)
at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4721)
at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.getFromCache(BaseModelRepository.java:138)
at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeRequest(BaseModelRepository.java:117)
at com.gradleware.tooling.toolingmodel.repository.internal.BaseModelRepository.executeRequest(BaseModelRepository.java:88)
at com.gradleware.tooling.toolingmodel.repository.internal.DefaultSingleBuildModelRepository.fetchGradleBuildStructure(DefaultSingleBuildModelRepository.java:132)
at org.eclipse.buildship.core.projectimport.ProjectPreviewJob.fetchGradleBuildStructure(ProjectPreviewJob.java:94)
at org.eclipse.buildship.core.projectimport.ProjectPreviewJob.runToolingApiJobInWorkspace(ProjectPreviewJob.java:83)
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob$1.run(ToolingApiWorkspaceJob.java:79)
at org.eclipse.buildship.core.util.progress.ToolingApiInvoker.invoke(ToolingApiInvoker.java:63)
at org.eclipse.buildship.core.util.progress.ToolingApiWorkspaceJob.runInWorkspace(ToolingApiWorkspaceJob.java:76)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring project ':android'.
at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:74)
at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47)
at org.gradle.initialization.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:30)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:101)
at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:87)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.configure(InProcessBuildActionExecuter.java:102)
at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:48)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.tooling.internal.provider.runner.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:58)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
I have put a local.properties file in the root directory of the project indicating the SDK folder. So this is not the problem.
I downloaded version 20 of the Android SDK, with no success.
I have tried reinstalling gradle.
I tried out importing another demo from their git resulting in a very similar error:
Loading Gradle project preview failed due to an error connecting to
the Gradle build. Could not fetch model of type 'GradleBuild' using
Gradle distribution
'services.gradle.org/distributions/gradle-2.2-all.zip'.
A problem occurred configuring project ':android'. failed to find
target with hash string 'android-20' in: C:\Users\Daniel\android-sdks
org.gradle.tooling.GradleConnectionException: Could not fetch model of
type 'GradleBuild' using Gradle distribution
'services.gradle.org/distributions/gradle-2.2-all.zip'.
As suspected, the gradle version in use (2.10) was too old to handle the task, thus upgrading the Eclipse plugin with this link has solved the issue when using gradle with Eclipse.
I am getting below error when trying to create a portlet in Eclipse Juno using liferay 6.2 EE. Can you please let me know what i am missing in this? I am new to Liferay 6.2
BUILD FAILED
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\portlets\build.xml:5: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common-plugins.xml:5: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common.xml:47: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common-ivy.xml:34: The following error occurred while executing this line:
D:\Working\Liferay 6.2\liferay-plugins-sdk-6.2.10.1\build-common-ivy.xml:50: impossible to resolve dependencies:
resolve failed - see output for details
Total time: 1 minute 1 second
Are you getting the following message, mentioned in the forum?
[ivy:resolve] Server access Error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
If so this means ivy is attempting to access an SSL protected URL (https) that is using an invalid certificate.
You must provide more detail (full stacktrace and applicable ivy code) in order to diagnose further.
I want to import hibernate source code into eclipse as a java project. I am new in this field and I'm stuck. I followed the instruction in https://community.jboss.org/wiki/BuildingHibernateORM4x5x. Installed git, downloaded the hibernate-orm. Next I did this ./gradlew eclipse but got the following error.
Downloading http://services.gradle.org/distributions/gradle-1.6-bin.zip
Unzipping /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6-bin.zip to /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok
Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:132)
at java.util.zip.ZipFile.<init>(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:160)
at org.gradle.wrapper.Install.access$400(Install.java:29)
at org.gradle.wrapper.Install$1.call(Install.java:70)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
... 3 more
So I downloaded the gradle-1.6.bin.zip and copied it into the /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/ folder and ran the same command, this time I got this error
Unzipping /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6-bin.zip to /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok
Set executable permissions for: /home/souvik/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6/bin/gradle
FAILURE: Build failed with an exception.
* What went wrong:
Failed to notify model configuration listener.
> Could not resolve all dependencies for configuration ':runtime'.
> Could not resolve org.apache.ant:ant:1.8.2.
Required by:
:buildSrc:unspecified
> Could not GET 'http://repo1.maven.org/maven2/org/apache/ant/ant/1.8.2/ant-1.8.2.pom'.
> peer not authenticated
> Could not GET 'http://repository.jboss.org/nexus/content/groups/public/org/apache/ant/ant/1.8.2/ant-1.8.2.pom'.
> peer not authenticated
> Could not resolve org.javassist:javassist:3.15.0-GA.
Required by:
:buildSrc:unspecified
> Could not GET 'http://repo1.maven.org/maven2/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.pom'.
> peer not authenticated
> Could not GET 'http://repository.jboss.org/nexus/content/groups/public/org/javassist/javassist/3.15.0-GA/javassist-3.15.0-GA.pom'.
> peer not authenticated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 16.359 secs
I just want to know how do I import the git clone as a java project into my eclipse juno? I have tried to install m2eclipse plugin for eclipse, but it didn't work.
PS: I am in ubuntu 12.04 and I am inside a proxy firewall
You'll have to configure Gradle with your proxy settings, for example
gradlew eclipse -Dhttp.proxyHost=www.somehost.org -Dhttp.proxyPort=8080. For details see Accessing the web via a proxy in the Gradle User Guide.
Solved it, I ran
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
The error is misleading Unsupported major.minor version 51.0 This gives the impression that version 51 (java 7) is not supported. And we should use Java 6.
The error should have been,
Current java version 50 is unsupported, use Java version 7 (51:0 and greater)`