Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ejc-sql auto-complete error #56

Closed
stardiviner opened this issue Nov 9, 2018 · 5 comments
Closed

ejc-sql auto-complete error #56

stardiviner opened this issue Nov 9, 2018 · 5 comments
Labels

Comments

@stardiviner
Copy link
Contributor

Here is my configuration:

(use-package ejc-sql
  :ensure t
  :commands (ejc-connect ejc-connect-existing-repl ejc-sql-mode)
  :config
  (defun my-ejc-sql-ac-setup ()
    (ejc-sql-mode 1)
    (auto-complete-mode 1)
    (ejc-ac-setup))
  (add-hook 'sql-mode-hook #'my-ejc-sql-ac-setup)

  ;; (advice-add 'ejc-connect :before
  ;;             #'(lambda (connection-name)
  ;;                 (switch-to-buffer-other-window (format "*ejc-sql %s*" connection-name))))
  
  (ejc-create-connection
   "PostgreSQL-db-postgres"
   :classpath "~/.m2/repository/postgresql/postgresql/9.3-1102.jdbc41/postgresql-9.3-1102.jdbc41.jar"
   :dbtype "postgresql"
   :host "localhost"
   :port "5432"
   :user "postgres"
   :password "324324"
   :dbname "postgres")

  (ejc-create-connection
   "MariaDB-db-test"
   :classpath "~/.m2/repository/org/mariadb/jdbc/mariadb-java-client/1.1.7/mariadb-java-client-1.1.7.jar"
   :dbtype "mysql"
   :host "localhost"
   :port "3306"
   :user "root"
   :password "324324"
   :dbname "test")
  
  (ejc-create-connection
   "MySQL-db-test"
   :classpath "~/.m2/repository/mysql/mysql-connector-java/5.1.32/mysql-connector-java-5.1.32.jar"
   :dbtype "mysql"
   :host "localhost"
   :port "3306"
   :user "root"
   :password "324324"
   :dbname "test")
  )

After ejc-connect, I input sel I got error in auto-complete:

Error running timer ‘ac-update-greedy’: (error "MySQLSyntaxErrorException Unknown column ’s.schema_owner’ in ’field list’  sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
@stardiviner
Copy link
Contributor Author

Is it because I use MySQL-db-test? My Arch Linux uses MariaDB to replace MySQL. I tried use :dbtype "mariadb". But it is not recognized. So I still use :dbtype "mysql" for My MariaDB server. So I got upper error exception.

@kostafey
Copy link
Owner

kostafey commented Nov 9, 2018

@stardiviner Could you check it with the latest update, please?

@stardiviner
Copy link
Contributor Author

I installed updated version package.
Then raised another error:

Error running timer ‘ac-update-greedy’: (error "ConnectException Connection refused (Connection refused)  java.net.PlainSocketImpl.socketConnect (PlainSocketImpl.java:-2)
")

@stardiviner
Copy link
Contributor Author

I'm sure my mysqld.service is started and port is 3306.

@stardiviner
Copy link
Contributor Author

I restarted MySQL daemon. It works correct now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants