[Wala-wala] [Question] Could not resolve main function

34 views
Skip to first unread message

Fang Zhou

unread,
Jun 17, 2019, 10:56:07 AM6/17/19
to wala...@lists.sourceforge.net
Hi all,

I'm trying PDFSlice to generate slice for HDFS. I use WALA v1.5.2 and
compiled it successfully. Then I use the command line below trying to
generate a slice starting from class
org.apache.hadoop.hdfs.server.namenode.NameNode:
java -cp ./:/nfs/wala/WALA/com.ibm.wala.core/target/com.ibm.wala.core-1.5.2.jar:/nfs/wala/WALA/com.ibm.wala.util/target/com.ibm.wala.util-1.5.2.jar:/nfs/wala/WALA/com.ibm.wala.shrike/target/com.ibm.wala.shrike-1.5.2.jar
com.ibm.wala.examples.drivers.PDFSlice -appJar
/nfs/hadoop-3.1.2-src/hadoop-hdfs-project/hadoop-hdfs/target/hadoop-hdfs-3.1.2.jar
-mainClass Lorg/apache/hadoop/hdfs/server/namenode/NameNode -srcCallee
startMetricsLogger -srcCaller conf.getInt -dd full -cd full -dir
forward

But I got such error message:
Exception in thread "main" com.ibm.wala.util.debug.UnimplementedError:
could not resolve < Application,
Lorg/apache/hadoop/hdfs/server/namenode/NameNode,
main([Ljava/lang/String;)V >
at com.ibm.wala.util.debug.Assertions.UNREACHABLE(Assertions.java:55)
at com.ibm.wala.ipa.callgraph.Entrypoint.<init>(Entrypoint.java:58)
at com.ibm.wala.ipa.callgraph.impl.DefaultEntrypoint.<init>(DefaultEntrypoint.java:42)
at com.ibm.wala.ipa.callgraph.impl.Util$1.next(Util.java:236)
at com.ibm.wala.ipa.callgraph.impl.Util$1.next(Util.java:1)
at com.ibm.wala.ipa.callgraph.propagation.PropagationCallGraphBuilder.makeCallGraph(PropagationCallGraphBuilder.java:246)
at com.ibm.wala.examples.drivers.PDFSlice.run(PDFSlice.java:151)
at com.ibm.wala.examples.drivers.PDFSlice.run(PDFSlice.java:113)
at com.ibm.wala.examples.drivers.PDFSlice.main(PDFSlice.java:100)

I confirm org.apache.hadoop.hdfs.server.namenode.NameNode includes the
main() function. Is there anything wrong?

Thanks in advance.

Best,
Fang


_______________________________________________
Wala-wala mailing list
Wala...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wala-wala

Manu Sridharan

unread,
Jun 17, 2019, 11:37:20 AM6/17/19
to WALA discussion and Q&A
Is the jar file for NameNode in your analysis scope?
--
Sent from my phone. Please pardon brevity

Fang Zhou

unread,
Jun 17, 2019, 11:29:35 PM6/17/19
to WALA discussion and Q&A
Hi Manu,

How to check my analysis scope?

I know that PDFSlice will invoke
AnalysisScopeReader.makeJavaBinaryAnalysisScope(appJar, new
FileProvider()) to generate the scope. Since I have provided the right
path for the jar file, I believe the jar file has been in the scope.
The error message shows problems come from generating the call graph.
Is this error normally related to scope error?

Best,
Fang

Manu Sridharan

unread,
Jul 2, 2019, 6:25:56 PM7/2/19
to WALA discussion and Q&A
Hi Fang,

It could be a scope issue; it depends on which jar file contains Lorg/apache/hadoop/hdfs/server/namenode/NameNode.  Can you confirm that class is in the appJar you provided, and not some other jar?

Thanks,
Manu
Reply all
Reply to author
Forward
0 new messages