Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Various Derby URLs fail in core.jdbc/connection

Aperta
#32 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
clojure, java
Ambito
database

Direzione di ricerca

Inizia dal punto di ingresso core.jdbc/connection e riproduci gli URL Derby mostrati nell’issue, inclusi la password con caratteri speciali e l’URL del database in memoria. Traccia come viene gestita la stringa JDBC grezza prima che DriverManager la riceva; il lavoro è completato quando entrambi gli URL si connettono correttamente senza richiedere ai chiamanti di creare personalmente le connessioni.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

e.g.

user=> (with-open [conn (jdbc/connection "derby:/path/to/db;user=dot;password=D^1@?pw*qwK")] (jdbc/execute conn "insert into foo values ('hello')"))
URISyntaxException Illegal character in path at index 37: derby:/path/to/db;user=dot;password=D^9@?pw*qwK  java.net.URI$Parser.fail (URI.java:2848)

user=> (with-open [conn (jdbc/connection "derby:memory:derby2pg;create=true")] "create table foo(bar varchar(10))")
SQLException No suitable driver found for jdbc:derby://  java.sql.DriverManager.getConnection (DriverManager.java:689)

Both of these urls work fine e.g.

user=> (with-open [conn (DriverManager/getConnection "jdbc:derby:/path/to/db;user=dot;password=D^9@?pw*qwK")] )
nil

user=> (with-open [conn (DriverManager/getConnection "jdbc:derby:memory:foobacle;create=true")] )
nil

In the first case, it looks like the code that attempts to make the connection is passing the string to java's URI class and fails because of some character in the password. This isn't that big of a deal for me to work around, because I can create the connections with DriverManager and just pass them on to the library. However, it seems like rather than forcing users of the library to do that, the library should not try to build a URI out of the raw string and simply create the connection based on the raw string.

Lingua principale
Clojure
Stelle
106
Fork
23
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di funcool/clojure.jdbc

Tutte le issue di funcool/clojure.jdbc

Issue simili

Altre issue su Clojure

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.