Bug 178743 - Build fails: scala.tools.nsc.MissingRequirementError: object scala not found
Build fails: scala.tools.nsc.MissingRequirementError: object scala not found
Product: contrib
Classification: Unclassified
Component: Scala
PC Windows XP
: P2 (vote)
Assigned To: _ dcaoyuan
Depends on:
  Show dependency treegraph
Reported: 2009-12-16 09:42 UTC by sanjay_dasgupta
Modified: 2011-11-16 16:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description sanjay_dasgupta 2009-12-16 09:42:25 UTC
I have just downloaded the brand-new Netbeans 6.8 release, and am using the Scala plugin downloaded in file "nb-scala-6.8v1.1.0rc1.zip". My JDK version is build "1.6.0_17-b04".

When I try to "clean & build" any Scala source file (even a small 5-line) "Hello world" program, the following error is given. The Scala development facility is not usable at all for any Scala project or source.

Deleting directory D:\Things\ScalaNetBeans\One\build
Created dir: D:\Things\ScalaNetBeans\One\build\classes
Compiling 1 source file to D:\Things\ScalaNetBeans\One\build\classes
scala.tools.nsc.MissingRequirementError: object scala not found.
        at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass(Definitions.scala:509)
        at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackage(Definitions.scala:43)
        at scala.tools.nsc.symtab.Definitions$definitions$.ScalaPackageClass(Definitions.scala:44)
        at scala.tools.nsc.symtab.Definitions$definitions$.UnitClass(Definitions.scala:86)
        at scala.tools.nsc.symtab.Definitions$definitions$.init(Definitions.scala:765)
        at scala.tools.nsc.Global$Run.<init>(Global.scala:620)
        at scala.tools.nsc.Main$.process(Main.scala:108)
        at scala.tools.nsc.Main$.main(Main.scala:123)
        at scala.tools.nsc.Main.main(Main.scala)
error: fatal error: object scala not found.
D:\Things\ScalaNetBeans\One\nbproject\build-impl.xml:422: The following error occurred while executing this line:
D:\Things\ScalaNetBeans\One\nbproject\build-impl.xml:255: Compilation failed because of an internal compiler error; see the error output for details.
BUILD FAILED (total time: 2 seconds)
Comment 1 sanjay_dasgupta 2009-12-20 20:50:00 UTC
This problem can be avoided by installing Scala in a directory path without embedded spaces.

In my case (on Windows XP), the problem went away when I moved the Scala installation from "C:\Program Files\Scala-2.8.0" to "C:\Scala-2.8.0"

The need to avoid directory paths with embedded spaces has been mentioned in other contexts (project directory, and Netbeans installation directory), but the problem appears to more pervasive, and possibly applies to directories in general.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo