This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Exception from Scala Eclipse plugin during build

3 replies
Thomas Pawlitzki
Joined: 2009-01-07,
User offline. Last seen 42 years 45 weeks ago.

Hello NG,

during the build of one of my scala projects the scala eclipse plugin
logs an exception and abort the build.
Here is some background information:
- The project contains 2 scala source directories and 1 java source directory
- I installed the eclipse scala plugin 2.7.3-final
- the .project file looks like this

<?xml version="1.0" encoding="UTF-8"?>

test

ch.epfl.lamp.sdt.core.scalabuilder

ch.epfl.lamp.sdt.core.scalanature
org.eclipse.jdt.core.javanature

- the .classpath looks like this

<?xml version="1.0" encoding="UTF-8"?>

and the project defines in .setting/org.eclipse.jdt.core.prefs
#Tue Mar 31 12:48:18 CEST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=ignore
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
org.eclipse.jdt.core.builder.invalidClasspath=abort
org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.scala
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
org.eclipse.jdt.core.incompleteClasspath=error

Here is the exception stack trace I found in the log:

scala.MatchError: 11
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.emitElement$1(GenJVM.scala:337)
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$scala$tools$nsc$backend$jvm$GenJVM$BytecodeGenerator$$emitAttributes$2$$anonfun$apply$1.apply(GenJVM.scala:399)
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$scala$tools$nsc$backend$jvm$GenJVM$BytecodeGenerator$$emitAttributes$2$$anonfun$apply$1.apply(GenJVM.scala:397)
at scala.List.foreach(List.scala:834)
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$scala$tools$nsc$backend$jvm$GenJVM$BytecodeGenerator$$emitAttributes$2.apply(GenJVM.scala:397)
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator$$anonfun$scala$tools$nsc$backend$jvm$GenJVM$BytecodeGenerator$$emitAttributes$2.apply(GenJVM.scala:385)
at scala.List.foreach(List.scala:834)
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.scala$tools$nsc$backend$jvm$GenJVM$BytecodeGenerator$$emitAttributes(GenJVM.scala:385)
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.addAnnotations(GenJVM.scala:432)
at scala.tools.nsc.backend.jvm.GenJVM$BytecodeGenerator.genClass(GenJVM.scala:219)
at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:55)
at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase$$anonfun$run$2.apply(GenJVM.scala:55)
at scala.Iterator$class.foreach(Iterator.scala:414)
at scala.collection.Map$$anon$6.foreach(Map.scala:123)
at scala.tools.nsc.backend.jvm.GenJVM$JvmPhase.run(GenJVM.scala:55)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:574)
at scala.tools.nsc.Global$Run.compile(Global.scala:667)
at scala.tools.eclipse.BuildCompiler.build(BuildCompiler.scala:114)
at scala.tools.eclipse.ScalaPlugin$ProjectImpl$class.build(ScalaPlugin.scala:405)
at scala.tools.eclipse.Driver$Project.build(Driver.scala:16)
at lampion.eclipse.Builder.build(Builder.scala:87)
at scala.tools.eclipse.Builder.build(Builder.scala:32)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:633)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Can anyone help me?
The build of the project worked for a few days but now I can not build
the entire project without the occurring of the exception mentioned
above.

Thanks in advance

Cheers,
Thomas

milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Exception from Scala Eclipse plugin during build

On Tue, Mar 31, 2009 at 7:46 PM, Thomas Pawlitzki
wrote:
> during the build of one of my scala projects the scala eclipse plugin
> logs an exception and abort the build.

Are you able to build your project successfully using the command line
tools (eg. via ANT)?

Cheers,

Miles

--
Miles Sabin
tel: +44 (0)1273 720 779
mobile: +44 (0)7813 944 528
skype: milessabin

Thomas Pawlitzki
Joined: 2009-01-07,
User offline. Last seen 42 years 45 weeks ago.
Re: Exception from Scala Eclipse plugin during build

Hello Miles,

I reduce my compiling problem to 1 single scala file.

After removing this file from my project I was able to build my project again.

And I have got a notion that this was an compiler issue and not a
eclipse plugin issue because i got the same exception with the scala
maven plugin.

I splitted the classes defined in the one single scala file now into
several scala files and compiler works now without any problem.

Cheers,
Thomas

On Tue, Mar 31, 2009 at 9:13 PM, Miles Sabin wrote:
> On Tue, Mar 31, 2009 at 7:46 PM, Thomas Pawlitzki
> wrote:
>> during the build of one of my scala projects the scala eclipse plugin
>> logs an exception and abort the build.
>
> Are you able to build your project successfully using the command line
> tools (eg. via ANT)?
>
> Cheers,
>
>
> Miles
>
> --
> Miles Sabin
> tel:    +44 (0)1273 720 779
> mobile: +44 (0)7813 944 528
> skype:  milessabin
>

ijuma
Joined: 2008-08-20,
User offline. Last seen 22 weeks 2 days ago.
Re: Exception from Scala Eclipse plugin during build

Hi Thomas,

On Wed, 2009-04-01 at 20:05 +0200, Thomas Pawlitzki wrote:
> Hello Miles,
>
> I reduce my compiling problem to 1 single scala file.
>
> After removing this file from my project I was able to build my project again.
>
> And I have got a notion that this was an compiler issue and not a
> eclipse plugin issue because i got the same exception with the scala
> maven plugin.

If you are able to reduce that problem to a self-contained test case,
please file a bug in trac.

Thanks,
Ismael

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland