Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts

Eclipse sbt java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV

Hi,
You will get the below error if we dont keep plugins.sbt in correct place.
Documenting for helping others not to waste time.
Eclipse 4.4
java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV(Ljava/lang/Object;)Lscalaz/syntax/ValidationV;  
Added the required plugin settings in below location should fix the error
/.sbt/0.13/plugins/plugins.sbt
full log is below.
[info] About to create Eclipse project files for your project(s).  java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV(Ljava/lang/Object;)Lscalaz/syntax/ValidationV;          at com.typesafe.sbteclipse.core.package$.setting(package.scala:66)          at com.typesafe.sbteclipse.core.Eclipse$.skipParents(Eclipse.scala:495)          at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action$1.apply$mcZ$sp(Eclipse.scala:103)          at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action$1.apply(Eclipse.scala:103)          at com.typesafe.sbteclipse.core.Eclipse$$anonfun$action$1.apply(Eclipse.scala:103)          at scala.Option.getOrElse(Option.scala:120)          at com.typesafe.sbteclipse.core.Eclipse$.action(Eclipse.scala:103)          at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:82)          at com.typesafe.sbteclipse.core.Eclipse$$anonfun$eclipseCommand$2.apply(Eclipse.scala:82)          at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)          at sbt.Command$$anonfun$applyEffect$1$$anonfun$apply$2.apply(Command.scala:60)          at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)          at sbt.Command$$anonfun$applyEffect$2$$anonfun$apply$3.apply(Command.scala:62)          at sbt.Command$.process(Command.scala:95)          at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:87)          at sbt.MainLoop$$anonfun$1$$anonfun$apply$1.apply(MainLoop.scala:87)          at sbt.State$$anon$1.process(State.scala:176)          at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:87)          at sbt.MainLoop$$anonfun$1.apply(MainLoop.scala:87)          at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)          at sbt.MainLoop$.next(MainLoop.scala:87)          at sbt.MainLoop$.run(MainLoop.scala:80)          at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:69)          at sbt.MainLoop$$anonfun$runWithNewLog$1.apply(MainLoop.scala:66)          at sbt.Using.apply(Using.scala:25)          at sbt.MainLoop$.runWithNewLog(MainLoop.scala:66)          at sbt.MainLoop$.runAndClearLast(MainLoop.scala:49)          at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:33)          at sbt.MainLoop$.runLogged(MainLoop.scala:25)          at sbt.xMain.run(Main.scala:26)          at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)          at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)          at xsbt.boot.Launch$.run(Launch.scala:109)          at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)          at xsbt.boot.Launch$.launch(Launch.scala:117)          at xsbt.boot.Launch$.apply(Launch.scala:19)          at xsbt.boot.Boot$.runImpl(Boot.scala:44)          at xsbt.boot.Boot$.main(Boot.scala:20)          at xsbt.boot.Boot.main(Boot.scala)  [error] java.lang.NoSuchMethodError: scalaz.Scalaz$.ToValidationV(Ljava/lang/Object;)Lscalaz/syntax/ValidationV;  


Can not remove eclipse.exe Backup failed

While updating eclipse i got the below error

Backup of file G:\dev\tools\eclipse\eclipse.exe failed.
Can not remove : G:\dev\tools\eclipse\eclipse.exe




So to resolve this.

Start eclipse
Rename eclipse.exe to eclipse_bkup
Start Update again
Restart eclipse
Done

Setup Scala to use Maven in Eclipse

 

Eclipse needs separate plugin for maven and scala

1)

Download Scala M2E Plugin

Update site

http://alchim31.free.fr/m2e-scala/update-site

2)

Create a new Maven project

Choose archtype as

Group id
net.alchim31.maven
artifact id
scala-archteype-simple

3)


From now you can use your normal maven commands


Note:


In the pom.xml


I tried with scala.version as 2.10.0


It was failing , i decreased it to 2.8.0 it passed. Just in case you get some error like me

Change Eclipse java and memory settings

Eclipse can be told to use specific version of Java if you have multiple on your system

Open eclipse.ini file

Add the following in it , see the entry i made in bold

org.eclipse.platform
--launcher.XXMaxPermSize
2560m
--launcher.defaultAction
openFile
-vm
/home/jagat/development/tools/jdk1.6.0_45/bin/java

--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=2560m
-Xms400m
-Xmx5120m

Change memory settings

You can increase the momory allocated for eclipse here.

If you notice carefully , in all of the above i added one extra 0 , e.g 40 i made 400

You can change depending on your system need.

Eclipse menu not working ubuntu 13.10

I downloaded eclipse on Ubuntu 13.10 and when i open eclipse you know that for all applications ubuntu show menu at top bar. Eclipse was also not exception.

However strange thing was i could not do anything with those links.

So i searched and found this bug

https://bugs.launchpad.net/ubuntu/+source/indicator-appmenu/+bug/659931

Read if you like

How to solve

Instead of clicking eclipse directly start it with following command

 UBUNTU_MENUPROXY= /home/jagat/development/tools/eclipse/eclipse

Where the path on right side is exact path where your eclipse is sitting.

This should bring menus back in eclipse like normal OS and it would work.

However i am still thinking why this did not work in Ubuntu




no libsvnjavahl-1 in java.library.path Eclipse SVN error

no libsvnjavahl-1 in java.library.path Eclipse SVN error

Fix

Go to

Windows > Preferences > Team > SVN 

SVN Interface

Select SVNKit