kostafey / ejc-sql

Emacs SQL client uses Clojure JDBC.
278 stars 29 forks source link

Failure on connect in Emacs 28 with native compilation #168

Closed AndreaCrotti closed 1 year ago

AndreaCrotti commented 2 years ago

I'm getting this error with Emacs 28 with native compilation turned on, so maybe it's related to that. I just get that when trying to connect to a database with M-x ejc-connect or M-x ejc-connect-interactive

Debugger entered--Lisp error: (wrong-type-argument stringp ("ELisp" (lexical-binding (:propertize "/l" help-echo "Using lexical-binding mode") (:propertize "/d" help-echo "Using old dynamic scoping mode\nmouse-1: Enable lex..." face warning mouse-face mode-line-highlight local-map (keymap (mode-line keymap (mouse-1 . elisp-enable-lexical-binding)))))))
  split-string(("ELisp" (lexical-binding (:propertize "/l" help-echo "Using lexical-binding mode") (:propertize "/d" help-echo "Using old dynamic scoping mode\nmouse-1: Enable lex..." face warning mouse-face mode-line-highlight local-map (keymap (mode-line keymap (mouse-1 . elisp-enable-lexical-binding)))))) "->\\[.+\\]")
grtcdr commented 2 years ago

Hi, I'm experiencing this as well. In my case, I'm using Oracle XE (ver. 21C) as my database, and connecting to it remotely.

My output is slightly different, but still very similar to yours:

Wrong type argument: stringp, ("ELisp" (lexical-binding (:propertize "/l" help-echo "Using lexical-binding mode") (:propertize "/d" help-echo "Using old dynamic scoping mode
mouse-1: Enable lexical-binding mode" face warning mouse-face mode-line-highlight local-map (keymap (mode-line keymap (mouse-1 . elisp-enable-lexical-binding))))))

EDIT: Through a bit of configuration on the database side, I've managed to move past the aforementioned error, but now I'm stuck facing this one instead:

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
  (CONNECTION_ID=VDVJLgzeQhmveBJbZix6YQ==)  oracle.net.ns.NSProtocolNIO.createRefusePacketException (NSProtocolNIO.java:816)

My configuration is as follows:

(use-package ejc-sql
  :ensure t
  :config
  (ejc-eldoc-setup)
  (ejc-ac-setup)
  (ejc-create-connection
   "ORACLE-JDBC"
   :classpath (getenv "OJDBC_PATH")
   :dbtype "oracle"
   ;; "MYDB" is a pluggable database, with its own listener and port.
   :dbname "MYDB"
   :host "REDACTED"
   :port "REDACTED"
   :user "REDACTED"
   :password "REDACTED"
   :separator "/")

  :custom
  (clomacs-httpd-default-port 8090)
  (ejc-completion-system 'standard))

I've tried all combinations of :dbtype, none have worked so far.


Just to be sure, I went ahead and tried a different connection. This time I used a local SQLite database, here's the connection expression:

  (ejc-create-connection
   "SQLite DB (test.db)"
   :classpath (concat "~/.m2/repository/org/xerial/sqlite-jdbc/"
                      "3.8.11.2/sqlite-jdbc-3.8.11.2.jar")
   :subprotocol "sqlite"
   :subname (concat "file://"
                    (file-truename "~/test.db")))

I wasn't successful here either, the error output was:

Wrong type argument: stringp, ("ELisp" (lexical-binding (:propertize "/l" help-echo "Using lexical-binding mode") (:propertize "/d" help-echo "Using old dynamic scoping mode
mouse-1: Enable lexical-binding mode" face warning mouse-face mode-line-highlight local-map (keymap (mode-line keymap (mouse-1 . elisp-enable-lexical-binding))))))
md-zengo commented 2 years ago

I'm experiencing the same issue.


mouse-1: Enable lexical-binding mode" face warning mouse-face mode-line-highlight local-map (keymap (mode-line keymap (mouse-1 . elisp-enable-lexical-binding))))))
Mark set ```
kostafey commented 1 year ago

Issue fixed. Sorry for the late response.