{"action":"created","issue":{"url":"https://api.github.com/repos/walkmod/walkmod-core/issues/58","repository_url":"https://api.github.com/repos/walkmod/walkmod-core","labels_url":"https://api.github.com/repos/walkmod/walkmod-core/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/walkmod/walkmod-core/issues/58/comments","events_url":"https://api.github.com/repos/walkmod/walkmod-core/issues/58/events","html_url":"https://github.com/walkmod/walkmod-core/issues/58","id":161370680,"number":58,"title":"unable to run walkmod on springboot applications","user":{"login":"kkorada","id":16150723,"avatar_url":"https://avatars.githubusercontent.com/u/16150723?v=3","gravatar_id":"","url":"https://api.github.com/users/kkorada","html_url":"https://github.com/kkorada","followers_url":"https://api.github.com/users/kkorada/followers","following_url":"https://api.github.com/users/kkorada/following{/other_user}","gists_url":"https://api.github.com/users/kkorada/gists{/gist_id}","starred_url":"https://api.github.com/users/kkorada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkorada/subscriptions","organizations_url":"https://api.github.com/users/kkorada/orgs","repos_url":"https://api.github.com/users/kkorada/repos","events_url":"https://api.github.com/users/kkorada/events{/privacy}","received_events_url":"https://api.github.com/users/kkorada/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-21T07:53:28Z","updated_at":"2016-06-24T18:11:25Z","closed_at":null,"body":"Unable to run walkmod on spring boot applications,\r\n\r\ni have added following plugin in my pom.xml\r\n\r\n```\r\n            <plugin>\r\n                <groupId>org.walkmod</groupId>\r\n                <artifactId>maven-walkmod-plugin</artifactId>\r\n                <version>1.3</version>\r\n                <executions>\r\n                    <execution>\r\n                        <phase>generate-sources</phase>\r\n                        <goals>\r\n                            <goal>apply</goal>\r\n                        </goals>\r\n                        <configuration>\r\n                            <skipWalkmod>${skipWalkmod}</skipWalkmod>\r\n                        </configuration>\r\n                    </execution>\r\n                </executions>\r\n            </plugin>\r\n```\r\n\r\nwhen trying commad `walkmod check`\r\n\r\ngetting following error\r\n\r\n```\r\nERROR [main] - TRANSFORMATION CHAIN (default) FAILS\r\nAn exeception has been produced during the null transformation - org.walkmod.uti\r\nl.location.LocationImpl@4b1a43d8\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.\r\njava:62)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces\r\nsorImpl.java:43)\r\n        at java.lang.reflect.Method.invoke(Method.java:497)\r\n        at org.walkmod.walkers.AbstractWalker.walk(AbstractWalker.java:261)\r\n        at org.walkmod.walkers.AbstractWalker.execute(AbstractWalker.java:276)\r\n        at org.walkmod.javalang.walkers.DefaultJavaWalker.execute(DefaultJavaWal\r\nker.java:160)\r\n        at org.walkmod.impl.DefaultChainWalkerInvocation.invoke(DefaultChainWalk\r\nerInvocation.java:41)\r\n        at org.walkmod.impl.DefaultChainInvocation.invoke(DefaultChainInvocation\r\n.java:38)\r\n        at org.walkmod.impl.DefaultChainAdapter.execute(DefaultChainAdapter.java\r\n:165)\r\n        at org.walkmod.WalkModFacade.executeAllChains(WalkModFacade.java:911)\r\n        at org.walkmod.WalkModFacade.check(WalkModFacade.java:477)\r\n        at org.walkmod.commands.CheckCommand.execute(CheckCommand.java:40)\r\n        at org.walkmod.WalkModDispatcher.execute(WalkModDispatcher.java:171)\r\n        at org.walkmod.WalkModDispatcher.main(WalkModDispatcher.java:196)\r\nCaused by: java.lang.reflect.InvocationTargetException\r\n        ... 15 more\r\nCaused by: Error processing the analysis of [D:\\tmp_other\\testJhip3\\bugtest\\src\\\r\nmain\\java\\com\\kkorada\\mdtest\\BugtestApp.java] - org.walkmod.util.location.Loca\r\ntionImpl@6d469831\r\n        at org.walkmod.javalang.compiler.types.TypesLoaderVisitor.addType(TypesL\r\noaderVisitor.java:465)\r\n        at org.walkmod.javalang.compiler.types.TypesLoaderVisitor.loadClassesFro\r\nmJar(TypesLoaderVisitor.java:530)\r\n        at org.walkmod.javalang.compiler.types.TypesLoaderVisitor.loadClassesFro\r\nmPackage(TypesLoaderVisitor.java:555)\r\n        at org.walkmod.javalang.compiler.types.TypesLoaderVisitor.visit(TypesLoa\r\nderVisitor.java:391)\r\n        at org.walkmod.javalang.ast.ImportDeclaration.accept(ImportDeclaration.j\r\nava:109)\r\n        at org.walkmod.javalang.compiler.types.TypesLoaderVisitor.visit(TypesLoa\r\nderVisitor.java:643)\r\n        at org.walkmod.javalang.compiler.symbols.SymbolVisitorAdapter.visit(Symb\r\nolVisitorAdapter.java:159)\r\n        at org.walkmod.javalang.walkers.DefaultJavaWalker.visit(DefaultJavaWalke\r\nr.java:198)\r\n        at org.walkmod.javalang.walkers.DefaultJavaWalker.accept(DefaultJavaWalk\r\ner.java:86)\r\n        ... 15 more\r\nCaused by: java.lang.RuntimeException: Ops!. Error loading org.springframework.b\r\noot.actuate.autoconfigure.CrshAutoConfiguration$CrshBootstrapBean. Some missing\r\nruntime dependencies?\r\n        ... 24 more\r\nCaused by: java.lang.NoClassDefFoundError: org/crsh/plugin/PluginLifeCycle\r\n        at java.lang.ClassLoader.defineClass1(Native Method)\r\n        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)\r\n        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14\r\n2)\r\n        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)\r\n        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)\r\n        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)\r\n        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)\r\n        at java.security.AccessController.doPrivileged(Native Method)\r\n        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n        at org.walkmod.maven.providers.MavenProject$1.loadClass(MavenProject.jav\r\na:429)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:411)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n        at java.lang.Class.forName0(Native Method)\r\n        at java.lang.Class.forName(Class.java:348)\r\n        at org.walkmod.javalang.compiler.types.TypesLoaderVisitor.addType(TypesL\r\noaderVisitor.java:420)\r\n        ... 23 more\r\nCaused by: java.lang.ClassNotFoundException: org.crsh.plugin.PluginLifeCycle\r\n        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n        at org.walkmod.maven.providers.MavenProject$1.loadClass(MavenProject.jav\r\na:429)\r\n        at org.walkmod.maven.providers.MavenProject$1.loadClass(MavenProject.jav\r\na:434)\r\n        ... 39 more\r\n```\r\nand corresponding Bugtest.java file is\r\n\r\n```\r\npackage com.kkorada.mdtest;\r\n\r\nimport com.kkorada.mdtest.config.Constants;\r\nimport com.kkorada.mdtest.config.JHipsterProperties;\r\n\r\nimport org.slf4j.Logger;\r\nimport org.slf4j.LoggerFactory;\r\nimport org.springframework.boot.SpringApplication;\r\nimport org.springframework.boot.actuate.autoconfigure.*;\r\nimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;\r\nimport org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;\r\nimport org.springframework.boot.context.properties.EnableConfigurationProperties;\r\nimport org.springframework.context.annotation.ComponentScan;\r\nimport org.springframework.core.env.Environment;\r\nimport org.springframework.core.env.SimpleCommandLinePropertySource;\r\n\r\nimport javax.annotation.PostConstruct;\r\nimport javax.inject.Inject;\r\nimport java.net.InetAddress;\r\nimport java.net.UnknownHostException;\r\nimport java.util.Arrays;\r\nimport java.util.Collection;\r\n\r\n@ComponentScan\r\n@EnableAutoConfiguration(exclude = { MetricFilterAutoConfiguration.class, MetricRepositoryAutoConfiguration.class })\r\n@EnableConfigurationProperties({ JHipsterProperties.class, LiquibaseProperties.class })\r\npublic class BugtestApp {\r\n\r\n    private static final Logger log = LoggerFactory.getLogger(BugtestApp.class);\r\n\r\n    @Inject\r\n    private Environment env;\r\n\r\n    /**\r\n     * Initializes bugtest.\r\n     * <p>\r\n     * Spring profiles can be configured with a program arguments --spring.profiles.active=your-active-profile\r\n     * <p>\r\n     * You can find more information on how profiles work with JHipster on <a href=\"http://jhipster.github.io/profiles/\">http://jhipster.github.io/profiles/</a>.\r\n     */\r\n    @PostConstruct\r\n    public void initApplication() {\r\n        if (env.getActiveProfiles().length == 0) {\r\n            log.warn(\"No Spring profile configured, running with default configuration\");\r\n        } else {\r\n            log.info(\"Running with Spring profile(s) : {}\", Arrays.toString(env.getActiveProfiles()));\r\n            Collection<String> activeProfiles = Arrays.asList(env.getActiveProfiles());\r\n            if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_PRODUCTION)) {\r\n                log.error(\"You have misconfigured your application! \" +\r\n                    \"It should not run with both the 'dev' and 'prod' profiles at the same time.\");\r\n            }\r\n            if (activeProfiles.contains(Constants.SPRING_PROFILE_DEVELOPMENT) && activeProfiles.contains(Constants.SPRING_PROFILE_CLOUD)) {\r\n                log.error(\"You have misconfigured your application! \" +\r\n                    \"It should not run with both the 'dev' and 'cloud' profiles at the same time.\");\r\n            }\r\n        }\r\n    }\r\n\r\n    /**\r\n     * Main method, used to run the application.\r\n     *\r\n     * @param args the command line arguments\r\n     * @throws UnknownHostException if the local host name could not be resolved into an address\r\n     */\r\n    public static void main(String[] args) throws UnknownHostException {\r\n        SpringApplication app = new SpringApplication(BugtestApp.class);\r\n        SimpleCommandLinePropertySource source = new SimpleCommandLinePropertySource(args);\r\n        addDefaultProfile(app, source);\r\n        Environment env = app.run(args).getEnvironment();\r\n        log.info(\"\\n----------------------------------------------------------\\n\\t\" +\r\n                \"Application '{}' is running! Access URLs:\\n\\t\" +\r\n                \"Local: \\t\\thttp://127.0.0.1:{}\\n\\t\" +\r\n                \"External: \\thttp://{}:{}\\n----------------------------------------------------------\",\r\n            env.getProperty(\"spring.application.name\"),\r\n            env.getProperty(\"server.port\"),\r\n            InetAddress.getLocalHost().getHostAddress(),\r\n            env.getProperty(\"server.port\"));\r\n\r\n    }\r\n\r\n    /**\r\n     * If no profile has been configured, set by default the \"dev\" profile.\r\n     */\r\n    private static void addDefaultProfile(SpringApplication app, SimpleCommandLinePropertySource source) {\r\n        if (!source.containsProperty(\"spring.profiles.active\") &&\r\n                !System.getenv().containsKey(\"SPRING_PROFILES_ACTIVE\")) {\r\n\r\n            app.setAdditionalProfiles(Constants.SPRING_PROFILE_DEVELOPMENT);\r\n        }\r\n    }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/walkmod/walkmod-core/issues/comments/228419230","html_url":"https://github.com/walkmod/walkmod-core/issues/58#issuecomment-228419230","issue_url":"https://api.github.com/repos/walkmod/walkmod-core/issues/58","id":228419230,"user":{"login":"rpau","id":1483433,"avatar_url":"https://avatars.githubusercontent.com/u/1483433?v=3","gravatar_id":"","url":"https://api.github.com/users/rpau","html_url":"https://github.com/rpau","followers_url":"https://api.github.com/users/rpau/followers","following_url":"https://api.github.com/users/rpau/following{/other_user}","gists_url":"https://api.github.com/users/rpau/gists{/gist_id}","starred_url":"https://api.github.com/users/rpau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpau/subscriptions","organizations_url":"https://api.github.com/users/rpau/orgs","repos_url":"https://api.github.com/users/rpau/repos","events_url":"https://api.github.com/users/rpau/events{/privacy}","received_events_url":"https://api.github.com/users/rpau/received_events","type":"User","site_admin":false},"created_at":"2016-06-24T18:11:25Z","updated_at":"2016-06-24T18:11:25Z","body":"Hi,\r\n\r\nIn this case, there are some missing runtime dependencies. Please, **add** these ones in your pom.xml file.\r\n\r\n```\r\n<dependency>\r\n   <groupId>org.springframework.hateoas</groupId>\r\n   <artifactId>spring-hateoas</artifactId>\r\n   <version>0.20.0.RELEASE</version>\r\n   <scope>runtime</scope>\r\n</dependency>\r\n<dependency>\r\n   <groupId>org.crashub</groupId>\r\n   <artifactId>crash.shell</artifactId>\r\n   <version>1.3.2</version>\r\n   <scope>runtime</scope>\r\n</dependency>\r\n```\r\n\r\nAnd please, **remove** the following dependency from your pom.xml as well:\r\n\r\n```\r\n<dependency>\r\n  <groupId>org.walkmod</groupId>\r\n  <artifactId>walkmod-maven-plugin</artifactId>\r\n  <version>2.1.6</version>\r\n</dependency>\r\n```"}}
{"actor":{"display_login":"rpau"}}