- changed status to on hold
Reading a Jar (Project) fails instantly
I tried this in the published 1.1.0-SNAPSHOT:
val p = Project(dummyFile, org.opalj.bytecode.RTJar)
val projectMethods = p.allProjectClassFiles.flatMap(cf => cf.methods)
And received a very log stack trace looking like this:
[error][class file reader] class java.lang.NoSuchMethodError: org.opalj.collection.immutable.IntTrieSet.foreach(Lscala/Function1;)V
[error][class file reader] org.opalj.br.reader.BytecodeOptimizer.optimizeInstructions(BytecodeOptimizer.scala:402)
[error][class file reader] org.opalj.br.reader.BytecodeOptimizer.optimizeInstructions$(BytecodeOptimizer.scala:141)
[error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.optimizeInstructions(Java8FrameworkWithCaching.scala:42)
[error][class file reader] org.opalj.br.reader.BytecodeOptimizer.$anonfun$Method_Info$1(BytecodeOptimizer.scala:130)
[error][class file reader] org.opalj.br.reader.BytecodeOptimizer.$anonfun$Method_Info$1$adapted(BytecodeOptimizer.scala:129)
[error][class file reader] scala.Option.foreach(Option.scala:257)
[error][class file reader] org.opalj.br.reader.BytecodeOptimizer.Method_Info(BytecodeOptimizer.scala:129)
[error][class file reader] org.opalj.br.reader.BytecodeOptimizer.Method_Info$(BytecodeOptimizer.scala:122)
[error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Method_Info(Java8FrameworkWithCaching.scala:42)
[error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Method_Info(Java8FrameworkWithCaching.scala:42)
[error][class file reader] org.opalj.bi.reader.MethodsReader.Method_Info(MethodsReader.scala:86)
[error][class file reader] org.opalj.bi.reader.MethodsReader.Methods(MethodsReader.scala:76)
[error][class file reader] org.opalj.bi.reader.MethodsReader.Methods$(MethodsReader.scala:73)
[error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Methods(Java8FrameworkWithCaching.scala:42)
[error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Methods(Java8FrameworkWithCaching.scala:42)
[error][class file reader] org.opalj.bi.reader.ClassFileReader.ClassFile(ClassFileReader.scala:266)
[error][class file reader] org.opalj.bi.reader.ClassFileReader.ClassFile$(ClassFileReader.scala:238)
...
Comments (11)
-
repo owner -
reporter - attached test.jar
Jar File used
-
reporter I cleared my ivy cache and sbt downloaded the dependencies new. I still get the same error:
[error][class file reader] class java.lang.NoSuchMethodError: org.opalj.collection.immutable.IntTrieSet.foreach(Lscala/Function1;)V [error][class file reader] org.opalj.br.reader.BytecodeOptimizer.optimizeInstructions(BytecodeOptimizer.scala:402) [error][class file reader] org.opalj.br.reader.BytecodeOptimizer.optimizeInstructions$(BytecodeOptimizer.scala:141) [error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.optimizeInstructions(Java8FrameworkWithCaching.scala:42) [error][class file reader] org.opalj.br.reader.BytecodeOptimizer.$anonfun$Method_Info$1(BytecodeOptimizer.scala:130) [error][class file reader] org.opalj.br.reader.BytecodeOptimizer.$anonfun$Method_Info$1$adapted(BytecodeOptimizer.scala:129) [error][class file reader] scala.Option.foreach(Option.scala:257) [error][class file reader] org.opalj.br.reader.BytecodeOptimizer.Method_Info(BytecodeOptimizer.scala:129) [error][class file reader] org.opalj.br.reader.BytecodeOptimizer.Method_Info$(BytecodeOptimizer.scala:122) [error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Method_Info(Java8FrameworkWithCaching.scala:42) [error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Method_Info(Java8FrameworkWithCaching.scala:42) [error][class file reader] org.opalj.bi.reader.MethodsReader.Method_Info(MethodsReader.scala:86) [error][class file reader] org.opalj.bi.reader.MethodsReader.Methods(MethodsReader.scala:76) [error][class file reader] org.opalj.bi.reader.MethodsReader.Methods$(MethodsReader.scala:73) [error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Methods(Java8FrameworkWithCaching.scala:42) [error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.Methods(Java8FrameworkWithCaching.scala:42) [error][class file reader] org.opalj.bi.reader.ClassFileReader.ClassFile(ClassFileReader.scala:266) [error][class file reader] org.opalj.bi.reader.ClassFileReader.ClassFile$(ClassFileReader.scala:238) [error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.ClassFile(Java8FrameworkWithCaching.scala:42) [error][class file reader] org.opalj.bi.reader.ClassFileReader.$anonfun$ClassFile$3(ClassFileReader.scala:339) [error][class file reader] org.opalj.io.package$.process(package.scala:170) [error][class file reader] org.opalj.bi.reader.ClassFileReader.ClassFile(ClassFileReader.scala:338) [error][class file reader] org.opalj.bi.reader.ClassFileReader.ClassFile$(ClassFileReader.scala:337) [error][class file reader] org.opalj.br.reader.Java8FrameworkWithCaching.ClassFile(Java8FrameworkWithCaching.scala:42) [error][class file reader] org.opalj.bi.reader.ClassFileReader.$anonfun$ClassFiles$2(ClassFileReader.scala:463) [error][class file reader] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12) [error][class file reader] scala.concurrent.Future$.$anonfun$apply$1(Future.scala:654) [error][class file reader] scala.util.Success.$anonfun$map$1(Try.scala:251) [error][class file reader] scala.util.Success.map(Try.scala:209) [error][class file reader] scala.concurrent.Future.$anonfun$map$1(Future.scala:288) [error][class file reader] scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29) [error][class file reader] scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29) [error][class file reader] scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60) [error][class file reader] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [error][class file reader] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [error][class file reader] java.lang.Thread.run(Thread.java:745) [error][class file reader] processing org/codehaus/yom/XPathException.class failed [error][class file reader]
-
reporter One other observation... The br package for the SNAPSHOT seems to be older than some other packages: https://oss.sonatype.org/content/repositories/snapshots/de/opal-project/bytecode-representation_2.12/1.1.0-SNAPSHOT/
-
repo owner I just tested it again with the attached jar and can't reproduce the bug with the latest development version ; however, I will investigate the issue with the incorrect version informations tomorrow when I'm back in the office.
-
repo owner I‘ve just updated the snapshot again - now the versions match; please, try again. I‘m sorry for the trouble!
-
reporter This now works for me... However, huge refactorings since 1.0.0. Have to to adjust my client code at lot. ;)
-
reporter - changed status to closed
Snapshot publication seems to be working now.
-
repo owner Hi, if you have any questions related to the "refactorings", please let me know. I'm not aware that we made significant changes...
-
repo owner -
assigned issue to
-
assigned issue to
-
repo owner - removed version
Removing version: 1.1.0 (automated comment)
- Log in to comment
I can't reproduce the behavior; however, I just updated the snapshot.
Please, go to your .ivy folder and delete in local and cache everything related to OPAL. Sometimes weird things happen.