sasuke
sasuke

Reputation: 6751

Intellij 15.0.5 issue with SBT and Scala project

I am trying to set up IntelliJ for my Scala development after hearing how much better it is compared to alternatives. But I can't seem to run anything. The problems I'm facing are as follows:

  1. As soon as the project is created, the console shows SBT failures
  2. My build.sbt file shows red wiggles (compile time errors)
  3. The confusing part is that opening the "SBT Console" view from within the IDE works fine.

The error trace is something along the lines of:

[info] Loading project definition from D:\workspaces\intellij\scala\untitled\project
java.io.IOException: The filename, directory name or volume label syntax is incorrect
[error] (*:update) java.io.IOException: The filename, directory name or volume label syntax is incorrect

Would anyone please know what can cause this? I have tried deleting the project and creating a new one but the problem still persists.

UPDATE

Just had a look at .sbt\boot\update.log and something seems fishy. Is it just me or the sbt.ivy.home is completely borked?

impossible to define new type: class not found: org.apache.ivy.osgi.obr.OBRResolver in [] nor Ivy classloader
impossible to define glob matcher: org.apache.ivy.plugins.matcher.GlobPatternMatcher was not found.
setting 'jline.esc.timeout' to '0'
setting 'sbt.ivy.home' to 'D:\software\installed\sbt\.ivy2 -Divy.home=D:\software\installed\sbt\.ivy2'
setting 'java.runtime.name' to 'Java(TM) SE Runtime Environment'

Upvotes: 2

Views: 486

Answers (1)

sasuke
sasuke

Reputation: 6751

I have finally managed to hunt down the root cause. The errors were due to rogue environment variables set in my profile related to SBT (specifically SBT_OPTS). Once I deleted all of them and started with a clean slate, things started working on expected.

Upvotes: 1

Related Questions