Getting Gradle error when starting STS - eclipse

I am using STS 3.6.0 and during STS startup I am getting error:
org.eclipse.osgi.internal.framework.EquinoxConfiguration$1
Could not fetch model of type 'EclipseProject' using Gradle installation 'C:\build-tools\gradle-1.10'.
And I can't run Gradle task for the project. Any suggestion?

The error message looks similar to the error in this bug [1].
This bug is actually caused by a bug in Eclipse 4.4.2 [2]. There are a few things you can do to avoid this bug:
You can try a more recent version of gradle tooling (and/or STS)
install the workaround from eclipse update site as explained in comment 51 [3] of the Eclipse bug
[1] https://issuetracker.springsource.com/browse/STS-3922
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122
[3] https://bugs.eclipse.org/bugs/show_bug.cgi?id=445122#c51

Related

com.gradle.build-scan plugin was not found

I recently started seeing below error in eclipse. seems like eclipse gradle plugin is not able to build the project however when i build from command prompt build is successful.
Plugin [id: 'com.gradle.build-scan', version: '2.1', artifact: 'com.gradle:build-scan-plugin:2.1'] was not found in any of the following sources:
The error is saying that plugin is missing. how do i install this plugin into gradle ?

Maven 3.2.5 doesn't work with JDK6

I have an issue and after many attempts don't know how to resolve it.
I have Java/Maven project with JDK 6 and installed Maven 3.2.5 in Eclipse Luna
Now I'm trying to run clean install command to create ZIP package but getting the following error message:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ABC: Fatal error compiling: invalid target release: 1.7
Does someone has this issue before and how do you resolve it.?
Could you help me please?
Thanks in advance.
The project you are attempting to compile specifies that the generated bytecode should be for Java 1.7. To do that you have to have a JDK7 or later.
Either change the project to specify 1.6, or upgrade your Java to 1.7. (There is really no reason to still stay on Java 1.6, it is old and obsolete now.)

Rascal/Eclipse integration error (Unable to load Rascal perspective in Eclipse Kepler)

I installed Eclipse and Rascal as explained on the Rascal download page (http://www.rascal-mpl.org/start/).
However, when I open the Rascal perspective I get the following error in the Rascal Navigator: "Failed to create the part's controls".
Furthermore, in the error log I get messages like:
Error
Sat Mar 22 11:26:48 CET 2014
Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/ElementContainer/selectedElement/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler#37196d53
org.eclipse.swt.SWTException: Widget is disposed
I installed:
Eclipse for RCP and RAP developers (Kepler Service release 2) (eclipse.buildId=4.3.2.M20140221-1700).
Java JDK 8 (also tried with Java JDK 7).
Installed Rascal using the update site.
Which Eclipse version will work with the Rascal plugin?
This issue has been reported and fixed. Until a new release is available I suggest resetting the perspective as a quick fix. (https://github.com/cwi-swat/rascal/issues/484)

RoboVM not working on JDK 1.8.0 b112

I'm running Eclipse with RoboVM plugin and I wanted to try IOSDemo sample project described on robovm.org (http://www.robovm.org/docs.html). When creating the project in Eclipse and running it I got following error message.
An internal error occurred during: "Launching IOSDemo".
java.lang.IllegalAccessError: tried to access method java.lang.Object.clone()Ljava/lang/Object; from class soot.toolkits.scalar.LocalSplitter
I found out that it's related to JDK version (I'm running JDK 8.0 ea, build 112). When running on JDK 1.7.0_45 and building the project on cmd line it builds and runs OK.
Is it known problem, is there any workaround or fix? Thanks
This is most probably due to a bug [1] in the recent early access builds of Java8. It looks like the bug was resolved a few days ago but as far as I can see the fix didn't make it into the b113 build. Please use the latest Java7 release or an earlier Java8 EA build until a Java8 build is available with this fix included.
[1] https://bugs.openjdk.java.net/browse/JDK-8026394

Gradle Integration for Eclipse daemon startup failure

I am new to Eclipse Juno using the Gradle Integration for Eclipse plugin. I am at a loss why gradle works perfectly from the command line and as an external tool; but in Eclipse Juno Package Explorer menu: gradle task it fails constantly with the following stack trace:
Error while initializing classpath container
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.5/userguide/gradle_daemon.html
Please read below process output to find out more:
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.(File.java:423)
at org.gradle.api.internal.classpath.EffectiveClassPath.findAvailableClasspathFiles(EffectiveClassPath.java:41)
at org.gradle.api.internal.classpath.EffectiveClassPath.(EffectiveClassPath.java:32)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:61)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:41)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.daemon.bootstrap.GradleDaemon.main(GradleDaemon.java:22)
Could not fetch model of type 'EclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'.
The env variables for GRADLE_HOME, GRADLE_USER_HOME, PATH are all setup correctly. From the command line gradle -v returns:
Gradle 1.6
Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_45 (Oracle Corporation 24.45-b08)
OS: Windows 7 6.1 amd64
Eclipse version:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426
OS is Win7 64 on amd64 platform with 4GB of system memory so it show not be a memory issue and there are no gradle daemons running when I get the above stack trace in Eclipse Juno.
I have exhausted all means on the web, this site, and my team to resolve the issue. I need some help please.
Windows 7 sets the user.home as a UNC path.
Add -Duser.home=x:\ to your Eclipse INI file where "x" is a local drive name.
That should solve your problem
If you are using the Gradle plugin, ensure it is pointing to the correct Gradle installation. I get the error you show when I use the embedded Gradle that comes with Spring Tools Suite.