Coder Social home page Coder Social logo

Comments (7)

espenhw avatar espenhw commented on July 28, 2024

That's odd. I think I need to see the surefire-report (only org.grumblesmurf.malabar.ProjectsTest.txt is needed).

And you're quite correct on the pathSeparator thing - you're the first (known) user on Windows, so that's why nobody's spotted this before. I'll see if I can find the time to fix that. :)

from malabar-mode.

Peluko avatar Peluko commented on July 28, 2024

At work I'm forced to use Windows :-(

Here is the org.grumblesmurf.malabar.ProjectsTest.txt

-------------------------------------------------------------------------------
Test set: org.grumblesmurf.malabar.ProjectsTest
-------------------------------------------------------------------------------
Tests run: 6, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 1.484 sec <<< FAILURE!
transitiveCompileClasspath(org.grumblesmurf.malabar.ProjectsTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: 
Expected: a string containing "log4j"
     got: "c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\target\classes/;c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\src\main\resources"

    at org.junit.Assert.assertThat(Assert.java:750)
    at org.junit.Assert.assertThat(Assert.java:709)
    at org.junit.Assert$assertThat.callStatic(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:167)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:179)
    at org.grumblesmurf.malabar.ProjectsTest.transitiveCompileClasspath(ProjectsTest.groovy:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

transitiveTestClasspath(org.grumblesmurf.malabar.ProjectsTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: 
Expected: a string containing "slf4j"
     got: "c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\target\test-classes/;c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\target\classes/;c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\src\main\resources;c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\src\test\resources"

    at org.junit.Assert.assertThat(Assert.java:750)
    at org.junit.Assert.assertThat(Assert.java:709)
    at org.junit.Assert$assertThat.callStatic(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:167)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:179)
    at org.grumblesmurf.malabar.ProjectsTest.transitiveTestClasspath(ProjectsTest.groovy:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

runAGoal(org.grumblesmurf.malabar.ProjectsTest)  Time elapsed: 0.281 sec  <<< FAILURE!
java.lang.AssertionError: 
Expected: is <true>
     got: <false>

    at org.junit.Assert.assertThat(Assert.java:750)
    at org.junit.Assert.assertThat(Assert.java:709)
    at org.junit.Assert$assertThat.callStatic(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:167)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:179)
    at org.grumblesmurf.malabar.ProjectsTest.runAGoal(ProjectsTest.groovy:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
    at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
    at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
    at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
    at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

from malabar-mode.

espenhw avatar espenhw commented on July 28, 2024
transitiveCompileClasspath(org.grumblesmurf.malabar.ProjectsTest)  Time elapsed: 0 sec  <<< FAILURE!
java.lang.AssertionError: 
Expected: a string containing "log4j"
     got: "c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\target\classes/;c:\Temporal\espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e\espenhw-malabar-mode-1daaee4\src\main\resources"

That's not right, that's WAY too short. It almost looks as if the POM parsing fails somehow, but if that was the case other tests would fail.

Apparently the gathering at Project.groovy line 169 is not gathering what it should, but I don't know why (and don't have access to a Windows system to test). :(

from malabar-mode.

Peluko avatar Peluko commented on July 28, 2024

Hello again.

I've been tracking the problem, and I've found that it wasn't getting the correct path to my local repository. My Maven's settings.xml points the repository to 'c:/msys/1.0/home/user/.m2/repository', and it was working well, but the ProjectBuildingRequest created in Projects.groovy was pointing to 'c:/Documents and Settings/.m2/repository', which is the default location on windows when no other option is especified in settings.xml. I don't know why, I don't know how works the maven libraries. If you can point me to the right direction, I can try to fix it.

I've reverted my settings.xml to default values, and malabar compiles perfectly. Now I'll test if it works.

from malabar-mode.

Peluko avatar Peluko commented on July 28, 2024

Now, when I open a java file on emacs, I got the following error:

Debugger entered--Lisp error: (error "Unknown service: 1461")
  make-network-process(:name "Malabar Compile Server" :buffer #<buffer *Malabar Compile Server*> :host "localhost" :service "1461")
  open-network-stream("Malabar Compile Server" #<buffer *Malabar Compile Server*> "localhost" "1461")
  comint-exec(#<buffer *Malabar Compile Server*> "Malabar Compile Server" ("localhost" . "1461") nil nil)
  make-comint-in-buffer("Malabar Compile Server" nil ("localhost" . "1461") nil)
  apply(make-comint-in-buffer "Malabar Compile Server" nil ("localhost" . "1461") nil nil)
  make-comint("Malabar Compile Server" ("localhost" . "1461"))
  (let ((initial-points-alist ...)) (progress-reporter-force-update reporter 1 "Starting Groovy...starting process ") (with-current-buffer (get-buffer malabar-groovy-buffer-name) (unless silent ...) (apply ... malabar-groovy-comint-name malabar-groovy-java-command nil "-cp" ... ...) (malabar-groovy-mode)) (progress-reporter-force-update reporter 2 "Starting Groovy...requesting ports ") (malabar-groovy--get-server-ports-from-buffer malabar-groovy-buffer-name initial-points-alist) (progress-reporter-force-update reporter 3 "Starting Groovy...waiting for main prompt ") (malabar-groovy--wait-for-prompt malabar-groovy-buffer-name initial-points-alist) (progress-reporter-force-update reporter 4 "Starting Groovy...connecting to servers ") (make-comint malabar-groovy-compile-server-comint-name (cons "localhost" ...)) (make-comint malabar-groovy-eval-server-comint-name (cons "localhost" ...)) (progress-reporter-force-update reporter 5 "Starting Groovy...waiting for server prompts ") (malabar-groovy--wait-for-prompt malabar-groovy-compile-server-buffer-name initial-points-alist) (malabar-groovy--wait-for-prompt malabar-groovy-eval-server-buffer-name initial-points-alist) (progress-reporter-force-update reporter 6 "Starting Groovy...evaluating initial statements ") (dolist (process ...) (dolist ... ...)) (with-current-buffer malabar-groovy-compile-server-buffer-name (malabar-groovy--init-compile-server-buffer)) (with-current-buffer malabar-groovy-eval-server-buffer-name (malabar-groovy--init-eval-buffer)) (progress-reporter-force-update reporter 7 "Starting Groovy...") (progress-reporter-done reporter))
  (let ((reporter ...)) (let (...) (progress-reporter-force-update reporter 1 "Starting Groovy...starting process ") (with-current-buffer ... ... ... ...) (progress-reporter-force-update reporter 2 "Starting Groovy...requesting ports ") (malabar-groovy--get-server-ports-from-buffer malabar-groovy-buffer-name initial-points-alist) (progress-reporter-force-update reporter 3 "Starting Groovy...waiting for main prompt ") (malabar-groovy--wait-for-prompt malabar-groovy-buffer-name initial-points-alist) (progress-reporter-force-update reporter 4 "Starting Groovy...connecting to servers ") (make-comint malabar-groovy-compile-server-comint-name ...) (make-comint malabar-groovy-eval-server-comint-name ...) (progress-reporter-force-update reporter 5 "Starting Groovy...waiting for server prompts ") (malabar-groovy--wait-for-prompt malabar-groovy-compile-server-buffer-name initial-points-alist) (malabar-groovy--wait-for-prompt malabar-groovy-eval-server-buffer-name initial-points-alist) (progress-reporter-force-update reporter 6 "Starting Groovy...evaluating initial statements ") (dolist ... ...) (with-current-buffer malabar-groovy-compile-server-buffer-name ...) (with-current-buffer malabar-groovy-eval-server-buffer-name ...) (progress-reporter-force-update reporter 7 "Starting Groovy...") (progress-reporter-done reporter)))
  (if (malabar-groovy-live-p) nil (let (...) (let ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
  (unless (malabar-groovy-live-p) (let (...) (let ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...)))
  malabar-groovy-start(t)
  (let ((delay-mode-hooks t)) (java-mode) (setq major-mode (quote malabar-mode)) (setq mode-name "malabar") (progn (if ... ...) (unless ... ...) (let ... ...)) (use-local-map malabar-mode-map) (set-syntax-table malabar-mode-syntax-table) (setq local-abbrev-table malabar-mode-abbrev-table) (flet (... ...) (wisent-java-default-setup)) (setq semantic-lex-depth 10) (setq semantic-idle-scheduler-idle-time 1) (setq semantic-lex-analyzer (quote wisent-malabar-java-lexer)) (wisent-malabar-java-wy--install-parser) (srecode-minor-mode 1) (easy-menu-add malabar-mode-menu malabar-mode-map) (malabar-annotations-setup) (malabar-abbrevs-setup) (malabar-groovy-start t))
  (progn (make-local-variable (quote delay-mode-hooks)) (let (...) (java-mode) (setq major-mode ...) (setq mode-name "malabar") (progn ... ... ...) (use-local-map malabar-mode-map) (set-syntax-table malabar-mode-syntax-table) (setq local-abbrev-table malabar-mode-abbrev-table) (flet ... ...) (setq semantic-lex-depth 10) (setq semantic-idle-scheduler-idle-time 1) (setq semantic-lex-analyzer ...) (wisent-malabar-java-wy--install-parser) (srecode-minor-mode 1) (easy-menu-add malabar-mode-menu malabar-mode-map) (malabar-annotations-setup) (malabar-abbrevs-setup) (malabar-groovy-start t)))
  (delay-mode-hooks (java-mode) (setq major-mode (quote malabar-mode)) (setq mode-name "malabar") (progn (if ... ...) (unless ... ...) (let ... ...)) (use-local-map malabar-mode-map) (set-syntax-table malabar-mode-syntax-table) (setq local-abbrev-table malabar-mode-abbrev-table) (flet (... ...) (wisent-java-default-setup)) (setq semantic-lex-depth 10) (setq semantic-idle-scheduler-idle-time 1) (setq semantic-lex-analyzer (quote wisent-malabar-java-lexer)) (wisent-malabar-java-wy--install-parser) (srecode-minor-mode 1) (easy-menu-add malabar-mode-menu malabar-mode-map) (malabar-annotations-setup) (malabar-abbrevs-setup) (malabar-groovy-start t))
  malabar-mode()
  funcall(malabar-mode)
  (progn (funcall mode) mode)
  (if mode (progn (funcall mode) mode))
  (when mode (funcall mode) mode)
  (if (and keep-mode-if-same (eq ... ...)) nil (when mode (funcall mode) mode))
  (unless (and keep-mode-if-same (eq ... ...)) (when mode (funcall mode) mode))
  mumamo-ad-set-auto-mode-0(malabar-mode nil)
  set-auto-mode-0(malabar-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer Composer.java> "~/java/pruebasJWt/src/main/java/net/peluko/ape/composer/Composer.java" nil nil "~/java/pruebasJWt/src/main/java/net/peluko/ape/composer/Composer.java" ((8704 3 . 14328) (31280 . 19410)))
  find-file-noselect("~/java/pruebasJWt/src/main/java/net/peluko/ape/composer/Composer.java" nil nil t)
  find-file("~/java/pruebasJWt/src/main/java/net/peluko/ape/composer/Composer.java" t)
  call-interactively(find-file nil nil)

Any hints?

Thanks.

from malabar-mode.

emilssolmanis avatar emilssolmanis commented on July 28, 2024

That can be solved by changing the lines

        (make-comint malabar-groovy-compile-server-comint-name
                     (cons "localhost"
                          (number-to-string malabar-groovy-compile-server-port)))
        (make-comint malabar-groovy-eval-server-comint-name
                     (cons "localhost"
                           (number-to-string malabar-groovy-eval-server-port)))

to

        (make-comint malabar-groovy-compile-server-comint-name
                     (cons "localhost"
                           malabar-groovy-compile-server-port))
        (make-comint malabar-groovy-eval-server-comint-name
                     (cons "localhost"
                           malabar-groovy-eval-server-port))

open-network-stream considers the last param to be a Windows service, if it's a string, and a port if it is a number.

from malabar-mode.

Peluko avatar Peluko commented on July 28, 2024

Hello.

Now, after one year, I've retaken Java and I want to get malabar working. This solution gets rid of the error messages, but now I haver other problem. I'll start other ticket for the new problem.

Thanks.

from malabar-mode.

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.