Some classes are not compiled in plugin project

41 views
Skip to first unread message

Muki

unread,
Nov 16, 2011, 9:22:01 AM11/16/11
to Scala IDE User
Hi,

I have a strange errors:

[1] Suddenly in a single plugin-project all .java files weren't
compiled.
Clean build all didn't do anything, launching the application failed
too.

[2] I changed one .java class to a .scala class. Now this class didn't
get compiled either.

[3] I changed the ordering in to javaThenScala and scalaThenJava
and now only .scala files aren't compiled.

It affects always the same files. I can't really say why this error
suddenly appeared. The scala compiler prints on the progress-view
"compiling xyz.scala" and "copying ressource" to output.

I have a git repository and my project lies in a subfolder of my
workspace.

thx,
Muki

iulian dragos

unread,
Nov 16, 2011, 9:38:13 AM11/16/11
to scala-i...@googlegroups.com
Do you have any special compiler options, such as continuations?
--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Muki

unread,
Nov 16, 2011, 9:43:47 AM11/16/11
to Scala IDE User
Nope. Didn't change anything in the compiler options.

The behaviour changes if I delete and/or create the
"BundleActivator" which is an OSGi specific class.
I had never problems with this.

iulian dragos

unread,
Nov 16, 2011, 10:42:54 AM11/16/11
to scala-i...@googlegroups.com
On Wed, Nov 16, 2011 at 3:43 PM, Muki <nepomuk...@googlemail.com> wrote:
Nope. Didn't change anything in the compiler options.

The behaviour changes if I delete and/or create the
"BundleActivator" which is an OSGi specific class.
I had never problems with this.

This sounds serious. Is your project open source? 

Muki

unread,
Nov 16, 2011, 1:35:51 PM11/16/11
to Scala IDE User
Sorry for the delayed answer. Yes, this project is open source.

https://github.com/knowing/Medmon/wiki/GettingStarted
This is a short guide how to checkout the project and run it.

I run this on Eclipse 3.7.1, Ubuntu 64bit, Oracle Java 7
I did a complete resetup of the project and the exact error appeard.
I will try this on windows, too.

cheers,
Muki

On 16 Nov., 16:42, iulian dragos <jagua...@gmail.com> wrote:

Muki

unread,
Nov 16, 2011, 3:01:57 PM11/16/11
to Scala IDE User
There's a second spurious error:
When I create a new Activator.scala in a subpackage the Scala Compiler
says:
"Activator is already defined class Activator"
"Activator is already defined object Activator"

iulian dragos

unread,
Nov 16, 2011, 3:44:40 PM11/16/11
to scala-i...@googlegroups.com
I will have a look at your project tomorrow. Is this error an editor error, or it appears in the Problems view (build error)? Did you have a similar class/object before that you deleted? Can you reproduce this error reliably (aka each time you create this file)? In what package do you add it?

iulian

Muki

unread,
Nov 16, 2011, 4:48:22 PM11/16/11
to Scala IDE User
There are errors in the "Problems View" if only .java files get
compiled,
as some references can not be satifsfied.

There are no erros in the Problems View if the .scala files get
compiled.

When I check out the project and rebuild it, then only the scala files
get compiled.

I always check the /bin folder if all classes got compiled.

NOTE: I tried to reproduce this on windows without "luck".
I think this problem seems to be related to my "Ubuntu 11.04 64bit"
installation.

Thx for having a look

Muki

unread,
Nov 16, 2011, 6:03:27 PM11/16/11
to Scala IDE User
Update:
Checkout project as mentioned.
[1] Only scala classes are being compiled
[2] Deleting Activator.java in the root package leads to compiles java
and scala, but not all

iulian dragos

unread,
Nov 17, 2011, 5:41:44 AM11/17/11
to scala-i...@googlegroups.com
Unfortunately I cannot install the required dependencies. I get the same error while installing Sapphire:

Muki

unread,
Nov 17, 2011, 6:04:08 AM11/17/11
to Scala IDE User
You need Eclipse 3.7.1 to do this. I use the "Eclipse RCP and RAP"
product.
Do not use the Ubuntu-Repo Installation.

On 17 Nov., 11:41, iulian dragos <jagua...@gmail.com> wrote:
> Unfortunately I cannot install the required dependencies. I get the same
> error while installing Sapphire:
>
> http://marketplace.eclipse.org/node/133214
>

iulian dragos

unread,
Nov 17, 2011, 6:13:37 AM11/17/11
to scala-i...@googlegroups.com
On Thu, Nov 17, 2011 at 12:04 PM, Muki <nepomuk...@googlemail.com> wrote:
You need Eclipse 3.7.1 to do this. I use the "Eclipse RCP and RAP"
product.
Do not use the Ubuntu-Repo Installation.

Hm, that's a big issue, because the IDE depends on 3.6 so I can't debug it running under 3.7... or maybe I could, I have to tinker a bit with remote debugging.

It'd be great if we could narrow it down a little. The most important problem is that it doesn't build Scala files. Can you please try to enable, in Scala compiler preferences, both 'verbose' and -Ybuild-manager-debug (that's on the Private tab) and see if there's any error when instantiating the compiler, for instance a bad option.

cheers,
iulian
 

On 17 Nov., 11:41, iulian dragos <jagua...@gmail.com> wrote:
> Unfortunately I cannot install the required dependencies. I get the same
> error while installing Sapphire:
>
> http://marketplace.eclipse.org/node/133214
>
> On Thu, Nov 17, 2011 at 12:03 AM, Muki <nepomuk.sei...@googlemail.com>wrote:
>
> > Update:
> > Checkout project as mentioned.
> > [1] Only scala classes are being compiled
> > [2] Deleting Activator.java in the root package leads to compiles java
> > and scala, but not all
>
> --
> « Je déteste la montagne, ça cache le paysage »
> Alphonse Allais

Muki

unread,
Nov 17, 2011, 6:35:57 AM11/17/11
to Scala IDE User
Okay. I will do this tonight an post my reply tomorrow.

On 17 Nov., 12:13, iulian dragos <jagua...@gmail.com> wrote:

Muki

unread,
Nov 17, 2011, 5:53:14 PM11/17/11
to Scala IDE User
I added the specific compiler options here's the log:
http://dl.dropbox.com/u/2654300/compiler.log

Sorry I didn't found this earlier, but it looks like the Scala
Compiler
crashes because the class-filename is too long and cannot be created.
Almost nothing works if I say "JavaThenScala" a NullPointerException
appears:
http://dl.dropbox.com/u/2654300/compiler2.log

That's why the error is only related to Ubuntu as on ext4 the maximum
filename-length is limited to 255 bytes. However I'm curious why this
appeared just yet.

Mirco Dotta

unread,
Nov 18, 2011, 1:47:03 AM11/18/11
to scala-i...@googlegroups.com
Hi Muki,

The NPE you are seeing in the log 

scala.tools.eclipse.jcompiler.ScalaMethodVerifierProvider$$anonfun$scala$tools$eclipse$jcompiler$ScalaMethodVerifierProvider$$getActiveScalaProject$1.apply(ScalaMethodVerifierProvider.scala:51)


have been addressed (there will be a RC2 very soon).

In fact, you could try using the following nightly


which is very close to be what we are going to deliver for the RC2. All those NPE should 
just go away. Please, report any problem you may see  if you decide to give it a spin.

On the other hand, the following error is somewhat unexpected
MESSAGE Crash in the Scala build compiler.
!STACK 1
org.eclipse.core.runtime.CoreException: Could not write file: /home/muki/Development/workspace_knowing/Medmon/de.sendsor.accelerationSensor/bin/de/sendsor/accelerationSensor/algorithm/moennig/lda/LDAFilterScala$$anonfun$de$sendsor$accelerationSensor$algorithm$moennig$lda$LDAFilterScala$$getCovarianceMatrix$1$$anonfun$apply$mcVI$sp$10.class.
	at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
	at org.eclipse.core.internal.filesystem.local.LocalFile.openOutputStream(LocalFile.java:391)

It looks like Eclipse can't write the binaries in the output folder. Maybe it's a privilege issue with the output directory. What do you think?


Cheers,
  Mirco

Muki

unread,
Nov 18, 2011, 4:05:59 AM11/18/11
to Scala IDE User
Hi Mirco,

> have been addressed (there will be a RC2 very soon).
Awesome!

> On the other hand, the following error is somewhat unexpected
> MESSAGE Crash in the Scala build compiler.
> !STACK 1
> org.eclipse.core.runtime.CoreException: Could not write file: /home/muki/Development/workspace_knowing/Medmon/de.sendsor.accelerationSens or/bin/de/sendsor/accelerationSensor/algorithm/moennig/lda/LDAFilterScala$$ anonfun$de$sendsor$accelerationSensor$algorithm$moennig$lda$LDAFilterScala$ $getCovarianceMatrix$1$$anonfun$apply$mcVI$sp$10.class.
>         at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
>         at org.eclipse.core.internal.filesystem.local.LocalFile.openOutputStream(Local File.java:391)
>
> It looks like Eclipse can't write the binaries in the output folder. Maybe it's a privilege issue with the output directory. What do you think?
>

I mentioned this before. Ubuntu just have a maximum filename length of
255bytes. I deleted this particular class ("LDAFilterScala.scala")
and everything worked fine afterwards. The root Exception is a
"FileNotFoundException". IMHO this should be catched somewhere
and give as an output to the user. I normally only use the "Problems
View" and not the "Error Log" where the error was shown.

I don't know too long class-names should be a general concern for
Scala. However "LDAFilterScala$$ anonfun$de$sendsor$accelerationSensor
$algorithm$moennig$lda$LDAFilterScala$ $getCovarianceMatrix$1$$anonfun
$apply$mcVI$sp$10.class" is a damn long class name :P

thx,
Muki

Mirco Dotta

unread,
Nov 18, 2011, 8:12:33 AM11/18/11
to scala-i...@googlegroups.com
However "LDAFilterScala$$ anonfun$de$sendsor$accelerationSensor
$algorithm$moennig$lda$LDAFilterScala$ $getCovarianceMatrix$1$$anonfun
$apply$mcVI$sp$10.class" is a damn long class name :P

LOL! :))


---------------
Mirco Dotta
Typesafe - Enterprise-Grade Scala from the Experts 
PSE-D, 1015 Lausanne, Switzerland
Twitter: @mircodotta








Reply all
Reply to author
Forward
0 new messages