artur-shaik / vim-javacomplete2

DEPRECATED in favor of jc.nvim
Vim License
973 stars 83 forks source link

pattern not found every time I'm trying autocomplete #153

Closed purpleP closed 8 years ago

purpleP commented 8 years ago

http://stackoverflow.com/questions/34054922/pattern-not-found-when-using-javacomplete2-on-os-x

wsdjeg commented 8 years ago

what is the output of java -version and do you compile javavi,maybe it is better to install maven

artur-shaik commented 8 years ago

@purpleP can you temporarily unset JAVA_HOME variable, and try again?

purpleP commented 8 years ago

@wsdjeg

java version "1.8.0_60" Java(TM) SE Runtime Environment (build 1.8.0_60-b27) Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

What is javavi? I don't see any mentions of that in readme. What does maven have to do with that? I can install maven of course, but my projects are all built with gradle.

@artur-shaik My JAVA_HOME was unset initially and I thought that it was the problem. But after I have set it I got the save results. Just checked that again. Same result with unset JAVA_HOME.

wsdjeg commented 8 years ago

https://github.com/artur-shaik/vim-javacomplete2/tree/master/libs/javavi here is javavi it is buckground service for javacomplete2

wsdjeg commented 8 years ago
<dependency>
        <groupId>com.github.javaparser</groupId>
        <artifactId>javaparser-core</artifactId>
        <version>2.0.0</version>
    </dependency>
    <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20150729</version>
    </dependency> 

javavi needs two jars but javacomplete2 repo only has one ,i think maybe jar should not be added to repo,just use maven intead.let's save resources for Github!

purpleP commented 8 years ago

@wsdjeg I'm sorry, I don't understand. Are you saying that after I've installed the plugin with Vundle I need to build the project with maven?

wsdjeg commented 8 years ago

yes,javavi is a maven java project in javacomplete2

purpleP commented 8 years ago

@wsdjeg Why that info is not in readme? And why Vundle can build it when installing the plugin?

wsdjeg commented 8 years ago

vundle can not build plugin,it just download it and add it to vim's rtp!

purpleP commented 8 years ago

@wsdjeg ok. It seems the the issue is resolved. This info however definitely should be added to readme.

wsdjeg commented 8 years ago

ok thank you.but by default if you do not install maven ,the plugin also can compile javavi by javac

purpleP commented 8 years ago

Hm... It's strange, but It' not working again. Well, I know how to build java projects. I'm just saying that the readme should state that additional steps are needed for this plugin to work.

wsdjeg commented 8 years ago

ok ,i will add it,but what is the issue for you,can you log it, vim Test.java JCdebugEnableLogs insert import java. then c x c o then JCdebugGetLogContent

purpleP commented 8 years ago

java. 3 Context: 3 4 DotExpr: java. 5 Communicate: -E "java" [s:GetMembers for static] 6 Communicate: -p "java" [s:DoGetInfoByReflection]

Doesn't seems much informative to me.

wsdjeg commented 8 years ago

what is the output of echo g:JavaComplete_LibsPath

purpleP commented 8 years ago

@wsdjeg where should I enter this? In terminal or in vim as a command? In terminal this gives g:JavaComplete_LibsPath In vim :echo g:JavaComplete_LibsPath I can see a single dot (.) where the command was.

wsdjeg commented 8 years ago

in vim ,and if in the dir ,there is no pom or build.gradle it should be a dot,really strange why it does not work,

purpleP commented 8 years ago

@wsdjeg Strange indeed. What's really strange to me is that it was working just now. Also when it have worked vim have been loading unusually long. But now it's loading fast again.

wsdjeg commented 8 years ago

load long because in the dir or subdir has pom.xml or build.gradle

wsdjeg commented 8 years ago

if you really like vim ,it is better to use linux instaead of win

purpleP commented 8 years ago

@wsdjeg Why do you think I'm using win? I'm on mac right now.

wsdjeg commented 8 years ago

sorry ohaha

artur-shaik commented 8 years ago

@purpleP Initialy plugin should work fine without maven, we just need to find out, what brakes jc2 in your enviroment. Can you find compiled classes in vim-javacomplete2/libs/javavi/target ?

purpleP commented 8 years ago

├── classes │   └── kg │   └── ash │   └── javavi │   ├── Daemon$TimeoutTask.class │   ├── Daemon.class │   ├── Javavi.class │   ├── TargetParser.class │   ├── actions │   │   ├── Action.class │   │   ├── ActionFactory.class │   │   ├── ActionWithTarget.class │   │   ├── ExecuteDaemonAction.class │   │   ├── FilterSimilarAnnotationsAction.class │   │   ├── FilterSimilarClassesAction.class │   │   ├── GetClassInfoAction.class │   │   ├── GetClassInfoFromSourceAction.class │   │   ├── GetClassPackagesAction.class │   │   ├── GetMissingImportsAction.class │   │   ├── GetPackageInfoAction.class │   │   ├── GetUnusedImportsAction.class │   │   ├── ImportsAction.class │   │   └── RemoveClassInfoFromCache.class │   ├── clazz │   │   ├── ClassConstructor.class │   │   ├── ClassField.class │   │   ├── ClassImport.class │   │   ├── ClassMethod.class │   │   ├── ClassTypeParameter.class │   │   └── SourceClass.class │   ├── output │   │   ├── OutputClassInfo.class │   │   ├── OutputClassPackages.class │   │   ├── OutputPackageInfo.class │   │   ├── OutputSimilar.class │   │   ├── OutputSimilarAnnotations.class │   │   └── OutputSimilarClasses.class │   ├── readers │   │   ├── ClassReader.class │   │   ├── Parser$ClassOrInterfaceVisitor.class │   │   ├── Parser$ClassVisitor.class │   │   ├── Parser.class │   │   ├── Reflection.class │   │   └── source │   │   ├── ClassNamesFetcher$1.class │   │   ├── ClassNamesFetcher$AnnotationsVisitor.class │   │   ├── ClassNamesFetcher$ClassTypeVisitor.class │   │   ├── ClassNamesFetcher$TypesVisitor$1.class │   │   ├── ClassNamesFetcher$TypesVisitor.class │   │   ├── ClassNamesFetcher.class │   │   └── CompilationUnitCreator.class │   └── searchers │   ├── ByExtensionVisitor.class │   ├── ClassMap.class │   ├── ClassSearcher.class │   ├── ClasspathPackageSearcher.class │   ├── FqnSearcher.class │   ├── PackageEntry.class │   ├── PackageSeacherIFace.class │   ├── PackagesLoader.class │   ├── SourceFileVisitor.class │   └── SourcePackageSearcher.class ├── generated-sources │   └── annotations ├── generated-test-sources │   └── test-annotations ├── javavi-1.0-SNAPSHOT.jar ├── maven-archiver │   └── pom.properties ├── maven-status │   └── maven-compiler-plugin │   ├── compile │   │   └── default-compile │   │   ├── createdFiles.lst │   │   └── inputFiles.lst │   └── testCompile │   └── default-testCompile │   ├── createdFiles.lst │   └── inputFiles.lst ├── surefire-reports │   ├── TEST-kg.ash.javavi.DaemonTest.xml │   ├── TEST-kg.ash.javavi.TargetParserTest.xml │   ├── TEST-kg.ash.javavi.actions.GetClassInfoActionTest.xml │   ├── TEST-kg.ash.javavi.output.OutputClassInfoTest.xml │   ├── TEST-kg.ash.javavi.output.OutputClassPackagesTest.xml │   ├── TEST-kg.ash.javavi.output.OutputPackageInfoTest.xml │   ├── TEST-kg.ash.javavi.output.OutputSimilarAnnotationsTest.xml │   ├── TEST-kg.ash.javavi.output.OutputSimilarClassesTest.xml │   ├── TEST-kg.ash.javavi.readers.source.ClassNamesFetcherTest.xml │   ├── TEST-kg.ash.javavi.searchers.ClasspathPackageSearcherTest.xml │   ├── TEST-kg.ash.javavi.searchers.FqnSeacherTest.xml │   ├── TEST-kg.ash.javavi.searchers.PackagesLoaderTest.xml │   ├── TEST-kg.ash.javavi.searchers.SourceFileVisitorTest.xml │   ├── kg.ash.javavi.DaemonTest.txt │   ├── kg.ash.javavi.TargetParserTest.txt │   ├── kg.ash.javavi.actions.GetClassInfoActionTest.txt │   ├── kg.ash.javavi.output.OutputClassInfoTest.txt │   ├── kg.ash.javavi.output.OutputClassPackagesTest.txt │   ├── kg.ash.javavi.output.OutputPackageInfoTest.txt │   ├── kg.ash.javavi.output.OutputSimilarAnnotationsTest.txt │   ├── kg.ash.javavi.output.OutputSimilarClassesTest.txt │   ├── kg.ash.javavi.readers.source.ClassNamesFetcherTest.txt │   ├── kg.ash.javavi.searchers.ClasspathPackageSearcherTest.txt │   ├── kg.ash.javavi.searchers.FqnSeacherTest.txt │   ├── kg.ash.javavi.searchers.PackagesLoaderTest.txt │   └── kg.ash.javavi.searchers.SourceFileVisitorTest.txt └── test-classes └── kg └── ash └── javavi ├── ClassWithClasses.java ├── DaemonTest.class ├── TargetParserTest.class ├── actions │   └── GetClassInfoActionTest.class ├── output │   ├── OutputClassInfoTest.class │   ├── OutputClassPackagesTest.class │   ├── OutputPackageInfoTest.class │   ├── OutputSimilarAnnotationsTest.class │   └── OutputSimilarClassesTest.class ├── readers │   └── source │   └── ClassNamesFetcherTest.class └── searchers ├── ClasspathPackageSearcherTest.class ├── FqnSeacherTest.class ├── PackagesLoaderTest.class └── SourceFileVisitorTest.class

31 directories, 98 files

I can see javavi jar and a lot's of compiled classes

artur-shaik commented 8 years ago

Ok, compilation seems to be ok. Can you now add this command JCdebugEnableLogs in your vimrc, so for debug logs will be enabled at startup. Then show logs again, as you did earlier.

purpleP commented 8 years ago

@artur-shaik should I just add JCdebugEnagleLogs string to the beginning of vimrc? Or something else?

purpleP commented 8 years ago

Error detected while processing /Users/mihaildoronin/.vimrc: line 1: E492: Not an editor command: JCdebugEnableLogs Press ENTER or type command to continue

artur-shaik commented 8 years ago

Yeah, only this string.

artur-shaik commented 8 years ago

Ou, yeah, you need add it after plugin loaded, may be at the end.

purpleP commented 8 years ago

set nocompatible " be iMproved, required filetype off " required

" set the runtime path to include Vundle and initialize set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " alternatively, pass a path where Vundle should install plugins "call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'artur-shaik/vim-javacomplete2'

call vundle#end() " required JCdebugEnableLogs filetype plugin indent on " required

autocmd FileType java set omnifunc=javacomplete#Complete let mapleader = "" syntax enable set background=dark colorscheme solarized set wildmenu set number function! NumberToggle() if(&relativenumber == 1) set number else set relativenumber endif endfunc

              nnoremap <C-n> :call NumberToggle()<cr>

set encoding=utf-8

source ~/.vimrc /Users/mihaildoronin/.vimrc:4: no such file or directory: set the runtime path to include Vundle and initialize\nset rtp+=~/.vim/bundle/Vundle.vim\ncall vundle#begin()\n /Users/mihaildoronin/.vimrc:8: no such file or directory: call vundle#begin('~/some/path/here')\n\n /Users/mihaildoronin/.vimrc:11: command not found: Plugin /Users/mihaildoronin/.vimrc:12: command not found: Plugin /Users/mihaildoronin/.vimrc:18: command not found: autocmd /Users/mihaildoronin/.vimrc:19: bad math expression: operand expected at =' /Users/mihaildoronin/.vimrc:20: command not found: syntax /Users/mihaildoronin/.vimrc:22: command not found: colorscheme /Users/mihaildoronin/.vimrc:26: parse error near)'

purpleP commented 8 years ago

@artur-shaik I've placed command JCdebugEnableLogs at the end of vimrc and now I have this

vim somefile.java No user-defined commands found

And then I'm trying to bring suggestions with ctrl-x-o pattern not found

Then JCdebugGetLogContent and it shows me empty file.

artur-shaik commented 8 years ago

Ok, let's go another way. Remove command from vimrc. Run it after you open vim, then run JCserverStart, then try completion, and show logs.

purpleP commented 8 years ago

@artur-shaik

http://stackoverflow.com/questions/21322520/why-wont-vim-recognise-a-plugin-command-in-the-vimrc-but-it-will-recognise-it

purpleP commented 8 years ago

http://recordit.co/WjJu6lllmX

2 Li 3 Context: 8 4 DoGetClassInfo: this 5 A0. this 6 DoGetClassInfo: java.lang.Object 7 Communicate: -E "java.lang.Object" [FetchClassInfo in Batch] 8 Communicate: -similar-classes "Li" [Filter packages by incomplete class name ] 9 finish completion 6.226231s 10 Li 11 Communicate: -class-packages "Li" [Filter packages to add import]

purpleP commented 8 years ago

Here is another attempt this time to autocomplete ArrayList from Arr

Arr 13 Context: 8 14 DoGetClassInfo: this 15 A0. this 16 Communicate: -similar-classes "Arr" [Filter packages by incomplete class nam e] 17 finish completion 2.731816s 18 Arr 19 Communicate: -class-packages "Arr" [Filter packages to add import]

artur-shaik commented 8 years ago

No, it doesn't show startup logs seems like it already started, I think we need terminate it before start. So, can you run JCserverTerminate just before JCserverStart.

purpleP commented 8 years ago

Here is my log Li Context: 8 DoGetClassInfo: this A0. this DoGetClassInfo: java.lang.Object Start server Server classpath: -cp /Users/mihaildoronin/.vim/bundle/vim-javacomplete2/libs/javavi/target/classes:/Users/mihaildoronin/.vim/bundle/vim-javacomplete2/libs/javaparser.jar::.:/Users/mihaildoronin/.m2/repository/com/google/code/findbugs/jsr305/2.0.1/jsr305-2.0.1.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/1.2.5.RELEASE/spring-boot-starter-data-jpa-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/data/spring-data-jpa/1.7.3.RELEASE/spring-data-jpa-1.7.3.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/json/json/20141113/json-20141113.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter/1.2.5.RELEASE/spring-boot-starter-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/yaml/snakeyaml/1.14/snakeyaml-1.14.jar:/Users/mihaildoronin/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/mihaildoronin/.m2/repository/org/springframework/hateoas/spring-hateoas/0.16.0.RELEASE/spring-hateoas-0.16.0.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-beans/4.1.7.RELEASE/spring-beans-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/Users/mihaildoronin/.m2/repository/org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.jar:/Users/mihaildoronin/.m2/repository/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar:/Users/mihaildoronin/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.2.5.RELEASE/spring-boot-starter-web-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-hateoas/1.2.5.RELEASE/spring-boot-starter-hateoas-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.12/jcl-over-slf4j-1.7.12.jar:/Users/mihaildoronin/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.2.5.RELEASE/spring-boot-starter-logging-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/data/spring-data-commons/1.9.3.RELEASE/spring-data-commons-1.9.3.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-jdbc/4.1.7.RELEASE/spring-jdbc-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-aop/4.1.7.RELEASE/spring-aop-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.2.5.RELEASE/spring-boot-autoconfigure-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/hibernate/hibernate-entitymanager/4.3.10.Final/hibernate-entitymanager-4.3.10.Final.jar:/Users/mihaildoronin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.0.23/tomcat-embed-websocket-8.0.23.jar:/Users/mihaildoronin/.m2/repository/org/atteo/evo-inflector/1.2/evo-inflector-1.2.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-test/1.2.5.RELEASE/spring-boot-starter-test-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/mihaildoronin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.0.23/tomcat-embed-el-8.0.23.jar:/Users/mihaildoronin/.m2/repository/org/springframework/data/spring-data-rest-webmvc/2.2.3.RELEASE/spring-data-rest-webmvc-2.2.3.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/aspectj/aspectjweaver/1.8.6/aspectjweaver-1.8.6.jar:/Users/mihaildoronin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-juli/8.0.23/tomcat-embed-logging-juli-8.0.23.jar:/Users/mihaildoronin/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.4.6/jackson-annotations-2.4.6.jar:/Users/mihaildoronin/.m2/repository/com/google/guava/guava/16.0.1/guava-16.0.1.jar:/Users/mihaildoronin/.m2/repository/com/github/fge/btf/1.2/btf-1.2.jar:/Users/mihaildoronin/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar:/Users/mihaildoronin/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-expression/4.1.7.RELEASE/spring-expression-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot/1.2.5.RELEASE/spring-boot-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/hibernate/hibernate-core/4.3.10.Final/hibernate-core-4.3.10.Final.jar:/Users/mihaildoronin/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.0.23/tomcat-embed-core-8.0.23.jar:/Users/mihaildoronin/.m2/repository/com/github/fge/msg-simple/1.1/msg-simple-1.1.jar:/Users/mihaildoronin/.m2/repository/org/skyscreamer/jsonassert/1.2.3/jsonassert-1.2.3.jar:/Users/mihaildoronin/.m2/repository/com/fasterxml/classmate/1.0.0/classmate-1.0.0.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-aspects/4.1.7.RELEASE/spring-aspects-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/plugin/spring-plugin-core/1.1.0.RELEASE/spring-plugin-core-1.1.0.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/data/spring-data-rest-core/2.2.3.RELEASE/spring-data-rest-core-2.2.3.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-orm/4.1.7.RELEASE/spring-orm-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.jar:/Users/mihaildoronin/.m2/repository/org/jboss/jandex/1.1.0.Final/jandex-1.1.0.Final.jar:/Users/mihaildoronin/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.Final/hibernate-jpa-2.1-api-1.0.0.Final.jar:/Users/mihaildoronin/.m2/repository/com/github/fge/json-patch/1.7/json-patch-1.7.jar:/Users/mihaildoronin/.m2/repository/org/slf4j/jul-to-slf4j/1.7.12/jul-to-slf4j-1.7.12.jar:/Users/mihaildoronin/.m2/repository/org/apache/tomcat/tomcat-juli/8.0.23/tomcat-juli-8.0.23.jar:/Users/mihaildoronin/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.4.6/jackson-databind-2.4.6.jar:/Users/mihaildoronin/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar:/Users/mihaildoronin/.m2/repository/org/apache/tomcat/tomcat-jdbc/8.0.23/tomcat-jdbc-8.0.23.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-webmvc/4.1.7.RELEASE/spring-webmvc-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/com/h2database/h2/1.4.187/h2-1.4.187.jar:/Users/mihaildoronin/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/Users/mihaildoronin/.m2/repository/org/hibernate/hibernate-validator/5.1.3.Final/hibernate-validator-5.1.3.Final.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-context/4.1.7.RELEASE/spring-context-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/objenesis/objenesis/2.1/objenesis-2.1.jar:/Users/mihaildoronin/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.5.Final/hibernate-commons-annotations-4.0.5.Final.jar:/Users/mihaildoronin/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.12/log4j-over-slf4j-1.7.12.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-data-rest/1.2.5.RELEASE/spring-boot-starter-data-rest-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.2.5.RELEASE/spring-boot-starter-tomcat-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-web/4.1.7.RELEASE/spring-web-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-test/4.1.7.RELEASE/spring-test-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar:/Users/mihaildoronin/.m2/repository/com/github/fge/jackson-coreutils/1.6/jackson-coreutils-1.6.jar:/Users/mihaildoronin/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-tx/4.1.7.RELEASE/spring-tx-4.1.7.RELEASE.jar:/Users/mihaildoronin/.m2/repository/postgresql/postgresql/9.1-901-1.jdbc4/postgresql-9.1-901-1.jdbc4.jar:/Users/mihaildoronin/.m2/repository/org/aspectj/aspectjrt/1.8.6/aspectjrt-1.8.6.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-aop/1.2.5.RELEASE/spring-boot-starter-aop-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/org/zeromq/jeromq/0.3.5/jeromq-0.3.5.jar:/Users/mihaildoronin/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/1.2.5.RELEASE/spring-boot-starter-jdbc-1.2.5.RELEASE.jar:/Users/mihaildoronin/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.4.6/jackson-core-2.4.6.jar:/Users/mihaildoronin/.m2/repository/org/springframework/spring-core/4.1.7.RELEASE/spring-core-4.1.7.RELEASE.jar:/Users/mihaildoronin/Code/adc_settings_service/target/classes:/Users/mihaildoronin/Code/adc_settings_service/target/test-classes:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib Server arguments: kg.ash.javavi.Javavi -sources "/Users/mihaildoronin/Code/adc_settings_service//src:/Users/mihaildoronin/Code/cabletrack-service//src:/Users/mihaildoronin/Code/channels_service//src:/Users/mihaildoronin/Code/dragon-zmq-c//src:/Users/mihaildoronin/Code/foo//src:/Users/mihaildoronin/Code/fp101-homework//src:/Users/mihaildoronin/Code/jackson-datatype-jts//src:/Users/mihaildoronin/Code/locations//src:/Users/mihaildoronin/Code/processes-service//src:/Users/mihaildoronin/Code/processes_service_event_sourced//src:/Users/mihaildoronin/Dropbox/channels_service//src:/Users/mihaildoronin/venvs/stage0_processing//src:" -D Communicate: -E "java.lang.Object" [FetchClassInfo in Batch] DoGetClassInfo: java.lang.Object Communicate: -E "java.lang.Object" [FetchClassInfo in Batch] Communicate: -similar-classes "Li" [Filter packages by incomplete class name] finish completion 0.066654s Li Communicate: -class-packages "Li" [Filter packages to add import] Li Context: 8 DoGetClassInfo: this A0. this DoGetClassInfo: java.lang.Object Communicate: -E "java.lang.Object" [FetchClassInfo in Batch] Communicate: -similar-classes "Li" [Filter packages by incomplete class name] finish completion 6.845749s Li Communicate: -class-packages "Li" [Filter packages to add import] Li Context: 8 DoGetClassInfo: this A0. this Communicate: -similar-classes "Li" [Filter packages by incomplete class name] finish completion 3.102570s Li Communicate: -class-packages "Li" [Filter packages to add import]

artur-shaik commented 8 years ago

Seems like it collects everything we need. I'm just wonder, does it correct path on OS X: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/lib.

Next step can you call command JCserverShowPort, then run in cmd line telnet localhost portnumber where portnumber is port that javacomplete use. In telnet run -similar-classes "Li" and put result here if any...

purpleP commented 8 years ago

telnet localhost 51538 Trying ::1... Connected to localhost. Escape character is '^]'. -similar-classes "Li" Connection closed by foreign host.

purpleP commented 8 years ago

@artur-shaik I don't know anything about telnet unfortunately, but from what I've googled we should check some network settings.

purpleP commented 8 years ago

@artur-shaik Does javavi service put logs somewhere? Maybe it just crashes when trying to handle the request?

artur-shaik commented 8 years ago

Yeah, seems like there is no answer at all. We can do some logging, please set up this parameters: let g:JavaComplete_JavaviLogfileDirectory = "/somedir" let g:JavaComplete_JavaviDebug = 1

But this works only with last commits, update plugin if you have old one.

purpleP commented 8 years ago

I've just installed it earlier today so I think it should be updated. But if you would say hash of commit that introduced this logging feature I would be able to check that.

let g:JavaComplete_JavaviLogfileDirectory = "/tmp"

So I restarted vim, checked the port, set the directory to /tmp connected to service via telnet and entered the command, it gaved me the same output, but I don't see anything new in /tmp folder.

artur-shaik commented 8 years ago

I added it not a long time ago, with this commit: 94542961bd55e3d44e9cb38cadc1dda27748bcb5

purpleP commented 8 years ago

I'm debugging your code right now. It could have a little refactoring, if you ask me. If you're interested I can try that. I found that the threre is a nullpointerexception thrown. It should be in a log, if the logging would work. I'll write to you later when I'll have more information, probably tomorrow.

purpleP commented 8 years ago

This exception is thrown is probably due to the fact that that I haven't executed -sources command before -similar-classes

purpleP commented 8 years ago

@artur-shaik What is the proper workflow for this javavi service? What should I do first and what should I do next for manual testing and debuggin?

artur-shaik commented 8 years ago

-sources is not command, this argument applied when server start up.

Here https://github.com/artur-shaik/vim-javacomplete2/blob/master/libs/javavi/src/main/java/kg/ash/javavi/Daemon.java#L60 you can add ex.printStackTrace() to findout where is from this NPE.