Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Failed to apply sootup.java.core.interceptors.TypeAssigner #1148

Open
JaktensTid opened this issue Dec 27, 2024 · 0 comments
Open

[Bug]: Failed to apply sootup.java.core.interceptors.TypeAssigner #1148

JaktensTid opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JaktensTid
Copy link

What happened?

When trying to get method.getBody()

Tried to analyze this project
https://github.com/apache/dolphinscheduler
Built with java 1.8

Version

Latest develop branch

Relevant log output

[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation org.springframework.stereotype.Componentis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation lombok.Generatedis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation org.springframework.context.annotation.ComponentScanis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation org.springframework.context.annotation.Configurationis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation org.springframework.boot.jackson.JsonComponentis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation org.springframework.stereotype.Componentis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation io.micrometer.core.annotation.Countedis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation java.lang.Deprecatedis not in current view.
[main] ERROR sootup.java.core.types.AnnotationType - Class of annotation javax.annotation.Nullableis not in current view.
Exception in thread "main" java.lang.IllegalStateException: Failed to apply sootup.java.core.interceptors.TypeAssigner@4cfc0c48 to <org.apache.dolphinscheduler.service.process.ProcessServiceImpl: org.apache.dolphinscheduler.dao.entity.WorkflowInstance constructWorkflowInstance(org.apache.dolphinscheduler.dao.entity.Command,java.lang.String)>
	at sootup.java.bytecode.frontend.AsmMethodSource.resolveBody(AsmMethodSource.java:240)
	at sootup.core.model.SootMethod.lazyBodyInitializer(SootMethod.java:98)
	at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:181)
	at sootup.core.model.SootMethod.getBody(SootMethod.java:177)
	at nosimus.Parser.lambda$getDependencies$3(Parser.java:120)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at nosimus.Parser.getDependencies(Parser.java:109)
	at nosimus.Parser.generateDependencyGraph(Parser.java:63)
	at nosimus.Parser.parsePath(Parser.java:44)
	at nosimus.Main.commandLine(Main.java:40)
	at nosimus.Main.test(Main.java:53)
	at nosimus.Main.main(Main.java:11)
Caused by: java.lang.ClassCastException: class sootup.core.jimple.common.constant.StringConstant cannot be cast to class sootup.core.jimple.basic.Local (sootup.core.jimple.common.constant.StringConstant and sootup.core.jimple.basic.Local are in unnamed module of loader 'app')
	at sootup.java.core.interceptors.typeresolving.TypePromotionVisitor.visit(TypePromotionVisitor.java:76)
	at sootup.java.core.interceptors.typeresolving.TypeChecker.handleInvokeExpr(TypeChecker.java:300)
	at sootup.java.core.interceptors.typeresolving.TypeChecker.caseAssignStmt(TypeChecker.java:220)
	at sootup.core.jimple.common.stmt.JAssignStmt.accept(JAssignStmt.java:201)
	at sootup.core.jimple.common.stmt.JAssignStmt.accept(JAssignStmt.java:59)
	at sootup.java.core.interceptors.typeresolving.TypePromotionVisitor.getPromotedTyping(TypePromotionVisitor.java:47)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1708)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
	at sootup.java.core.interceptors.typeresolving.TypeResolver.resolve(TypeResolver.java:81)
	at sootup.java.core.interceptors.TypeAssigner.interceptBody(TypeAssigner.java:42)
	at sootup.java.bytecode.frontend.AsmMethodSource.resolveBody(AsmMethodSource.java:234)
	... 11 more
@JaktensTid JaktensTid added the bug Something isn't working label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant