Re: Configuring Hibernate for PostgreSQL Access Over Unix Socket With JDBC
Dan <[email protected]> Sun, 8 Dec 2019 17:21:46 +0000
| Newsgroups | gmane.comp.db.postgresql.jdbc |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------069796CAE29D91864DFBB2DF
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Hi Radoslav,
Thanks very much for getting back to me.
Here is the config line that is now working for me:
<property
name="hibernate.connection.url">jdbc:postgresql:kokodoko?socketFactory=org.newsclub.net.unix.socketfactory.PostgresqlAFUNIXSocketFactory&socketFactoryArg=/var/run/postgresql/.s.PGSQL.5432</property>
-Dan
On 08/12/2019 14:17, Radoslav Petrov wrote:
>
>
> On 8.12.2019 14:13, Dan wrote:
>> <property
>> name="hibernate.connection.url">jdbc:postgresql:kokodoko?socketFactory=org.newsclub.net.unix.socketfactory.PostgresqlAFUNIXSocketFactory&socketFactoryArg=/var/run/postgresql/.s.PGSQL.5432</property>
>
> On 8.12.2019 15:27, Sehrope Sarkuni wrote:
>> Is the issue the unescaped ampersand? (the "&")
>>
>> Replace any raw & in the URL value with & and see if that works.
>> I think this is just an XML parsing issue unrelated to the driver itself.
>>
>> Regards,
>> -- Sehrope Sarkuni
>> Founder & CEO | JackDB, Inc. | https://www.jackdb.com/
>
> Also the documentation of `junixsockets` mentions three ways to
> provide the configuration of the JDBC connection for PostgreSQL.
> https://kohlschutter.github.io/junixsocket/dependency.html
> It states mandatory use of `localhost` in the connection string for
> variant 1 and 2. IMO You are using variant 1.
>
> --
> Поздрави, | Best regards,
> Радослав Петров | Radoslav Petrov
--------------069796CAE29D91864DFBB2DF
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Radoslav,</p>
<p>Thanks very much for getting back to me.</p>
<p>Here is the config line that is now working for me:</p>
<p> <property
name="hibernate.connection.url">jdbc:postgresql:kokodoko?socketFactory=org.newsclub.net.unix.socketfactory.PostgresqlAFUNIXSocketFactory&amp;socketFactoryArg=/var/run/postgresql/.s.PGSQL.5432</property>
<br>
</p>
<p>-Dan<br>
</p>
<div class="moz-cite-prefix">On 08/12/2019 14:17, Radoslav Petrov
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<p><br>
</p>
On 8.12.2019 14:13, Dan wrote:<br>
<blockquote
cite="mid:[email protected]"
type="cite"><span style="color: rgb(13, 10, 11); font-family:
"Open Sans", sans-serif; font-size: 15.3333px;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: 400; letter-spacing:
normal; orphans: 2; text-align: left; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;"><property
name="hibernate.connection.url">jdbc:postgresql:kokodoko?socketFactory=org.newsclub.net.unix.socketfactory.PostgresqlAFUNIXSocketFactory&socketFactoryArg=/var/run/postgresql/.s.PGSQL.5432</property></span><br>
</blockquote>
<br>
<div class="moz-cite-prefix">On 8.12.2019 15:27, Sehrope Sarkuni
wrote:<br>
</div>
<blockquote
cite="mid:CAH7T-ao-2bryKEYRjDFAgGYpgi8R46oMrLegTenmJ+-WOX8h+g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div dir="ltr">
<div>Is the issue the unescaped ampersand? (the "&")</div>
<div><br>
</div>
<div>Replace any raw & in the URL value with &amp;
and see if that works. I think this is just an XML parsing
issue unrelated to the driver itself.</div>
<br clear="all">
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div style="font-family:arial;font-size:small">Regards,</div>
<div style="font-family:arial;font-size:small">--
Sehrope Sarkuni</div>
<div style="font-family:arial;font-size:small">Founder
& CEO | JackDB, Inc. | <a moz-do-not-send="true"
href="https://www.jackdb.com/"
style="color:rgb(17,85,204)" target="_blank">https://www.jackdb.com/</a></div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
Also the documentation of `junixsockets` mentions three ways to
provide the configuration of the JDBC connection for PostgreSQL. <a
class="moz-txt-link-freetext"
href="https://kohlschutter.github.io/junixsocket/dependency.html"
moz-do-not-send="true">https://kohlschutter.github.io/junixsocket/dependency.html</a>
<br>
It states mandatory use of `localhost` in the connection string
for variant 1 and 2. IMO You are using variant 1.<br>
<br>
<pre class="moz-signature" cols="72">--
Поздрави, | Best regards,
Радослав Петров | Radoslav Petrov</pre>
</blockquote>
</body>
</html>
--------------069796CAE29D91864DFBB2DF--