weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
608 stars 85 forks source link

WARNING: An illegal reflective access operation has occurred #141

Closed sittim closed 4 years ago

sittim commented 4 years ago

Issue:

Using ragtime, it seems to work for postgres, but I am getting this error:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.postgresql.jdbc.TimestampUtils (file:/home/sporty/.m2/repository/org/postgresql/postgresql/42.1.3/postgresql-42.1.3.jar) to field java.util.TimeZone.defaultTimeZone
WARNING: Please consider reporting this to the maintainers of org.postgresql.jdbc.TimestampUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Applying 2020-05-15-001-add_user_table

OS

Ubuntu 20.02

deps.edn:

:deps {org.clojure/clojure {:mvn/version "1.10.1"}
  seancorfield/next.jdbc {:mvn/version "1.0.424"}
  org.postgresql/postgresql {:mvn/version "42.1.3"}
  clj-time/clj-time {:mvn/version "0.15.2"}}

Database Config

(def config 
  {:datastore (jdbc/sql-database {:dbtype "postgresql"
                                  :dbname "my_db"
                                  :host "localhost"
                                  :port "5432"
                                  :user "me_the_user"
                                  :password "my_password"})
   :migrations (jdbc/load-resources "migrations")})

Postgresql Version

[I] /home/me/clojure/my_app~> psql --version
psql (PostgreSQL) 12.2 (Ubuntu 12.2-4)
sittim commented 4 years ago

OK, so I did find an answer here https://www.postgresql.org/message-id/CADK3HH%2Byydz_i0%3D5A_706kNawmiGDZoK55ZhNyttyb%3DoqapYYQ%40mail.gmail.com

My source of the version was outdated. org.postgresql/postgresql {:mvn/version "42.1.3"} should be org.postgresql/postgresql {:mvn/version "42.2.12") per: https://jdbc.postgresql.org/

weavejester commented 4 years ago

Okay, so nothing to do with Ragtime then?

sittim commented 4 years ago

Correct, thanks.