Git Product home page Git Product logo

Comments (3)

romario89 avatar romario89 commented on July 18, 2024

I guess it's got something to do with the Windows XP's path names with spaces on it like C:\Documents and Settings\IBMR61 and when Meghanada tries to read from it, it results in pathnames like these (taken from the code above)

C:\Documents, and, Settings\IBMR61\Local, Settings\Temp\meghanada488kTN.java

You see commas after the names with space: 'Documents, ' That must be causing trouble.

from meghanada-server.

romario89 avatar romario89 commented on July 18, 2024

I think I've found the cause of the problem:

The tmpfile in meghanada--write-tmpfile function and the log file in meghanada--start-server-process function, at meghanada.el were using the C:/Documents and Settings/... path. I've harcoded those variables so that they will use the path like: C:/temp i.e. no spaces in path.

After this change, the aforementioned Error:c:/Documents problem disappeared and meghanada server started to print the member functions , the variables and the class objects as a dropdown box. That's good but one more problem occurs which I think is related to the same Windows XP Documents and Settings path. When I enter code in a java file the mini buffer says:

Error while checking syntax automatically...

because in the server log it says:

[ERROR][CommandHan:  49] Catching
java.lang.NumberFormatException: For input string: "**and**"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_153]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:1.8.0_153]

I guess the and in the log is the and at the Documents and Settings

from meghanada-server.

romario89 avatar romario89 commented on July 18, 2024

When I open a simple project named Permutasyon and type this simple Java code

System.out.println("OK");

Meghanada Server says in the mini buffer: WARN not match type
And I get this from the meghanada-server-log

[INFO ][Main      :  54] use java home: C:\ProgramFiles\zulu8.25.0.3-jdk8.0.153-win_i686\jre
[INFO ][Main      :  55] use java runtime: OpenJDK Runtime Environment 1.8.0_153-b01
[INFO ][Main      :  59] use java vm: OpenJDK Client VM 25.153-b01
[INFO ][ClassPathU:  26] add tools.jar path:C:\ProgramFiles\zulu8.25.0.3-jdk8.0.153-win_i686\lib\tools.jar
[WARN ][PerfDataUt: 228] Failed to add PDH Counter: \Memory\Pages Input/sec, Error code: 0xC0000BB8
[INFO ][Session   : 193] load project from cache. projectRoot:C:\java\Permutasyon
[INFO ][EmacsServe: 364] zpage tracez handler http://localhost:1062/tracez
[INFO ][EmacsServe: 370] Start server Listen localhost port:1065
[INFO ][EmacsServe: 391] client connected
[INFO ][CacheEvent:  71] start analyze sources ...
[INFO ][Project   : 318] project Permutasyon compile and analyze (java) 0 files. force:false problem:0 elapsed:36.55 ms
[INFO ][CacheEvent:  97] class index size:4665 total elapsed:1.046 s
[INFO ][CacheEvent: 102] Ready
[WARN ][JavaSource:  75] source cache miss C:\java\Permutasyon\src\.#Permutation.java
[ERROR][CommandHan:  49] Catching
java.io.FileNotFoundException: File 'C:\Documents' does not exist
	at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299) ~[meghanada-1.2.0.jar:?]
	at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1711) ~[meghanada-1.2.0.jar:?]
	at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1748) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.CommandHandler.diagnostics(CommandHandler.java:115) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.emacs.EmacsServer.lambda$dispatch$8(EmacsServer.java:148) ~[meghanada-1.2.0.jar:?]
	at com.leacox.motif.matching.Matching1.lambda$get$15(Matching1.java:45) ~[meghanada-1.2.0.jar:?]
	at com.leacox.motif.matching.Pattern$1.apply(Pattern.java:40) ~[meghanada-1.2.0.jar:?]
	at com.leacox.motif.matching.FluentMatchingR.getMatch(FluentMatchingR.java:118) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.emacs.EmacsServer.dispatch(EmacsServer.java:350) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.emacs.EmacsServer.lambda$acceptConnection$35(EmacsServer.java:436) ~[meghanada-1.2.0.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_153]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_153]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_153]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_153]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_153]
[INFO ][EmacsServe: 352] receive [dl, C:\java\Permutasyon\src\Permutation.java, C:\Documents, and, Settings\use\Local, Settings\Temp\meghanada632eXl.java]. elapsed:155.9 ms
[ERROR][CommandHan:  49] Catching
java.io.FileNotFoundException: File 'C:\Documents' does not exist
	at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299) ~[meghanada-1.2.0.jar:?]
	at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1711) ~[meghanada-1.2.0.jar:?]
	at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1748) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.CommandHandler.diagnostics(CommandHandler.java:115) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.emacs.EmacsServer.lambda$dispatch$8(EmacsServer.java:148) ~[meghanada-1.2.0.jar:?]
	at com.leacox.motif.matching.Matching1.lambda$get$15(Matching1.java:45) ~[meghanada-1.2.0.jar:?]
	at com.leacox.motif.matching.Pattern$1.apply(Pattern.java:40) ~[meghanada-1.2.0.jar:?]
	at com.leacox.motif.matching.FluentMatchingR.getMatch(FluentMatchingR.java:118) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.emacs.EmacsServer.dispatch(EmacsServer.java:350) ~[meghanada-1.2.0.jar:?]
	at meghanada.server.emacs.EmacsServer.lambda$acceptConnection$35(EmacsServer.java:436) ~[meghanada-1.2.0.jar:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_153]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_153]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_153]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_153]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_153]
[INFO ][EmacsServe: 352] receive [dl, C:\java\Permutasyon\src\Permutation.java, C:\Documents, and, Settings\use\Local, Settings\Temp\meghanada632rhr.java]. elapsed:3.495 ms
[INFO ][EmacsServe: 352] receive [ap, C:\java\Permutasyon\src\Permutation.java, 12, 14, *System*println#]. elapsed:742.4 ms

Thats very likely to be caused by the Windows XP's default-directory i.e. C:\Documents and Settings\<username> spaces cause the Meghanada to interpret the line incorrectly.

from meghanada-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.