Why aren't any class files being generated for my Scala project?

I created a new project in IDEA by doing the following: created a new Java project with a Scala module, set the compiler path, created a new scala object with a main method, then selected Run from the context menu.

I got:

Exception in thread "main" java.lang.NoClassDefFoundError: com/blah/test/TestApp
Caused by: java.lang.ClassNotFoundException: com.blah.test.TestApp
 at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)



The status bar says "Compilation completed successfully" but when I run a "find ." in the project directory there are no class files at all.

Any idea why this is happening? Is there something else I have to configure?
0
9 comments

We'll need more information.

What are the settings on the "Scala Facet" page?

Donald

On 5/4/11 8:03 PM, Bill A wrote:

I created a new project in IDEA by doing the following: created a new Java project with a Scala module, set the compiler path, created a new scala object with a main method, then selected Run from the context menu.

>

I got:

>

Exception in thread "main" java.lang.NoClassDefFoundError: com/blah/test/TestApp
Caused by: java.lang.ClassNotFoundException: com.blah.test.TestApp
  at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

>

The status bar says "Compilation completed successfully" but when I run a "find ." in the project directory there are no class files at all.

>

Any idea why this is happening? Is there something else I have to configure?


0

Attached.



Attachment(s):
Scala Facet.png
0

That looks fine. What about the output path(s)?


On 5/4/11 9:14 PM, Bill A wrote:

Attached.

0

The defaults (attached). I tried the Inherit setting as well.

Note that I do have some Scala projects that work perfectly, but I seem to not be able to create new ones. I haven't changed my Scala install, so I'm wondering if there's some step that I'm leaving out. I've compared my project to other, working projects and I don't see any differences in the settings. I've tried to create another, fresh project and I see the same behavior.



Attachment(s):
Screen shot 2011-05-04 at May 4 2.08.47 PM.png
0

Still having this problem. I've attached a zip of the complete project.



Attachment(s):
BAR.zip
0

I've racked my brains but haven't been able to come up with anything.

If you have a paid license, you should probably file a support request.

On 5/5/11 8:01 PM, Bill A wrote:

Still having this problem. I've attached a zip of the complete project.


0

I turned off fsc support in global settings and now it works.

I have a paid license, so I may still contact support to see why that is.

Thanks for looking into it!

0

FSC support is not stable yet. We're going to significantly improve it after Scala 2.9 release.

I'm now trying to reproduce the problem with the sample project. Thank you for the reporting!

0

Thanks, Pavel!

0

Please sign in to leave a comment.