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

Gettting Null Pointer Exception #6

Open
mahimaAgg opened this issue Jun 5, 2017 · 1 comment
Open

Gettting Null Pointer Exception #6

mahimaAgg opened this issue Jun 5, 2017 · 1 comment

Comments

@mahimaAgg
Copy link

mahimaAgg commented Jun 5, 2017

Error visiting a Java source file

- org.walkmod.util.location.LocationImpl@76464
795
        at org.walkmod.javalang.walkers.DefaultJavaWalker.visit(DefaultJavaWalke
r.java:505)
        at org.walkmod.javalang.walkers.DefaultJavaWalker.visit(DefaultJavaWalke
r.java:250)
        at org.walkmod.javalang.walkers.DefaultJavaWalker.accept(DefaultJavaWalk
er.java:91)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.walkmod.walkers.AbstractWalker.walk(AbstractWalker.java:264)
        at org.walkmod.walkers.AbstractWalker.execute(AbstractWalker.java:279)
        at org.walkmod.javalang.walkers.DefaultJavaWalker.execute(DefaultJavaWal
ker.java:173)
        at org.walkmod.impl.DefaultChainWalkerInvocation.invoke(DefaultChainWalk
erInvocation.java:41)
        at org.walkmod.impl.DefaultChainInvocation.invoke(DefaultChainInvocation
.java:38)
        at org.walkmod.impl.DefaultChainAdapter.execute(DefaultChainAdapter.java
:166)
        at org.walkmod.conf.entities.impl.ConfigurationImpl.executeChain(Configu
rationImpl.java:731)
        at org.walkmod.conf.entities.impl.ConfigurationImpl.execute(Configuratio
nImpl.java:825)
        at org.walkmod.WalkModFacade.run(WalkModFacade.java:284)
        at org.walkmod.WalkModFacade.apply(WalkModFacade.java:142)
        at org.walkmod.commands.ApplyCommand.execute(ApplyCommand.java:42)
        at org.walkmod.WalkModDispatcher.execute(WalkModDispatcher.java:172)
        at org.walkmod.WalkModDispatcher.main(WalkModDispatcher.java:197)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.walkmod.walkers.AbstractWalker.visit(AbstractWalker.java:123)
        at org.walkmod.walkers.AbstractWalker.visit(AbstractWalker.java:171)
        at org.walkmod.javalang.walkers.DefaultJavaWalker.visit(DefaultJavaWalke
r.java:497)
        ... 19 more
Caused by: java.lang.NullPointerException
        at org.walkmod.sonar.visitors.SonarVisitor.getVisitors(SonarVisitor.java
:83)
        at org.walkmod.sonar.visitors.SonarVisitor.visit(SonarVisitor.java:43)
        at org.walkmod.sonar.visitors.SonarVisitor.visit(SonarVisitor.java:24)
        ... 26 more
DEBUG [Thread-1] - Closing expired connections

Why I am getting this exception?

@rpau
Copy link
Contributor

rpau commented Mar 14, 2018

Probably it is because it cannot connect and get the rules from your SonarQube server.

This project is open source, so you can check the code: https://github.com/walkmod/walkmod-sonar-plugin/blob/master/src/main/java/org/walkmod/sonar/visitors/SonarVisitor.java#L83

Then, I will add a more appropriate exception for this to improve the feedback.

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

No branches or pull requests

2 participants