{"action":"created","issue":{"url":"https://api.github.com/repos/artur-shaik/vim-javacomplete2/issues/267","repository_url":"https://api.github.com/repos/artur-shaik/vim-javacomplete2","labels_url":"https://api.github.com/repos/artur-shaik/vim-javacomplete2/issues/267/labels{/name}","comments_url":"https://api.github.com/repos/artur-shaik/vim-javacomplete2/issues/267/comments","events_url":"https://api.github.com/repos/artur-shaik/vim-javacomplete2/issues/267/events","html_url":"https://github.com/artur-shaik/vim-javacomplete2/issues/267","id":183251706,"number":267,"title":"With this plugin, My vim open java file very slowly.(nerve-racking)","user":{"login":"duanqiaobb","id":12253212,"avatar_url":"https://avatars.githubusercontent.com/u/12253212?v=3","gravatar_id":"","url":"https://api.github.com/users/duanqiaobb","html_url":"https://github.com/duanqiaobb","followers_url":"https://api.github.com/users/duanqiaobb/followers","following_url":"https://api.github.com/users/duanqiaobb/following{/other_user}","gists_url":"https://api.github.com/users/duanqiaobb/gists{/gist_id}","starred_url":"https://api.github.com/users/duanqiaobb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duanqiaobb/subscriptions","organizations_url":"https://api.github.com/users/duanqiaobb/orgs","repos_url":"https://api.github.com/users/duanqiaobb/repos","events_url":"https://api.github.com/users/duanqiaobb/events{/privacy}","received_events_url":"https://api.github.com/users/duanqiaobb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":37,"created_at":"2016-10-16T06:17:12Z","updated_at":"2016-10-22T12:38:37Z","closed_at":null,"body":"I use the mvn to resolve the dependency of my project  and for JC2 to get complement.However , Every time  after I change the dependecies packages, It take a long time to open the java file, even stuck on the open file window. \r\n\r\nOh, Maybe I should say it happened sometimes , because today it just cost me few seconds to open it , I think it's around 10 seconds.However, It happened to me that I can't get the complements again.\r\n\r\n##Reproduce the actual behavior\r\n\r\n1.1  First I edit the pom.xml file to add some dependencies for my project.\r\n\r\n[**My pom file**]\r\n\r\n```xml\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n  xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <groupId>com.jonans.Thiefweb</groupId>\r\n  <artifactId>web</artifactId>\r\n  <packaging>war</packaging>\r\n  <version>1.0-SNAPSHOT</version>\r\n  <name>web Maven Webapp</name>\r\n  <url>http://maven.apache.org</url>\r\n\r\n\r\n  <properties>\r\n      <spring.version>4.1.1.RELEASE</spring.version>\r\n      <jstl.version>1.2</jstl.version>\r\n      <logback.version>1.0.13</logback.version>\r\n      <jcl-over-slf4j.version>1.7.5</jcl-over-slf4j.version>\r\n  </properties>\r\n\r\n  <repositories>\r\n      <repository>\r\n          <id>java.net2</id>\r\n          <name>Repository hosting the jee6 artifacts</name>\r\n          <url>http://download.java.net/maven/2</url>\r\n      </repository>\r\n  </repositories>        \r\n\r\n\r\n  <dependencies>\r\n\r\n      <dependency>\r\n          <groupId>javax.servlet</groupId>\r\n          <artifactId>javax.servlet-api</artifactId>\r\n          <version>3.0.1</version>\r\n      </dependency>\r\n\r\n      <dependency>\r\n          <groupId>junit</groupId>\r\n          <artifactId>junit</artifactId>\r\n          <version>3.8.1</version>\r\n          <scope>test</scope>\r\n      </dependency>\r\n      <dependency>\r\n          <groupId>javax</groupId>\r\n          <artifactId>javaee-web-api</artifactId>\r\n          <version>6.0</version>\r\n          <scope>provided</scope>\r\n      </dependency>\r\n\r\n       <!--Spring Core-->\r\n       <dependency>\r\n           <groupId>org.springframework</groupId>\r\n           <artifactId>spring-core</artifactId>\r\n           <version>${spring.version}</version>\r\n           <exclusions>\r\n               <exclusion>\r\n                   <groupId>commons-logging</groupId>\r\n                   <artifactId>commons-logging</artifactId>\r\n               </exclusion>\r\n           </exclusions>\r\n       </dependency>\r\n\r\n       <dependency>\r\n           <groupId>org.slf4j</groupId>\r\n           <artifactId>jcl-over-slf4j</artifactId>\r\n           <version>${jcl-over-slf4j.version}</version>\r\n       </dependency>\r\n\r\n       <dependency>\r\n          <groupId>ch.qos.logback</groupId> \r\n          <artifactId>logback-classic</artifactId>\r\n          <version>${logback.version}</version>\r\n       </dependency>\r\n\r\n      <dependency>\r\n          <groupId>org.springframework</groupId>\r\n          <artifactId>spring-web</artifactId>\r\n          <version>${spring.version}</version>\r\n      </dependency>\r\n\r\n      <dependency>\r\n          <groupId>org.springframework</groupId>\r\n          <artifactId>spring-webmvc</artifactId>\r\n          <version>${spring.version}</version>\r\n      </dependency>\r\n\r\n      <!--jstl-->\r\n      <dependency>\r\n          <groupId>jstl</groupId>\r\n          <artifactId>jstl</artifactId>\r\n          <version>${jstl.version}</version>\r\n\r\n      </dependency>\r\n\r\n  </dependencies>\r\n\r\n\r\n  <build>\r\n      <pluginManagement>\r\n          <plugins>\r\n             <plugin>\r\n                  <groupId>org.apache.tomcat.maven</groupId>\r\n                  <artifactId>tomcat7-maven-plugin</artifactId>\r\n                  <version>2.1</version>\r\n              </plugin>\r\n\r\n              <plugin>\r\n                  <groupId>org.apache.maven.plugins</groupId>\r\n                  <artifactId>maven-eclipse-plugin</artifactId>\r\n                  <version>2.9</version>\r\n                  <configuration>\r\n                      <!-- Always download and attach dependencies source cod -->\r\n                      <downloadSources>true</downloadSources>\r\n                      <downloadJavadocs>false</downloadJavadocs>\r\n                      <!-- Avoid type mvn eclipse:eclipse -Dwtpversion=2.0--> \r\n                      <wtpversion>2.0</wtpversion>\r\n                  </configuration>\r\n\r\n              </plugin>\r\n\r\n          </plugins>\r\n      </pluginManagement>\r\n      <finalName>web</finalName>\r\n  </build>\r\n</project>\r\n```\r\n1.2  After that,  I type `mvn dependecy:resolve` to solve my dependency packages.It was executed successfully.\r\n\r\n```shell\r\n mvn dependency:resolve                                                                                                                      Java/ThiefWeb (master ⚡) jonans-Aspire-E1-571G\r\n[INFO] Scanning for projects...\r\n[INFO]\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Building web Maven Webapp 1.0-SNAPSHOT\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO]\r\n[INFO] --- maven-dependency-plugin:2.8:resolve (default-cli) @ web ---\r\n[INFO]\r\n[INFO] The following files have been resolved:\r\n[INFO]    org.springframework:spring-aop:jar:4.1.1.RELEASE:compile\r\n[INFO]    org.springframework:spring-expression:jar:4.1.1.RELEASE:compile\r\n[INFO]    javax.servlet:javax.servlet-api:jar:3.0.1:compile\r\n[INFO]    org.springframework:spring-core:jar:4.1.1.RELEASE:compile\r\n[INFO]    aopalliance:aopalliance:jar:1.0:compile\r\n[INFO]    org.springframework:spring-context:jar:4.1.1.RELEASE:compile\r\n[INFO]    org.slf4j:slf4j-api:jar:1.7.5:compile\r\n[INFO]    javax:javaee-web-api:jar:6.0:provided\r\n[INFO]    jstl:jstl:jar:1.2:compile\r\n[INFO]    junit:junit:jar:3.8.1:test\r\n[INFO]    ch.qos.logback:logback-core:jar:1.0.13:compile\r\n[INFO]    org.springframework:spring-beans:jar:4.1.1.RELEASE:compile\r\n[INFO]    org.slf4j:jcl-over-slf4j:jar:1.7.5:compile\r\n[INFO]    ch.qos.logback:logback-classic:jar:1.0.13:compile\r\n[INFO]    org.springframework:spring-web:jar:4.1.1.RELEASE:compile\r\n[INFO]    org.springframework:spring-webmvc:jar:4.1.1.RELEASE:compile\r\n[INFO]\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD SUCCESS\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] Total time: 6.352 s\r\n[INFO] Finished at: 2016-10-17T10:00:17+08:00\r\n[INFO] Final Memory: 12M/150M\r\n[INFO] ------------------------------------------------------------------------\r\n\r\n```\r\n1.3  Then I opened java class file to try to get some complements.(*Sometimes vim loaded this file very slowly ,even stuck in the file load window*)\r\n\r\n[**My class file**]\r\n\r\n```java\r\npackage com.jonans.controller;\r\n\r\nimport org.slf4j.LoggerFactory;\r\nimport org.springframework.stereotype.Controller;\r\nimport org.springframework.ui.ModelMap;\r\nimport org.springframework.web.bind.annotation.PathVariable;\r\nimport org.springframework.web.bind.annotation.RequestMapping;\r\nimport org.springframework.web.bind.annotation.RequestMethod;\r\n\r\n@Controller\r\npublic class BaseController {\r\n\r\n    private static int counter = 0;\r\n    private static final String VIEW_INDEX = \"index\";\r\n    private final static  org.slf4j.Logger logger = LoggerFactory.getLogger(BaseController.class);\r\n\r\n\r\n    @RequestMapping(value=\"/\",method = RequestMethod.GET)\r\n        public String welcome(ModelMap model) {\r\n            model.addAttribute(\"message\",\"welcome\");\r\n            model.addAttribute(\"counter\",++counter);\r\n            logger.debug(\"[Welcome] counter: {}\",counter);\r\n            //Spring uses InternalResourceViewResolver and return back index.jsp\r\n            return VIEW_INDEX;\r\n        }\r\n\r\n    @RequestMapping(value=\"/{name}\", method = RequestMethod.GET)\r\n        public String welcomeName(@PathVariable String name, ModelMap model) {\r\n            model.addAttribute(\"message\",\"Welcome\"+name);\r\n            model.addAttribute(\"counter\",counter);\r\n\r\n            logger.debug(\"[welcomeName] counter:{}\", counter);\r\n            return VIEW_INDEX;\r\n        }\r\n}\r\n```\r\n\r\n[**Stuck Screenshot**]\r\n\r\n\r\n![stuck_issue](https://github.com/duanqiaobb/vim-javacomplete2/raw/master/bugs/mvn-pom-complements-issue/stuck.png)\r\n\r\n## For Stuck Stage\r\n   When it stucked , It will seem to sustain this stage unless you use the \"Ctrl-C\" to interrupt this status.\r\nHowever , if you enter the vim by this way , you just can a few complements and some complements lost.\r\n\r\n## Transform\r\n\r\nHowever, today , I could open the java file at a approriate speed , but I couldn't get  some complements from dependencies, neither the org.slf4j.Logger nor the org.springframework. I got the complete error while I was trying to get the complement.  **(Even after trying `:JCcacheClear` command and executing `rm -rf ~/.cache/javacomplete2/` for several times)**\r\n\r\n**It should be methioned that I pulled the new version from the github today**\r\n\r\n```shell\r\nError detected while processing function javacomplete#Complete[1]..javacomplete#complete#complete#Complete:                                                                                   \r\nline   38:                                                                                                                                                                                    \r\njavacomplete error: {}  \r\n```\r\n\r\n##  After having enabled logs with `JCdebugEnableLogs` , I got the logs information by typing `JCdebugGetLogContent` as follows:\r\n```vimscript\r\n479.548281 [context] context: CONTEXT_AFTER_DOT\r\n479.548321 [context] dot expression: logger.\r\n479.548380 [complete] complete after dot. expr: logger.\r\n479.548689 [collector] get declared class name for: \"logger\"\r\n479.619709 [complete] F3. \"logger.|\"  typename: \"org.slf4j.Logger\"\r\n479.619795 [collector] get class info. class: org.slf4j.Logger\r\n479.656223 [server] communicate: -E \"org.slf4j.Logger\" [collector#FetchInfoFromServer]\r\n479.786822 [server] \r\n481.920746 [context] context: CONTEXT_AFTER_DOT\r\n481.920872 [context] dot expression: logger.\r\n481.921088 [complete] complete after dot. expr: logger.\r\n481.922351 [collector] get declared class name for: \"logger\"\r\n481.995919 [complete] F3. \"logger.|\"  typename: \"org.slf4j.Logger\"\r\n481.995961 [collector] get class info. class: org.slf4j.Logger\r\n482.018315 [server] communicate: -E \"org.slf4j.Logger\" [collector#FetchInfoFromServer]\r\n482.136320 [server] \r\n485.877043 [context] context: CONTEXT_AFTER_DOT\r\n485.877072 [context] dot expression: logger.\r\n485.877141 [complete] complete after dot. expr: logger.\r\n485.877424 [collector] get declared class name for: \"logger\"\r\n485.937826 [complete] F3. \"logger.|\"  typename: \"org.slf4j.Logger\"\r\n485.937868 [collector] get class info. class: org.slf4j.Logger\r\n485.960255 [server] communicate: -E \"org.slf4j.Logger\" [collector#FetchInfoFromServer]\r\n486.076401 [server] \r\n489.303926 [context] context: CONTEXT_AFTER_DOT\r\n489.304064 [context] dot expression: logger.\r\n489.304332 [complete] complete after dot. expr: logger.\r\n489.305678 [collector] get declared class name for: \"logger\"\r\n489.348226 [complete] F3. \"logger.|\"  typename: \"org.slf4j.Logger\"\r\n489.348267 [collector] get class info. class: org.slf4j.Logger\r\n489.370755 [server] communicate: -E \"org.slf4j.Logger\" [collector#FetchInfoFromServer]\r\n489.489452 [server] \r\n489.976189 [context] context: CONTEXT_AFTER_DOT\r\n489.976357 [context] dot expression: logger.\r\n489.976605 [complete] complete after dot. expr: logger.\r\n489.977916 [collector] get declared class name for: \"logger\"\r\n490.020270 [complete] F3. \"logger.|\"  typename: \"org.slf4j.Logger\"\r\n490.020313 [collector] get class info. class: org.slf4j.Logger\r\n490.042197 [server] communicate: -E \"org.slf4j.Logger\" [collector#FetchInfoFromServer]\r\n490.156882 [server] \r\n```\r\n\r\n## My Environment (Required!)\r\n * OS:  Ubuntu 16.04\r\n * Vim version: VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 16 2016 10:50:38)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/artur-shaik/vim-javacomplete2/issues/comments/255526070","html_url":"https://github.com/artur-shaik/vim-javacomplete2/issues/267#issuecomment-255526070","issue_url":"https://api.github.com/repos/artur-shaik/vim-javacomplete2/issues/267","id":255526070,"user":{"login":"artur-shaik","id":4862907,"avatar_url":"https://avatars.githubusercontent.com/u/4862907?v=3","gravatar_id":"","url":"https://api.github.com/users/artur-shaik","html_url":"https://github.com/artur-shaik","followers_url":"https://api.github.com/users/artur-shaik/followers","following_url":"https://api.github.com/users/artur-shaik/following{/other_user}","gists_url":"https://api.github.com/users/artur-shaik/gists{/gist_id}","starred_url":"https://api.github.com/users/artur-shaik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artur-shaik/subscriptions","organizations_url":"https://api.github.com/users/artur-shaik/orgs","repos_url":"https://api.github.com/users/artur-shaik/repos","events_url":"https://api.github.com/users/artur-shaik/events{/privacy}","received_events_url":"https://api.github.com/users/artur-shaik/received_events","type":"User","site_admin":false},"created_at":"2016-10-22T12:38:37Z","updated_at":"2016-10-22T12:38:37Z","body":"This file generated with maven, that's why I asked you to run it.\r\nThere is one more thing we can try.\r\nCan you set in your vimrc: `let g:JavaComplete_ShowExternalCommandsOutput = 1`, then clear classpath cache. Run vim, open java file it `ThiefWeb` project, and wait while maven will generate classpath.\r\nThen you can run `:messages` to see output of maven. Maybe we can find something there."}}
{"actor":{"display_login":"artur-shaik"}}