Problem with scalac classpath

Hi,

I'm trying to load scala compiler project to intellij. I used template that one find in src/intellij folder. It uses locker compiler that I succesfully built using ant. I verified lockercomp lib and it's defined correctly (points to build/locker/classes/{compiler, library}). However, if I try compile scala library I get an error that suggests that scala library is not on compiler's classpath.

I looked into idea.log and found locker to be not on a classpath. Why intellij is not passing build/locker/classes/library to a classpath when running scala compiler? I'm using 0.4.1084 version of a plugin. See log attached below.


2011-05-31 20:38:10,195 [2192689]   INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED
2011-05-31 20:38:12,090 [2194584]  DEBUG - la.compiler.ScalacOutputParser - [search path for source files: ]
2011-05-31 20:38:12,090 [2194584]  DEBUG - la.compiler.ScalacOutputParser - [search path for source files: ]
2011-05-31 20:38:12,091 [2194585]  DEBUG - la.compiler.ScalacOutputParser - [search path for class files: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jconsole.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/management-agent.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/plugin.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/sa-jdi.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/alt-rt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar:/Users/grek/scalagwt/scalagwt-scala/out/production/library:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar:/Users/grek/scalagwt/scalagwt-scala/out/test/library:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar:/Users/grek/scalagwt/scalagwt-scala/lib/fjbg.jar:/Users/grek/scalagwt/scalagwt-scala/lib/jline.jar:/Users/grek/scalagwt/scalagwt-scala/lib/msil.jar:/Users/grek/scalagwt/scalagwt-scala/lib/forkjoin.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/javaws.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/dt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/deploy.jar]
2011-05-31 20:38:12,091 [2194585]  DEBUG - la.compiler.ScalacOutputParser - [search path for class files: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Resources/Java/JavaRuntimeSupport.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jce.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/charsets.jar:/System/Library/Java/Extensions/AppleScriptEngine.jar:/System/Library/Java/Extensions/dns_sd.jar:/System/Library/Java/Extensions/j3daudio.jar:/System/Library/Java/Extensions/j3dcore.jar:/System/Library/Java/Extensions/j3dutils.jar:/System/Library/Java/Extensions/jai_codec.jar:/System/Library/Java/Extensions/jai_core.jar:/System/Library/Java/Extensions/mlibwrapper_jai.jar:/System/Library/Java/Extensions/MRJToolkit.jar:/System/Library/Java/Extensions/QTJava.zip:/System/Library/Java/Extensions/vecmath.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/apple_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/dnsns.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/localedata.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunjce_provider.jar:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext/sunpkcs11.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jconsole.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/management-agent.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/plugin.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/sa-jdi.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/alt-rt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar:/Users/grek/scalagwt/scalagwt-scala/out/production/library:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar:/Users/grek/scalagwt/scalagwt-scala/out/test/library:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar:/Users/grek/scalagwt/scalagwt-scala/lib/fjbg.jar:/Users/grek/scalagwt/scalagwt-scala/lib/jline.jar:/Users/grek/scalagwt/scalagwt-scala/lib/msil.jar:/Users/grek/scalagwt/scalagwt-scala/lib/forkjoin.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/javaws.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/dt.jar:/System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/Deploy.bundle/Contents/Resources/Java/deploy.jar]
2011-05-31 20:38:12,861 [2195355]  DEBUG - la.compiler.ScalacOutputParser - [loaded package loader classes.jar in 574ms]
2011-05-31 20:38:12,861 [2195355]  DEBUG - la.compiler.ScalacOutputParser - [loaded package loader classes.jar in 574ms]
2011-05-31 20:38:12,889 [2195383]  DEBUG - la.compiler.ScalacOutputParser - [loaded package loader scala in 0ms]
2011-05-31 20:38:12,889 [2195383]  DEBUG - la.compiler.ScalacOutputParser - [loaded package loader scala in 0ms]
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser - error: java.lang.Error: typeConstructor inapplicable for <none>
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser - error: java.lang.Error: typeConstructor inapplicable for <none>
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:31)
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:31)
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Symbols$Symbol.typeConstructor(Symbols.scala:915)
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Symbols$Symbol.typeConstructor(Symbols.scala:915)
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.scala$reflect$internal$Definitions$definitions$$booltype(Definitions.scala:155)
2011-05-31 20:38:12,897 [2195391]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.scala$reflect$internal$Definitions$definitions$$booltype(Definitions.scala:155)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.init(Definitions.scala:809)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.init(Definitions.scala:809)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Global$Run.<init>(Global.scala:708)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Global$Run.<init>(Global.scala:708)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.process(Main.scala:105)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.process(Main.scala:105)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.main(Main.scala:123)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.main(Main.scala:123)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main.main(Main.scala)
2011-05-31 20:38:12,898 [2195392]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main.main(Main.scala)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at java.lang.reflect.Method.invoke(Method.java:597)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at java.lang.reflect.Method.invoke(Method.java:597)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:67)
2011-05-31 20:38:12,899 [2195393]  DEBUG - la.compiler.ScalacOutputParser -  at org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:67)
2011-05-31 20:38:12,900 [2195394]  DEBUG - la.compiler.ScalacOutputParser -
2011-05-31 20:38:12,900 [2195394]  DEBUG - la.compiler.ScalacOutputParser -
2011-05-31 20:38:12,900 [2195394]  DEBUG - la.compiler.ScalacOutputParser - Exception in thread "main" java.lang.RuntimeException: Compiler classes not found:
2011-05-31 20:38:12,900 [2195394]  DEBUG - la.compiler.ScalacOutputParser - Exception in thread "main" java.lang.RuntimeException: Compiler classes not found:
2011-05-31 20:38:12,900 [2195394]  DEBUG - la.compiler.ScalacOutputParser -  at org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:69)
2011-05-31 20:38:12,900 [2195394]  DEBUG - la.compiler.ScalacOutputParser -  at org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:69)
2011-05-31 20:38:12,901 [2195395]  DEBUG - la.compiler.ScalacOutputParser - Caused by: java.lang.reflect.InvocationTargetException
2011-05-31 20:38:12,901 [2195395]  DEBUG - la.compiler.ScalacOutputParser - Caused by: java.lang.reflect.InvocationTargetException
2011-05-31 20:38:12,902 [2195396]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2011-05-31 20:38:12,902 [2195396]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2011-05-31 20:38:12,902 [2195396]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2011-05-31 20:38:12,902 [2195396]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser -  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser -  at java.lang.reflect.Method.invoke(Method.java:597)
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser -  at java.lang.reflect.Method.invoke(Method.java:597)
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser -  at org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:67)
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser -  at org.jetbrains.plugins.scala.compiler.rt.ScalacRunner.main(ScalacRunner.java:67)
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser - Caused by: java.lang.Error: typeConstructor inapplicable for <none>
2011-05-31 20:38:12,903 [2195397]  DEBUG - la.compiler.ScalacOutputParser - Caused by: java.lang.Error: typeConstructor inapplicable for <none>
2011-05-31 20:38:12,904 [2195398]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:31)
2011-05-31 20:38:12,904 [2195398]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:31)
2011-05-31 20:38:12,905 [2195399]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Symbols$Symbol.typeConstructor(Symbols.scala:915)
2011-05-31 20:38:12,905 [2195399]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Symbols$Symbol.typeConstructor(Symbols.scala:915)
2011-05-31 20:38:12,905 [2195399]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.scala$reflect$internal$Definitions$definitions$$booltype(Definitions.scala:155)
2011-05-31 20:38:12,905 [2195399]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.scala$reflect$internal$Definitions$definitions$$booltype(Definitions.scala:155)
2011-05-31 20:38:12,907 [2195401]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.init(Definitions.scala:809)
2011-05-31 20:38:12,907 [2195401]  DEBUG - la.compiler.ScalacOutputParser -  at scala.reflect.internal.Definitions$definitions$.init(Definitions.scala:809)
2011-05-31 20:38:12,907 [2195401]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Global$Run.<init>(Global.scala:708)
2011-05-31 20:38:12,907 [2195401]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Global$Run.<init>(Global.scala:708)
2011-05-31 20:38:12,907 [2195401]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.process(Main.scala:105)
2011-05-31 20:38:12,907 [2195401]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.process(Main.scala:105)
2011-05-31 20:38:12,908 [2195402]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.main(Main.scala:123)
2011-05-31 20:38:12,908 [2195402]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main$.main(Main.scala:123)
2011-05-31 20:38:12,908 [2195402]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main.main(Main.scala)
2011-05-31 20:38:12,908 [2195402]  DEBUG - la.compiler.ScalacOutputParser -  at scala.tools.nsc.Main.main(Main.scala)
2011-05-31 20:38:12,908 [2195402]  DEBUG - la.compiler.ScalacOutputParser -  ... 5 more
2011-05-31 20:38:12,908 [2195402]  DEBUG - la.compiler.ScalacOutputParser -  ... 5 more
2011-05-31 20:38:12,933 [2195427]  DEBUG - la.compiler.ScalacOutputParser -
2011-05-31 20:38:12,933 [2195427]  DEBUG - la.compiler.ScalacOutputParser -
2011-05-31 20:38:12,934 [2195428]  DEBUG - la.compiler.ScalacOutputParser -
2011-05-31 20:38:12,934 [2195428]  DEBUG - la.compiler.ScalacOutputParser -
2011-05-31 20:38:13,248 [2195742]   INFO - lij.compiler.impl.CompilerUtil -  COMPILATION FINISHED; Errors: 20; warnings: 0 took 3053 ms: 0 min 3sec

2 comments
Comment actions Permalink

Make sure that the target directory that you're building you're library into is excluded from the 'sources' of the containing IntelliJ module.

Not sure if that will solve it, but I've run into it before when using the IntelliJ project files for scalac.

-jason

0
Comment actions Permalink

It turned out that you need locker's lib (scala library compiled at locker stage) to be present in project's dependencies and it's not enough to add as dependency to the locker compiler lib.

This seems to be different behaviour compared to what I saw a few months ago but I can live with that. Problem solved.

0

Please sign in to leave a comment.