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

com.github.javaparser.resolution.UnsolvedSymbolException: Unsolved symbol : MongoRepository #143

Open
fwy-bhaidas opened this issue Mar 13, 2024 · 1 comment

Comments

@fwy-bhaidas
Copy link

Hi, I am getting following issue, I do have mongodb dependency in the project, but I couldn't understand whether this is a bug or I have miss configured it. From configuration point of view I have used the maven plugin and running with default settings using mvn sit-cv:report

[ERROR] Exception initializing Code Visualizer com.github.javaparser.resolution.UnsolvedSymbolException: Unsolved symbol : MongoRepository at com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserInterfaceDeclaration.toReferenceType (JavaParserInterfaceDeclaration.java:342) at com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserInterfaceDeclaration.getAncestors (JavaParserInterfaceDeclaration.java:250) at com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration.getAncestors (ResolvedReferenceTypeDeclaration.java:69) at com.github.javaparser.symbolsolver.javaparsermodel.declarations.JavaParserInterfaceDeclaration.getAllFields (JavaParserInterfaceDeclaration.java:185) at com.github.javaparser.resolution.declarations.ResolvedReferenceTypeDeclaration.getDeclaredFields (ResolvedReferenceTypeDeclaration.java:191) at io.sitoolkit.cv.core.domain.classdef.javaparser.ClassDefReaderJavaParserImpl.readFieldDefs (ClassDefReaderJavaParserImpl.java:356) at io.sitoolkit.cv.core.domain.classdef.javaparser.ClassDefReaderJavaParserImpl.lambda$readJava$4 (ClassDefReaderJavaParserImpl.java:136) at java.util.Optional.ifPresent (Optional.java:183) at io.sitoolkit.cv.core.domain.classdef.javaparser.ClassDefReaderJavaParserImpl.readJava (ClassDefReaderJavaParserImpl.java:132) at io.sitoolkit.cv.core.domain.classdef.javaparser.ClassDefReaderJavaParserImpl.lambda$readDir$2 (ClassDefReaderJavaParserImpl.java:82) at java.util.HashMap$KeySpliterator.forEachRemaining (HashMap.java:1621) at java.util.stream.ReferencePipeline$Head.forEach (ReferencePipeline.java:658) at io.sitoolkit.cv.core.domain.classdef.javaparser.ClassDefReaderJavaParserImpl.readDir (ClassDefReaderJavaParserImpl.java:71) at io.sitoolkit.cv.core.app.functionmodel.FunctionModelService.analyze (FunctionModelService.java:60) at io.sitoolkit.cv.core.app.config.ServiceFactory.initialize (ServiceFactory.java:66) at io.sitoolkit.cv.core.app.config.ServiceFactory.createAndInitialize (ServiceFactory.java:61) at io.sitoolkit.cv.plugin.maven.ReportMojo.execute (ReportMojo.java:21) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:566) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

@fwy-bhaidas
Copy link
Author

Also, looks like it is not adding any libraries to classpath, below is the log entry.

[INFO] Adding classpaths for JavaParser:[]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant