eclipse gives error on start up after adding sbteclipse plugin - eclipse

I add sbt eclipse plug-in .First I created the project named hello the in project directory i created a file named plugins.sbt and add this line in it
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")
and after the sbt> I typed eclipse then it created the project for eclipse
when I open eclipse it gives me error message
An error has occurred. See the error log for more details
The org.eclipse.jdt.ui.javaElementFilters plug-in extension "scala.tools.eclipse.javaelements.ScalaElementFilter" specifies a viewer filter class which does not exist.
Plug-in org.scala-ide.sdt.core was unable to load class scala.tools.eclipse.javaelements.ScalaElementFilter.
An error occurred while automatically activating bundle org.scala-ide.sdt.core (806).
please help me to how to resolve this error and when I imported the sbt project eclipse give me another error
Building workspace has encountered a problem
Errors occurred during the build.
Error instantiating builder 'org.scala-ide.sdt.core.scalabuilder'.
Plug-in org.scala-ide.sdt.core was unable to load class scala.tools.eclipse.ScalaBuilder.
An error occurred while automatically activating bundle org.scala-ide.sdt.core (806).
Plug-in org.scala-ide.sdt.core was unable to load class scala.tools.eclipse.ScalaBuilder.
An error occurred while automatically activating bundle org.scala-ide.sdt.core (806).
Please help me
scala version 2.11.1
sbt version 0.13
I added the scala-IDE plugin from this source
http://scala-ide.org/download/current.html
i am using eclipse juno and pasted the following location in install new software
http://download.scala-ide.org/sdk/helium/e38/scala211/stable/site
my project compiles successfully in sbt

Are you using Eclipse Luna for Java Developers (as opposed to Eclipse Classic) AND Scala IDE 4.0 milestone 3? There is a known issue (solved in the nightly builds since then), reported on the mailing list here.
You can "fix" it by either upgrading the Scala plugin to a nightly build (they're pretty stable), or going with Eclipse Classic instead.

Related

WFLYSRV0177: Error getting reflective information for class

I am developing a JEE project using Eclipse JEE (2019-09), Maven, Wildfly 17, JSF, PrimeFaces 7.0 running on Ubuntu 18.04.
My project used to compile, deploy and run on the WildFly 17 server until today. However, because I recieved strange errors when debugging, I installed an earlier Eclipse IDE to try to run my project on it.
After installing the older version of Eclipse (2019-03) in its own dedicated workspace, I got this error message when deploying my application to WildFly:
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class
I then switched back to my initial Eclipse JEE (2019-09) Version, but then I kept recieving the same error message upon deploying.
I' ve searched the internet and found these two similar problems:
Error getting reflective information for class
Wildfly: Error getting reflective information for class
but actually not a solution to my problem.
Could somebody please help?
The problem was that the Maven jar- dependencies were not added to the WEB-INF/lib path.
Actually, in the deployed .war file the folder WEB-INF/lib was completely missing.
I fixed the problem by right-mouse click on my project in Eclipse, then "Properties", then "Deployment Assembly".
I added the missing entry "Maven Dependencies" as follows:
1.) BEFORE MY FIX:
2.) AFTER MY FIX:

Issue while building project in scalaide

I am using scala IDE eclipse version 4.4.0 with Scala 2.11.8. I am able to compile the project from command line using sbt compile and create eclipse specific project files using sbt eclipse (using sbteclipse for this). However , while I am clicking on build project in context menu ,its giving exception
**Errors occurred during the build.
Errors running builder 'Scala Builder' on project project_name.
org.eclipse.core.internal.resources.File cannot be cast to org.eclipse.core.resources.IContainer**
Here the error log of the same .
**!ENTRY org.scala-ide.sdt.core 4 0 2017-01-09 14:13:56.020
!MESSAGE Error thrown while initializing the presentation compiler.
!STACK 0
java.lang.ClassCastException: org.eclipse.core.internal.resources.File cannot be cast to org.eclipse.core.resources.IContainer
at org.scalaide.core.internal.project.ScalaProject$$anonfun$sourceOutputFolders$2$$anonfun$apply$7.apply(ScalaProject.scala:242)
at org.scalaide.core.internal.project.ScalaProject$$anonfun$sourceOutputFolders$2$$anonfun$apply$7.apply(ScalaProject.scala:232)
at scala.Option$WithFilter.map(Option.scala:207)
at org.scalaide.core.internal.project.ScalaProject$$anonfun$sourceOutputFolders$2.apply(ScalaProject.scala:232)
at org.scalaide.core.internal.project.ScalaProject$$anonfun$sourceOutputFolders$2.apply(ScalaProject.scala:231)
at scala.collection.TraversableLike$WithFilter$$anonfun$flatMap$2.apply(TraversableLike.scala:714)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.TraversableLike$WithFilter.flatMap(TraversableLike.scala:713)
at org.scalaide.core.internal.project.ScalaProject.sourceOutputFolders(ScalaProject.scala:231)
at org.scalaide.core.internal.project.ScalaProject.initializeCompilerSettings(ScalaProject.scala:478)
at org.scalaide.core.internal.project.ScalaProject.org$scalaide$core$internal$project$ScalaProject$$prepareCompilerSettings(ScalaProject.scala:435)
at org.scalaide.core.internal.project.ScalaProject$$anonfun$5.apply(ScalaProject.scala:159)
at org.scalaide.core.internal.project.ScalaProject$$anonfun$5.apply(ScalaProject.scala:159)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.liftedTree1$1(PresentationCompilerProxy.scala:152)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.create(PresentationCompilerProxy.scala:151)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.initialize(PresentationCompilerProxy.scala:116)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.obtainPc$1(PresentationCompilerProxy.scala:78)
at org.scalaide.core.internal.compiler.PresentationCompilerProxy.internal(PresentationCompilerProxy.scala:98)
at org.scalaide.core.internal.jdt.model.ScalaCompilationUnit$class.addToIndexer(ScalaCompilationUnit.scala:157)
at org.scalaide.core.internal.jdt.model.ScalaSourceFile.addToIndexer(ScalaSourceFile.scala:66)
at org.scalaide.core.internal.jdt.search.ScalaSourceIndexer$$anonfun$indexDocument$2.apply(ScalaSourceIndexer.scala:16)
at org.scalaide.core.internal.jdt.search.ScalaSourceIndexer$$anonfun$indexDocument$2.apply(ScalaSourceIndexer.scala:16)
at scala.Option.map(Option.scala:146)
at org.scalaide.core.internal.jdt.search.ScalaSourceIndexer.indexDocument(ScalaSourceIndexer.scala:16)
at scala.tools.eclipse.contribution.weaving.jdt.indexerprovider.IndexerProviderAspect.ajc$around$scala_tools_eclipse_contribution_weaving_jdt_indexerprovider_IndexerProviderAspect$1$16276a3c(IndexerProviderAspect.aj:30)
at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.indexDocument(JavaSearchParticipant.java:71)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager.indexDocument(IndexManager.java:504)
at org.eclipse.jdt.internal.core.search.indexing.IndexManager$1.execute(IndexManager.java:984)
at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:405)
at java.lang.Thread.run(Thread.java:745)**
Your Scala IDE Eclipse plug-in fails by using internal classes instead of public API from Eclipse (ClassCastException of org.eclipse.....internal.... classes in org.scalaide....). This could be caused by using an older version of the Scala plug-in in a newer version of Eclipse.
Either use the latest version of both, of Eclipse and of the Scala IDE plug-in or use the Scala IDE which contains Eclipse, Scala and the Scala plug-in of versions which have been tested together.

Eclipse : Errors occurred during the build Groovy/Grail Project

I have installed GGTS plugin for eclipse kepler 3.5.1 RELEASE. I created simple grail project. But while building project. Its getting error
Errors occurred during the build.
Errors running builder 'Java Builder' on project 'FirstApp'.
org.codehaus.groovy.runtime.StringGroovyMethods.plus(Ljava/lang/String;Ljava/lang/CharSequence;)Ljava/lang/String;
and if we saw in markers, I found this error
Internal compiler error: java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.StringGroovyMethods.plus(Ljava/lang/String;Ljava/lang/CharSequence;)Ljava/lang/String; at
org.codehaus.groovy.grails.transaction.transform.TransactionalTransform.moveOriginalCodeToNewMethod(TransactionalTransform.groovy:259)
Config.groovy /FirstApp/grails-app/conf line 0 Java Problem
I am using feroda 17. Eclipse Kepler.
We were experiencing the same error today, it turned out that the project created by GGTS had a groovy compiler level of 2.3 but the GGTS plugin only supported up to groovy compiler level 2.1.
The fix was to install the "groovy 2.3 compiler for groovy-eclipse".
The compiler can be found under the "language and support tooling" heading in the extensions browser which is opened by clicking the "IDE extensions" button in the STS dashboard.
Although the compiler states that it will automatically become the default workspace compiler in eclipse this did not happen for us. In fact we needed to set it as the workspace default in "preferrences > groovy > compiler" and then restart eclipse (maybe I restarted twice, cant remember exactly).
we also ended up installing "groovy 2.3 compiler for groovy-eclipse" twice as the first time an eclipse IDE update was installed, I think because our kepler installation was a bit old.
Hope this helps.

ejb-javaee6 with error when generated by eclipse

When I create an ejb project through ejb-javaee6 archetype in Eclipse I get the following errors:
Description Resource Path Location Type
Endorsed directory '/home/hfluz/workspace/maven-test/web2/target/endorsed' is missing. You may need to a perform a Maven command line build in order to create it. pom.xml /web2 line 28 Maven Configuration Problem
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-dependency-plugin:2.1:copy (execution: default, phase: validate) pom.xml /web2 line 53 Maven Project Build Lifecycle Mapping Problem
There is already an /target/endorsed/javaee-endorsed-api-6.0.jar file.
IDE: JBoss Developer Studio 7 Beta 1 (tried with embedded 3.0.4 maven version and also with 3.0.5).
When I generate this same archetype through command line (maven 3.0.4) and import the project to eclipse, these errors are not displayed.
I just tried and the same happens with webapp-javaee6 archetype (also from org.codehaus.mojo.archetypes).
Anyone have any idea about what is causing this issue?
Try refreshing the target folder in eclipse (workspace seems out of sync).
Read http://docs.jboss.org/tools/whatsnew/maven/maven-news-3.3.0.CR1.html about endorsed library support in JBDS/JBT

Eclipse doesn't show java source code

I'm running java 1.6 in Eclipse on my Intel Mac. I'm using the 1.6.0 version under System/Library/Frameworks and set the default compiler to this in Eclipse.
How do I attach the source code?
First, I downloaded the 1.6 source from oracle, thinking I could attach that 'cause the installed 1.6 didn't have source.
When I click a java class to get the Source Code Editor, there are problems:
first, the top line says Compiled from File.java (version 1.5 : 49.0, super bit)
most important, when I attach the 1.6 source jar file, it gets an error:
An error has occurred. See error log for more details.
Unable to create resource org.eclipse.ui.internal.misc.ExternalProgramImageDescriptor#50417ba8
This also appears in the error log:
java.lang.ClassNotFoundException: org.eclipse.ui.internal.views.log.LogView
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:506)
The Eclipse version is: Eclipse Java EE IDE for Web Developers.
Version: Helios Service Release 2
Build id: 20110218-0911
When I click for installation details, I get:
An internal error occurred during: "Fetching children of _SELF_".
Registry Directory not available: /Users/rfrail/Downloads/eclipse 2/p2/org.eclipse.equinox.p2.engine/profileRegistry.
I'm running Eclipse from my Download directory (it's worked fine in the past); however, there are 2 folders for Eclipse:
eclipse, and
eclipse 2.
So that looks like a source of confusion right there. Eclipse operates fine otherwise.
Can you help, please?
http://java.decompiler.free.fr/ is your answer
it has an eclipse plugin which decompiles code in place