{"action":"created","issue":{"url":"https://api.github.com/repos/sdaschner/jaxrs-analyzer/issues/22","labels_url":"https://api.github.com/repos/sdaschner/jaxrs-analyzer/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/sdaschner/jaxrs-analyzer/issues/22/comments","events_url":"https://api.github.com/repos/sdaschner/jaxrs-analyzer/issues/22/events","html_url":"https://github.com/sdaschner/jaxrs-analyzer/issues/22","id":89442406,"number":22,"title":"NullPointerException in ProjectAnalyzer.addDirectoryClasses(ProjectAnalyzer.java:149)","user":{"login":"jeff9finger","id":12804917,"avatar_url":"https://avatars.githubusercontent.com/u/12804917?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff9finger","html_url":"https://github.com/jeff9finger","followers_url":"https://api.github.com/users/jeff9finger/followers","following_url":"https://api.github.com/users/jeff9finger/following{/other_user}","gists_url":"https://api.github.com/users/jeff9finger/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff9finger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff9finger/subscriptions","organizations_url":"https://api.github.com/users/jeff9finger/orgs","repos_url":"https://api.github.com/users/jeff9finger/repos","events_url":"https://api.github.com/users/jeff9finger/events{/privacy}","received_events_url":"https://api.github.com/users/jeff9finger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-19T01:44:45Z","updated_at":"2015-06-19T15:27:26Z","closed_at":null,"body":"It seems that parsing the classes directory is not working as expected.\r\nI am running on Yosemite with Java 8\r\n$ java -version\r\njava version \"1.8.0_40\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_40-b25)\r\nJava HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)\r\n\r\n$ java -jar /Users/jeff/.m2/repository/com/sebastian-daschner/jaxrs-analyzer/0.5/jaxrs-analyzer-0.5.jar -b asciidoc -n TRACT -v 1.28 -d my.tractbilling.com -X target/classes\r\nException in thread \"main\" java.lang.NullPointerException\r\n\tat com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer.addDirectoryClasses(ProjectAnalyzer.java:149)\r\n\tat com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer.addDirectoryClasses(ProjectAnalyzer.java:151)\r\n\tat com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer.addDirectoryClasses(ProjectAnalyzer.java:151)\r\n\tat com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer.addProjectPath(ProjectAnalyzer.java:113)\r\n\tat com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer$$Lambda$17/1368884364.accept(Unknown Source)\r\n\tat java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)\r\n\tat java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)\r\n\tat com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer.analyze(ProjectAnalyzer.java:73)\r\n\tat com.sebastian_daschner.jaxrs_analyzer.JAXRSAnalyzer.analyze(JAXRSAnalyzer.java:69)\r\n\tat com.sebastian_daschner.jaxrs_analyzer.Main.main(Main.java:131)"},"comment":{"url":"https://api.github.com/repos/sdaschner/jaxrs-analyzer/issues/comments/113548179","html_url":"https://github.com/sdaschner/jaxrs-analyzer/issues/22#issuecomment-113548179","issue_url":"https://api.github.com/repos/sdaschner/jaxrs-analyzer/issues/22","id":113548179,"user":{"login":"jeff9finger","id":12804917,"avatar_url":"https://avatars.githubusercontent.com/u/12804917?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff9finger","html_url":"https://github.com/jeff9finger","followers_url":"https://api.github.com/users/jeff9finger/followers","following_url":"https://api.github.com/users/jeff9finger/following{/other_user}","gists_url":"https://api.github.com/users/jeff9finger/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff9finger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff9finger/subscriptions","organizations_url":"https://api.github.com/users/jeff9finger/orgs","repos_url":"https://api.github.com/users/jeff9finger/repos","events_url":"https://api.github.com/users/jeff9finger/events{/privacy}","received_events_url":"https://api.github.com/users/jeff9finger/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T15:27:26Z","updated_at":"2015-06-19T15:27:26Z","body":"Thanks for the response. I was getting NPE in maven as well. I may have had a corrupted jar file or something. I have performed the maven build again with -U (and deleted the .m2/repository files before) and now get the following error:\r\n`\r\nINFO] analyzing JAX-RS resources, using Swagger backend\r\n[DEBUG] Dependency paths are: [/Users/jeff/.m2/repository/com/transverse/bleep/bleep-domain-saas/1.28.2-SNAPSHOT/bleep-domain-saas-1.28.2-SNAPSHOT.jar, /Users/jeff/.m2/repository/org/springframework/spring-tx/3.1.1.RELEASE/spring-tx-3.1.1.RELEASE.jar, /Users/jeff/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar, /Users/jeff/.m2/repository/org/springframework/security/spring-security-core/3.1.0.RELEASE/spring-security-core-3.1.0.RELEASE.jar, /Users/jeff/.m2/repository/org/mockito/mockito-all/1.8.5/mockito-all-1.8.5.jar, /Users/jeff/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar, /Users/jeff/.m2/repository/org/apache/cxf/cxf-testutils/2.7.6/cxf-testutils-2.7.6.jar, /Users/jeff/.m2/repository/com/transverse/bleep/bleep-service/1.28.2-SNAPSHOT/bleep-service-1.28.2-SNAPSHOT.jar, /Users/jeff/.m2/repository/org/apache/cxf/cxf-rt-transports-http-jetty/2.7.6/cxf-rt-transports-http-jetty-2.7.6.jar, /Users/jeff/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar, /Users/jeff/.m2/repository/org/springframework/spring-test/3.1.1.RELEASE/spring-test-3.1.1.RELEASE.jar, /Users/jeff/.m2/repository/com/transverse/bleep/bleep-domain/1.28.2-SNAPSHOT/bleep-domain-1.28.2-SNAPSHOT.jar, /Users/jeff/.m2/repository/org/springframework/spring-context-support/3.1.1.RELEASE/spring-context-support-3.1.1.RELEASE.jar, /Users/jeff/.m2/repository/org/springframework/spring-aop/3.1.1.RELEASE/spring-aop-3.1.1.RELEASE.jar, /Users/jeff/.m2/repository/org/apache/cxf/cxf-bundle-jaxrs/2.7.6/cxf-bundle-jaxrs-2.7.6.jar]\r\n[DEBUG] Project paths are: [/Users/jeff/Workspaces/Tract/trunk-1.28.x/tract-projects/tract/bleep-api/target/classes]\r\n[ERROR] Could not interpret project method: {className='com.transverse.bleep.api.rest.dto.accounting.adjustment.AdjustmentReasonRestService', methodName='getByParameter', returnType='com.transverse.bleep.api.dto.DTOObject', staticMethod='false', parameterTypes=[com.transverse.bleep.api.dto.EntityType, java.lang.String, java.lang.String]}\r\n[DEBUG] javassist.NotFoundException: getByParameter(..) is not found in com.transverse.bleep.api.rest.dto.accounting.adjustment.AdjustmentReasonRestService\r\n        at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1229)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.methods.MethodContentAnalyzer.getRelevantInstructions(MethodContentAnalyzer.java:145)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.methods.MethodContentAnalyzer.addProjectMethods(MethodContentAnalyzer.java:104)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.methods.MethodContentAnalyzer.findProjectMethods(MethodContentAnalyzer.java:86)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.methods.ResourceMethodContentAnalyzer.analyze(ResourceMethodContentAnalyzer.java:62)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.methods.MethodAnalyzer.analyzeMethodContent(MethodAnalyzer.java:239)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.methods.MethodAnalyzer.analyzeInternal(MethodAnalyzer.java:157)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.methods.MethodAnalyzer.analyze(MethodAnalyzer.java:77)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.classes.ClassAnalyzer$$Lambda$126/1147196620.apply(Unknown Source)\r\n        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)\r\n        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)\r\n        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512)\r\n        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502)\r\n        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)\r\n        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)\r\n        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)\r\n        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.classes.ClassAnalyzer.analyzeInternal(ClassAnalyzer.java:120)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.project.classes.ClassAnalyzer.analyze(ClassAnalyzer.java:64)\r\n        at com.sebastian_daschner.jaxrs_analyzer.analysis.ProjectAnalyzer$$Lambda$18/1764619264.apply(Unknown Source)\r\n        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)\r\n        at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540)\r\n`\r\n\r\nI get this error on what looks like every jaxrs annotated class in the project. All stacktraces seem to indicate a problem at MethodContentAnalyzer.getRelevantInstructions(MethodContentAnalyzer.java:145\r\n\r\nI can provide more details if needed, but it looks like some sort of Reflection issue."}}