| From: | Dan <dan(at)scapps(dot)co(dot)uk> |
|---|---|
| To: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
| Subject: | Configuring Hibernate for PostgreSQL Access Over Unix Socket With JDBC |
| Date: | 2019-12-08 12:13:55 |
| Message-ID: | adab8102-6e97-e2b8-c7fd-2c741b8135f5@scapps.co.uk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Hello,
I hope it is appropriate to send this question to this address. If not,
kindly redirect me.
I am trying to configure Hibernate to use a Unix socket connection to my
local PostgreSQL installation. I have referred to this doc:
https://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters
and have been trying entries in hibernate.cfg.xml along these lines:
<property
name="hibernate.connection.url">jdbc:postgresql:kokodoko?socketFactory=org.newsclub.net.unix.socketfactory.PostgresqlAFUNIXSocketFactory&socketFactoryArg=/var/run/postgresql/.s.PGSQL.5432</property>
The XML validator in Eclipse is flagging this error:
The reference to entity "socketFactoryArg" must end with the ';'
delimiter.
(Of course I have tried many variations such as inserting semicolons in
various places, quoting the argument, using square brackets and so on.)
If I ignore the error and try to use config file I get this error:
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message":
"org.hibernate.internal.util.config.ConfigurationException: Unable to
perform unmarshalling at line number 0 and column 0 in RESOURCE
hibernate.cfg.xml. Message: null"
}
],
"code": 503,
"message":
"org.hibernate.internal.util.config.ConfigurationException: Unable to
perform unmarshalling at line number 0 and column 0 in RESOURCE
hibernate.cfg.xml. Message: null"
}
}
which I take to mean that the config file is unusable.
Is what I am trying to do (Hibernate, JDBC, PostgreSQL,
hibernate.cfg.xml, Unix socket) possible? If so, kindly give me some
guidance. If not, can you suggest a different approach that uses a Unix
socket?
I am posting a similar request on the Hibernate forum.
Thanks very much.
-Dan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sehrope Sarkuni | 2019-12-08 13:27:59 | Re: Configuring Hibernate for PostgreSQL Access Over Unix Socket With JDBC |
| Previous Message | Vladimir Sitnikov | 2019-12-07 14:23:29 | [pgjdbc/pgjdbc] |