walkmod / walkmod-core

walkmod: an open source tool to fix coding style issues
http://www.walkmod.com
GNU Lesser General Public License v3.0
154 stars 23 forks source link

getting Null pointer exception #93

Open aruruvishal49 opened 4 years ago

aruruvishal49 commented 4 years ago

WARN [main] - unresolved dependency: org.walkmod#walkmod-imports-cleaner-plugin;latest.integration: not found WARN [main] - unresolved dependency: org.walkmod#walkmod-maven-plugin;latest.integration: not found WARN [main] - unresolved dependency: org.walkmod#walkmod-javalang-plugin;[2.0, 4.0): not found ERROR [main] - Invalid configuration org.walkmod.conf.ConfigurationException: Ivy can not resolve the artifacts. Cause: unresolved dependency: org.walkmod#walkmod-imports-cleaner-plugin;latest.integration: not found;unresolved dependency: org.walkmod#walkmod-maven-plugin;latest.integration: not found;unresolved dependency: org.walkmod#walkmod-javalang-plugin;[2.0, 4.0): not found at org.walkmod.conf.providers.IvyConfigurationProvider.resolveArtifacts(IvyConfigurationProvider.java:233) at org.walkmod.conf.providers.IvyConfigurationProvider.load(IvyConfigurationProvider.java:156) at org.walkmod.conf.ConfigurationManager.executeConfigurationProviders(ConfigurationManager.java:124) at org.walkmod.conf.ConfigurationManager.addProviders(ConfigurationManager.java:61) at org.walkmod.conf.ConfigurationManager.(ConfigurationManager.java:75) at org.walkmod.conf.ConfigurationManager.(ConfigurationManager.java:79) at org.walkmod.WalkModFacade.readConfig(WalkModFacade.java:181) at org.walkmod.WalkModFacade.run(WalkModFacade.java:256) at org.walkmod.WalkModFacade.apply(WalkModFacade.java:142) at org.walkmod.commands.ApplyCommand.execute(ApplyCommand.java:40) at org.walkmod.WalkModDispatcher.execute(WalkModDispatcher.java:172) at org.walkmod.WalkModDispatcher.main(WalkModDispatcher.java:197) ERROR [main] - Invalid configuration java.lang.NullPointerException at org.walkmod.WalkModFacade.run(WalkModFacade.java:264) at org.walkmod.WalkModFacade.apply(WalkModFacade.java:142) at org.walkmod.commands.ApplyCommand.execute(ApplyCommand.java:40) at org.walkmod.WalkModDispatcher.execute(WalkModDispatcher.java:172) at org.walkmod.WalkModDispatcher.main(WalkModDispatcher.java:197) Exception in thread "main" java.lang.NullPointerException at org.walkmod.WalkModFacade.run(WalkModFacade.java:284) at org.walkmod.WalkModFacade.apply(WalkModFacade.java:142) at org.walkmod.commands.ApplyCommand.execute(ApplyCommand.java:40) at org.walkmod.WalkModDispatcher.execute(WalkModDispatcher.java:172) at org.walkmod.WalkModDispatcher.main(WalkModDispatcher.java:197)

My walkmod.xml

<!DOCTYPE walkmod PUBLIC "-//WALKMOD//DTD" "http://www.walkmod.com/dtd/walkmod-1.1.dtd">
<walkmod>
    <transformation type="imports-cleaner"/>
</walkmod>

I am running the command : walkmod apply

Astro03 commented 3 years ago

I'm getting a similar error.

ERROR [main] - Invalid configuration
java.lang.NullPointerException: Cannot invoke "org.walkmod.conf.entities.Configuration.executeModuleChains(org.walkmod.Options, org.walkmod.WalkmodCommand, String[])" because "config" is null
    at org.walkmod.WalkModFacade.run(WalkModFacade.java:264)
    at org.walkmod.WalkModFacade.apply(WalkModFacade.java:142)
    at org.walkmod.commands.ApplyCommand.execute(ApplyCommand.java:40)
    at org.walkmod.WalkModDispatcher.execute(WalkModDispatcher.java:172)
    at org.walkmod.WalkModDispatcher.main(WalkModDispatcher.java:197)
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.walkmod.conf.entities.Configuration.execute(String, org.walkmod.Options, String[])" because "config" is null
    at org.walkmod.WalkModFacade.run(WalkModFacade.java:284)
    at org.walkmod.WalkModFacade.apply(WalkModFacade.java:142)
    at org.walkmod.commands.ApplyCommand.execute(ApplyCommand.java:40)
    at org.walkmod.WalkModDispatcher.execute(WalkModDispatcher.java:172)
    at org.walkmod.WalkModDispatcher.main(WalkModDispatcher.java:197)

For me, I believe it's caused by not being able to resolve an artifact: org.gradle#gradle-tooling-api;2.10

org.walkmod.conf.ConfigurationException: Ivy can not resolve the artifacts. Cause: unresolved dependency: org.gradle#gradle-tooling-api;2.10: not found