ckjm
ckjm copied to clipboard
Error obtaining all superclasses of public class
Hi,
I have done the following:
- downloaded the following version of DaCapo: dacapo-9.12-bach-MR1 RELEASE NOTES 2018-01-13
- downloaded ckjm from the official website by clicking on the (ckjm package - .tar.gz)[https://www.spinellis.gr/sw/ckjm/ckjm-1.9.tar.gz] link
- extracted the
sunflow-0.07.2.jar
file from thedacapo.jar
file with the following command:jar xf dacapo.jar jar/sunflow-0.07.2.jar
- extracted the
.class
files from thesunflow-0.07.2.jar
file with the following command:jar xf sunflow-0.07.2.jar
- use the following command outlined in ckjm documentation:
find build -name '*.class' -print | java -jar /usr/local/lib/ckjm.jar
And I receive the following output:
$ find jar/ -name '*.class' -print | java -jar ckjm-1.9/build/ckjm-1.9.jar
Error obtaining all superclasses of public class org.sunflow.core.tesselatable.Teapot extends org.sunflow.core.tesselatable.BezierMesh
filename jar/org/sunflow/core/tesselatable/Teapot.class
compiled from Teapot.java
compiler version 52.0
access flags 33
constant pool 119 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(Teapot.java)
1 fields:
private static final float[][] PATCHES
2 methods:
public void <init>()
static void <clinit>()
Error obtaining all superclasses of public class org.sunflow.core.tesselatable.Gumbo extends org.sunflow.core.tesselatable.BezierMesh
filename jar/org/sunflow/core/tesselatable/Gumbo.class
compiled from Gumbo.java
compiler version 52.0
access flags 33
constant pool 2028 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(Gumbo.java)
InnerClass:public static org.sunflow.system.Parser$ParserException("org.sunflow.system.Parser", "ParserException")
1 fields:
private static final float[][] PATCHES
4 methods:
public static void main(String[] args)
private static float[] parseFloatArray(org.sunflow.system.Parser p)
throws java.io.IOException
public void <init>()
static void <clinit>()
Error obtaining all superclasses of public final class org.sunflow.core.Options extends org.sunflow.core.ParameterList
implements org.sunflow.core.RenderObject
filename jar/org/sunflow/core/Options.class
compiled from Options.java
compiler version 52.0
access flags 49
constant pool 71 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(Options.java)
InnerClass:public static org.sunflow.util.FastHashMap$Entry("org.sunflow.util.FastHashMap", "Entry")
InnerClass:protected static final org.sunflow.core.ParameterList$Parameter("org.sunflow.core.ParameterList", "Parameter")
2 methods:
public void <init>()
public boolean update(org.sunflow.core.ParameterList pl, org.sunflow.SunflowAPI api)
Error obtaining all superclasses of public class org.sunflow.core.shader.TexturedWardShader extends org.sunflow.core.shader.AnisotropicWardShader
filename jar/org/sunflow/core/shader/TexturedWardShader.class
compiled from TexturedWardShader.java
compiler version 52.0
access flags 33
constant pool 78 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(TexturedWardShader.java)
1 fields:
private org.sunflow.core.Texture tex
3 methods:
public void <init>()
public boolean update(org.sunflow.core.ParameterList pl, org.sunflow.SunflowAPI api)
public org.sunflow.image.Color getDiffuse(org.sunflow.core.ShadingState state)
Error obtaining all superclasses of public class org.sunflow.core.shader.TexturedShinyDiffuseShader extends org.sunflow.core.shader.ShinyDiffuseShader
filename jar/org/sunflow/core/shader/TexturedShinyDiffuseShader.class
compiled from TexturedShinyDiffuseShader.java
compiler version 52.0
access flags 33
constant pool 78 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(TexturedShinyDiffuseShader.java)
1 fields:
private org.sunflow.core.Texture tex
3 methods:
public void <init>()
public boolean update(org.sunflow.core.ParameterList pl, org.sunflow.SunflowAPI api)
public org.sunflow.image.Color getDiffuse(org.sunflow.core.ShadingState state)
Error obtaining all superclasses of public class org.sunflow.core.shader.TexturedAmbientOcclusionShader extends org.sunflow.core.shader.AmbientOcclusionShader
filename jar/org/sunflow/core/shader/TexturedAmbientOcclusionShader.class
compiled from TexturedAmbientOcclusionShader.java
compiler version 52.0
access flags 33
constant pool 78 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(TexturedAmbientOcclusionShader.java)
1 fields:
private org.sunflow.core.Texture tex
3 methods:
public void <init>()
public boolean update(org.sunflow.core.ParameterList pl, org.sunflow.SunflowAPI api)
public org.sunflow.image.Color getBrightColor(org.sunflow.core.ShadingState state)
Error obtaining all superclasses of public class org.sunflow.core.shader.TexturedDiffuseShader extends org.sunflow.core.shader.DiffuseShader
filename jar/org/sunflow/core/shader/TexturedDiffuseShader.class
compiled from TexturedDiffuseShader.java
compiler version 52.0
access flags 33
constant pool 78 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(TexturedDiffuseShader.java)
1 fields:
private org.sunflow.core.Texture tex
3 methods:
public void <init>()
public boolean update(org.sunflow.core.ParameterList pl, org.sunflow.SunflowAPI api)
public org.sunflow.image.Color getDiffuse(org.sunflow.core.ShadingState state)
Error obtaining all superclasses of public class org.sunflow.core.shader.TexturedPhongShader extends org.sunflow.core.shader.PhongShader
filename jar/org/sunflow/core/shader/TexturedPhongShader.class
compiled from TexturedPhongShader.java
compiler version 52.0
access flags 33
constant pool 78 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(TexturedPhongShader.java)
1 fields:
private org.sunflow.core.Texture tex
3 methods:
public void <init>()
public boolean update(org.sunflow.core.ParameterList pl, org.sunflow.SunflowAPI api)
public org.sunflow.image.Color getDiffuse(org.sunflow.core.ShadingState state)
Error obtaining all superclasses of public class org.sunflow.core.light.TriangleMeshLight extends org.sunflow.core.primitive.TriangleMesh
implements org.sunflow.core.Shader
filename jar/org/sunflow/core/light/TriangleMeshLight.class
compiled from TriangleMeshLight.java
compiler version 52.0
access flags 33
constant pool 209 entries
ACC_SUPER flag true
Attribute(s):
SourceFile(TriangleMeshLight.java)
InnerClass:private org.sunflow.core.light.TriangleMeshLight$TriangleLight("org.sunflow.core.light.TriangleMeshLight", "TriangleLight")
2 fields:
private org.sunflow.image.Color radiance
private int numSamples
49 methods:
public void <init>()
public boolean update(org.sunflow.core.ParameterList pl, org.sunflow.SunflowAPI api)
public void init(String name, org.sunflow.SunflowAPI api)
public org.sunflow.image.Color getRadiance(org.sunflow.core.ShadingState state)
public void scatterPhoton(org.sunflow.core.ShadingState state, org.sunflow.image.Color power)
static synthetic int[] access$000(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$100(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$200(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic org.sunflow.math.Point3 access$300(org.sunflow.core.light.TriangleMeshLight x0, int x1)
static synthetic org.sunflow.math.Point3 access$400(org.sunflow.core.light.TriangleMeshLight x0, int x1)
static synthetic org.sunflow.math.Point3 access$500(org.sunflow.core.light.TriangleMeshLight x0, int x1)
static synthetic int access$600(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$700(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$800(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$900(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1000(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1100(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1200(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1300(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1400(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1500(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1600(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1700(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1800(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$1900(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$2000(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$2100(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$2200(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$2300(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$2400(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$2500(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic org.sunflow.math.Point3 access$2600(org.sunflow.core.light.TriangleMeshLight x0, int x1)
static synthetic int[] access$2700(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic org.sunflow.math.Point3 access$2800(org.sunflow.core.light.TriangleMeshLight x0, int x1)
static synthetic int[] access$2900(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic org.sunflow.math.Point3 access$3000(org.sunflow.core.light.TriangleMeshLight x0, int x1)
static synthetic org.sunflow.image.Color access$3100(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$3200(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$3300(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic int[] access$3400(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$3500(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$3600(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$3700(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$3800(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$3900(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$4000(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$4100(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$4200(org.sunflow.core.light.TriangleMeshLight x0)
static synthetic float[] access$4300(org.sunflow.core.light.TriangleMeshLight x0)
Error reading line: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18
For Error obtaining all superclasses of public class I am not sure if the PATH environment variable needs to be set somehow or if this is another error. Can you please comment on how to correct this mistake?
For Error reading line: org.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18
Is ckjm
only compatible with class files compiled under certain versions of the jvm? If so, which ones?
Thanks!
The CLASSPATH
variable must allow the Java class loader to load all dependencies. You may need to update the distributed bcel to avoid the class reading problem. Please provide feedback if this helps.
Yes, adding all dependencies to java.class.path before calling MetricsFilter helps. I can wrap ckjm in a maven plugin and run it as mvn ckjm that would analyse target/**/*.class.
What do you mean by adding all dependencies to java.class.path. Could you elaborate a bit more?
The path should contain all the directories and jar files used by the analyzed Java files.
I literally don't have any third party dependencies. Just a couple of directories containing simple classes and still it can't find the super class.
Never mind. I wasn't adding directory paths to CLASSPATH correctly. Thanks for help.
Hello, i get the same error when i try to use the program on some .class files with inner classes that are subclasses of the class that contains them. The strange thing is that it gives me an output for the problematic class.
Here is an example:
java -jar ckjm-1.9.jar -s ./*.class
Error obtaining all superclasses of class myAdapter.ListAdapter$SubListAdapter extends myAdapter.ListAdapter filename ./ListAdapter$SubListAdapter.class compiled from ListAdapter.java compiler version 55.0 access flags 32 constant pool 207 entries ACC_SUPER flag true
Attribute(s): SourceFile: ListAdapter.java (Unknown attribute NestHost: 00 0a) InnerClasses(2): private SubListAdapter=class myAdapter.ListAdapter$SubListAdapter of class myAdapter.ListAdapter private MyListIterator=class myAdapter.ListAdapter$MyListIterator of class myAdapter.ListAdapter
5 fields: private int startIndex private int endIndex private myAdapter.ListAdapter thisList private myAdapter.ListAdapter thisSubList final synthetic myAdapter.ListAdapter this$0
29 methods:
private void
myAdapter.HCollection 15 1 0 3 15 105 7 15 myAdapter.MapAdapter$BackingSetIterator 5 1 0 10 12 0 1 4 myAdapter.MapAdapter 17 1 0 14 45 4 3 17 myAdapter.ListAdapter$SubListAdapter 29 0 0 15 68 6 1 25 myAdapter.MapAdapter$MapAdapterEntry 10 1 0 10 21 13 1 9 myAdapter.HMap$HEntry 5 1 0 2 5 10 1 5 myAdapter.HMap 14 1 0 4 14 91 1 14 myAdapter.MapAdapter$BackingSet 18 1 0 20 57 37 3 17 myAdapter.HSet 15 1 0 4 15 105 3 15 myAdapter.ListAdapter 30 1 1 17 58 71 2 30 myAdapter.HIterator 3 1 0 2 3 3 9 3 myAdapter.ListAdapter$MyListIterator 12 1 0 13 26 0 2 11 myAdapter.HList 24 1 0 5 24 276 2 24 myAdapter.HListIterator 9 1 0 3 9 36 4 9