generate scaladoc for class with dependency

Hi,

I tried countless times to generate scaladoc for a class, but it always return the following message:
error: object apache is not a member of package org
import org.apache.commons.io.FileUtils

building the whole project is ok
generating scaladoc for class which don't import anything is ok too

commons-io-2.0.1.jar is displayed in "external libraries", I tried to include it as global library, project library and so on, but the result is always the same.
I use IntelliJ IDEA 11.0.1 and scala plug in 0.5.282

Any hint or alternative to generate scaladoc is very welcome

Sebastien

the full error message:
/usr/lib/jvm/java-6-sun/bin/java -Didea.launcher.port=7533 -Didea.launcher.bin.path=/home/seb/bin/idea-IC-111.69/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-6-sun/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun/jre/lib/alt-string.jar:/usr/lib/jvm/java-6-sun/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun/jre/lib/deploy.jar:/usr/lib/jvm/java-6-sun/jre/lib/plugin.jar:/usr/lib/jvm/java-6-sun/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun/jre/lib/management-agent.jar:/usr/lib/jvm/java-6-sun/jre/lib/javaws.jar:/usr/lib/jvm/java-6-sun/jre/lib/alt-rt.jar:/usr/lib/jvm/java-6-sun/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/localedata.jar:/home/seb/dev/jvmPlatform/NimpScalaLib/out/test/NimpScalaLib:/home/seb/dev/jvmPlatform/NimpScalaLib/out/production/NimpScalaLib:/home/seb/bin/idea-IC-111.69/lib/junit.jar:/home/seb/bin/scala/lib/scala-compiler.jar:/home/seb/bin/scala/lib/scala-library.jar:/home/seb/bin/scala/lib/scala-swing.jar:/home/seb/bin/scala/lib/scala-dbc.jar:/home/seb/bin/idea-IC-111.69/lib/junit-4.10.jar:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1.jar:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-sources.jar:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-javadoc.jar:/home/seb/bin/idea-IC-111.69/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain scala.tools.nsc.ScalaDoc -d /home/seb/dev/jvmPlatform/NimpScalaLib/out/artifacts/NimpScalaLib_jar/doc -classpath /home/seb/bin/scala/lib/scala-compiler.jar:/home/seb/bin/scala/lib/scala-library.jar:/home/seb/bin/idea-IC-111.69/lib/junit.jar!/:/home/seb/bin/scala/lib/scala-compiler.jar!/:/home/seb/bin/scala/lib/scala-library.jar!/:/home/seb/bin/scala/lib/scala-swing.jar!/:/home/seb/bin/scala/lib/scala-dbc.jar!/:/home/seb/bin/idea-IC-111.69/lib/junit-4.10.jar!/:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1.jar!/:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-sources.jar!/:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-javadoc.jar!/ -doc-title "NimpScalaLib documentation" /home/seb/dev/jvmPlatform/NimpScalaLib/src/uk/co/nimp/util/Shell.scala
/home/seb/dev/jvmPlatform/NimpScalaLib/src/uk/co/nimp/util/Shell.scala:3: error: object apache is not a member of package org
import org.apache.commons.io.FileUtils
           ^
/home/seb/dev/jvmPlatform/NimpScalaLib/src/uk/co/nimp/util/Shell.scala:3: error: erroneous or inaccessible type
import org.apache.commons.io.FileUtils
                          ^
two errors found
Exception in thread "main" java.lang.AssertionError: assertion failed: transformCaseApply: name = file tree = file / class scala.reflect.generic.Trees$Ident

4 comments
Comment actions Permalink

It is probably bug, try to use tomorrow's build

0
Comment actions Permalink

Hello,

Thanks for the answer, however I am still stuck :-S

I test this using a single file as scope:
package qndtests

/**
* Created by IntelliJ IDEA.
* User: seb
* Date: 1/20/12
* Time: 1:00 AM
* To change this template use File | Settings | File Templates.
*/
import org.apache.commons.io.FileUtils
import java.io.File

object testDoc {

  /**
   * Computes the checksum of a file using the CRC32 checksum routine. The value of the checksum is returned.
   * @return  the checksum value
   */
  def crc32(file: File): Long = {
    return FileUtils.checksumCRC32(file)
  }
}


With 0.5.328, in verbose mode, I get the following:


/usr/lib/jvm/java-6-sun/bin/java -Didea.launcher.port=7535 -Didea.launcher.bin.path=/home/seb/bin/idea-IC-111.69/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-6-sun/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun/jre/lib/alt-string.jar:/usr/lib/jvm/java-6-sun/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun/jre/lib/deploy.jar:/usr/lib/jvm/java-6-sun/jre/lib/plugin.jar:/usr/lib/jvm/java-6-sun/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun/jre/lib/management-agent.jar:/usr/lib/jvm/java-6-sun/jre/lib/javaws.jar:/usr/lib/jvm/java-6-sun/jre/lib/alt-rt.jar:/usr/lib/jvm/java-6-sun/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-6-sun/jre/lib/ext/localedata.jar:/home/seb/dev/jvmPlatform/NimpScalaLib/out/test/NimpScalaLib:/home/seb/dev/jvmPlatform/NimpScalaLib/out/production/NimpScalaLib:/home/seb/bin/idea-IC-111.69/lib/junit.jar:/home/seb/bin/scala/lib/scala-compiler.jar:/home/seb/bin/scala/lib/scala-library.jar:/home/seb/bin/scala/lib/scala-swing.jar:/home/seb/bin/scala/lib/scala-dbc.jar:/home/seb/bin/idea-IC-111.69/lib/junit-4.10.jar:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1.jar:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-sources.jar:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-javadoc.jar:/home/seb/bin/idea-IC-111.69/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain scala.tools.nsc.ScalaDoc -d /home/seb/dev/jvmPlatform/NimpScalaLib/out/artifacts/NimpScalaLib_jar/doc -classpath /home/seb/bin/scala/lib/scala-compiler.jar:/home/seb/bin/scala/lib/scala-library.jar:/home/seb/dev/jvmPlatform/NimpScalaLib/src:/home/seb/dev/jvmPlatform/NimpScalaLib/test:/home/seb/bin/scala/src/scala-compiler-src.jar!/:/home/seb/bin/scala/src/scala-library-src.jar!/:/home/seb/bin/scala/src/scala-swing-src.jar!/:/home/seb/bin/scala/src/scala-dbc-src.jar!/:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1.jar!/:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-sources.jar!/:/home/seb/dev/jvmPlatform/Libs/commons-io-2.0.1/commons-io-2.0.1-javadoc.jar!/ -verbose -doc-title "NimpScalaLib documentation" /home/seb/dev/jvmPlatform/NimpScalaLib/src/qndtests/testDoc.scala
[search path for source files: ]
[search path for class files: /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/resources.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jsse.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/jce.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/charsets.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/ext/localedata.jar:/home/seb/bin/scala/lib/scala-compiler.jar:/home/seb/bin/scala/lib/scala-library.jar:/home/seb/dev/jvmPlatform/NimpScalaLib/src:/home/seb/dev/jvmPlatform/NimpScalaLib/test]
[loaded package loader resources.jar in 251ms]
[loaded package loader java in 1ms]
[loaded package loader lang in 10ms]
[loaded package loader reflect in 7ms]
[loaded package loader annotation in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/package.class) in 105ms]
[loaded package loader scala in 180ms]
[loaded package loader io in 7ms]
[loaded package loader reflect in 1ms]
[loaded package loader net in 8ms]
[loaded package loader security in 8ms]
[loaded package loader sun in 1ms]
[loaded package loader reflect in 5ms]
[loaded class file /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar(java/lang/Object.class) in 3ms]
[loaded package loader util in 13ms]
[loaded package loader annotation in 1ms]
[loaded package loader annotation in 1ms]
[loaded class file /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar(java/lang/Class.class) in 111ms]
[loaded package loader nio in 4ms]
[loaded package loader charset in 1ms]
[loaded class file /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar(java/lang/String.class) in 23ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/runtime/package.class) in 2ms]
[loaded package loader runtime in 10ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/package.class) in 1ms]
[loaded package loader collection in 20ms]
[dropping dependency on node with no phase object: constructors]
[dropping dependency on node with no phase object: dce]
[parsing testDoc.scala]
[parser in 78ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/Predef.class) in 14ms]
[loaded package loader qndtests in 0ms]
[namer in 64ms]
[packageobjects in 1ms]
[loaded package loader org in 1ms]
/home/seb/dev/jvmPlatform/NimpScalaLib/src/qndtests/testDoc.scala:10: error: object apache is not a member of package org
import org.apache.commons.io.FileUtils
           ^
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/ScalaObject.class) in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/annotation/ClassfileAnnotation.class) in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/annotation/Annotation.class) in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/annotation/StaticAnnotation.class) in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/immutable/package.class) in 3ms]
[loaded package loader immutable in 36ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/immutable/List.class) in 24ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/generic/package.class) in 10ms]
[loaded package loader generic in 14ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/generic/SeqFactory.class) in 2ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/generic/GenSeqFactory.class) in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/generic/GenTraversableFactory.class) in 10ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/generic/GenericCompanion.class) in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/generic/TraversableFactory.class) in 12ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/collection/generic/GenericSeqCompanion.class) in 1ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/Array.class) in 7ms]
[loaded class file /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar(java/io/Serializable.class) in 1ms]
[loaded class file /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar(java/lang/Cloneable.class) in 0ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/LowPriorityImplicits.class) in 3ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/Long.class) in 5ms]
[loaded class file /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar(java/lang/Long.class) in 8ms]
[loaded class file /usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/rt.jar(java/io/File.class) in 9ms]
[loaded class file /home/seb/bin/scala/lib/scala-library.jar(scala/AnyVal.class) in 1ms]
[typer in 252ms]
[superaccessors in 13ms]
/home/seb/dev/jvmPlatform/NimpScalaLib/src/qndtests/testDoc.scala:10: error: erroneous or inaccessible type
import org.apache.commons.io.FileUtils
                          ^
[pickler in 4ms]
two errors found
Exception in thread "main" java.lang.AssertionError: assertion failed: transformCaseApply: name = file tree = file / class scala.reflect.generic.Trees$Ident
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$2.apply$mcV$sp(RefChecks.scala:1493)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformCaseApply(RefChecks.scala:1309)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1491)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.collection.immutable.List.loop$1(List.scala:117)
    at scala.collection.immutable.List.mapConserve(List.scala:133)
    at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:873)
    at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:837)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1517)
    at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:825)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1517)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:783)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$5.apply(Trees.scala:781)
    at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
    at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:780)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1517)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1130)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1030)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1030)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
    at scala.collection.immutable.List.flatMap(List.scala:45)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1030)
    at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:797)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1517)
    at scala.tools.nsc.ast.Trees$Transformer.transformTemplate(Trees.scala:875)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:767)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$2.apply(Trees.scala:766)
    at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
    at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:765)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1517)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transformTrees$1.apply(Trees.scala:873)
    at scala.collection.immutable.List.loop$1(List.scala:117)
    at scala.collection.immutable.List.mapConserve(List.scala:133)
    at scala.tools.nsc.ast.Trees$Transformer.transformTrees(Trees.scala:873)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.eliminateModuleDefs(RefChecks.scala:1078)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStat(RefChecks.scala:1115)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1030)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer$$anonfun$transformStats$1.apply(RefChecks.scala:1030)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
    at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
    at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
    at scala.collection.immutable.List.foreach(List.scala:45)
    at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
    at scala.collection.immutable.List.flatMap(List.scala:45)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transformStats(RefChecks.scala:1030)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
    at scala.tools.nsc.ast.Trees$Transformer$$anonfun$transform$1.apply(Trees.scala:761)
    at scala.tools.nsc.ast.Trees$Transformer.atOwner(Trees.scala:899)
    at scala.tools.nsc.ast.Trees$Transformer.transform(Trees.scala:760)
    at scala.tools.nsc.typechecker.RefChecks$RefCheckTransformer.transform(RefChecks.scala:1517)
    at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:892)
    at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:329)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:297)
    at scala.collection.Iterator$class.foreach(Iterator.scala:660)
    at scala.collection.mutable.ListBuffer$$anon$1.foreach(ListBuffer.scala:316)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:297)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:953)
    at scala.tools.nsc.Global$Run.compile(Global.scala:1038)
    at scala.tools.nsc.doc.DocFactory.makeUniverse(DocFactory.scala:49)
    at scala.tools.nsc.doc.DocFactory.generate$1(DocFactory.scala:108)
    at scala.tools.nsc.doc.DocFactory.document(DocFactory.scala:120)
    at scala.tools.nsc.ScalaDoc.process(ScalaDoc.scala:48)
    at scala.tools.nsc.ScalaDoc$.main(ScalaDoc.scala:74)
    at scala.tools.nsc.ScalaDoc.main(ScalaDoc.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)

Process finished with exit code 1

0
Comment actions Permalink

Should work now, try  tomorrow's build :)

0
Comment actions Permalink

Problem is fixed with 0.5.373 :)

0

Please sign in to leave a comment.