user can't access own database after creation
user can't access own database after creation
When attempting to access a PostgreSQL 9.4 database via JDBC on my local Windows environment, everything works as intended. The database user can access the database they have previously created from the admin UI of the application.
Things take a turn for the worse when trying to perform the exact same operation against any PostgreSQL 9.x backend running remotely on either Ubuntu 12.04 / 14.04 / 15.04. The application log keeps spewing the error below.
2015-12-01 11:04:25,291 WARN [http-nio-8080-exec-5] log.Log4jLogger - the entity manager of "Task" has not been initialized
2015-12-01 11:04:25,292 ERROR [http-nio-8080-exec-5] log.Log4jLogger - u90srlidr034307j user1 jdbc:postgresql://10.10.10.97:5432/task0bg96qj544p0yu37Changing the JDBC URL to jdbc:postgresql://10.10.10.100:5432/db1?user=user1&password=password&ssl=true did not make any difference.
I have ascertained that postgres can log in via psql using the details JDBC is suppilied with. Got similar results on PoatgreSQL 9.2, 9.3 and 9.4
root@Ubuntu-1204-precise-64-minimal ~ # sql -d db1 -U user1 -h 10.10.10.97 -W
Password for user user1:
psql (9.4.5, server 9.4.5)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.
db1=# Moreover, the auth method is set to trust on pg_hba.conf, meaning that PostgreSQL will accept all kinds of auth methods from the specified host.
host all all 10.10.10.99/32 trustTo recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them.
I've compared the pg_hba.conf and postgresql.comf files on both my localhost and the remote server and did not find anything outstanding.
The database JDBC is connecting to appears to have correct permissions.
db1 | user1 | UTF8 | C | C | =Tc/user1 + | | | | | user1=CTc/user1The JDBC-PostreSQL driver used by the application is postgresql-9.4-1201.jdbc4.jar.
Re: user can't access own database after creation
Dear everyone,When attempting to access a PostgreSQL 9.4 database via JDBC on my local Windows environment, everything works as intended. The database user can access the database they have previously created from the admin UI of the application.
Things take a turn for the worse when trying to perform the exact same operation against any PostgreSQL 9.x backend running remotely on either Ubuntu 12.04 / 14.04 / 15.04. The application log keeps spewing the error below.
2015-12-01 11:04:25,291 WARN [http-nio-8080-exec-5] log.Log4jLogger - the entity manager of "Task" has not been initialized 2015-12-01 11:04:25,292 ERROR [http-nio-8080-exec-5] log.Log4jLogger - u90srlidr034307j user1 jdbc:postgresql://10.10.10.97:5432/task0bg96qj544p0yu37Changing the JDBC URL to jdbc:postgresql://10.10.10.100:5432/db1?user=user1&password=password&ssl=true did not make any difference.
I have ascertained that postgres can log in via psql using the details JDBC is suppilied with. Got similar results on PoatgreSQL 9.2, 9.3 and 9.4
root@Ubuntu-1204-precise-64-minimal ~ # sql -d db1 -U user1 -h 10.10.10.97 -W Password for user user1: psql (9.4.5, server 9.4.5) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. db1=#Moreover, the auth method is set to trust on pg_hba.conf, meaning that PostgreSQL will accept all kinds of auth methods from the specified host.
host all all 10.10.10.99/32 trustTo recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them.I've compared the pg_hba.conf and postgresql.comf files on both my localhost and the remote server and did not find anything outstanding.
The database JDBC is connecting to appears to have correct permissions.
db1 | user1 | UTF8 | C | C | =Tc/user1 + | | | | | user1=CTc/user1The JDBC-PostreSQL driver used by the application is postgresql-9.4-1201.jdbc4.jar.
You may find here a partial dump of the PostgreSQL log, which shows queries performed when the error happens,Finally the relevant portion of the Java source file where the connection is defined looks as follows:pool.initConnectionPool(driver, appProfile.getURI(), dbLogin, dbPwd);Map<String, String> properties = new HashMap<String, String>();properties.put(PersistenceUnitProperties.JDBC_DRIVER, driver);properties.put(PersistenceUnitProperties.JDBC_USER, dbLogin);properties.put(PersistenceUnitProperties.JDBC_PASSWORD, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_PROPERTY, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_URL, appProfile.getURI());The full version of the file can be found here:Thank you very much for reading.
Re: user can't access own database after creation
On 2 Dec 2015, at 18:32, David G. Johnston <david.g.johnston@gmail.com> wrote:Dear everyone,When attempting to access a PostgreSQL 9.4 database via JDBC on my local Windows environment, everything works as intended. The database user can access the database they have previously created from the admin UI of the application.
Things take a turn for the worse when trying to perform the exact same operation against any PostgreSQL 9.x backend running remotely on either Ubuntu 12.04 / 14.04 / 15.04. The application log keeps spewing the error below.
2015-12-01 11:04:25,291 WARN [http-nio-8080-exec-5] log.Log4jLogger - the entity manager of "Task" has not been initialized 2015-12-01 11:04:25,292 ERROR [http-nio-8080-exec-5] log.Log4jLogger - u90srlidr034307j user1 jdbc:postgresql://10.10.10.97:5432/task0bg96qj544p0yu37Changing the JDBC URL to jdbc:postgresql://10.10.10.100:5432/db1?user=user1&password=password&ssl=true did not make any difference.
I have ascertained that postgres can log in via psql using the details JDBC is suppilied with. Got similar results on PoatgreSQL 9.2, 9.3 and 9.4
root@Ubuntu-1204-precise-64-minimal ~ # sql -d db1 -U user1 -h 10.10.10.97 -W Password for user user1: psql (9.4.5, server 9.4.5) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. db1=#Moreover, the auth method is set to trust on pg_hba.conf, meaning that PostgreSQL will accept all kinds of auth methods from the specified host.
host all all 10.10.10.99/32 trustTo recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them.I've compared the pg_hba.conf and postgresql.comf files on both my localhost and the remote server and did not find anything outstanding.
The database JDBC is connecting to appears to have correct permissions.
db1 | user1 | UTF8 | C | C | =Tc/user1 + | | | | | user1=CTc/user1The JDBC-PostreSQL driver used by the application is postgresql-9.4-1201.jdbc4.jar.
You may find here a partial dump of the PostgreSQL log, which shows queries performed when the error happens,Finally the relevant portion of the Java source file where the connection is defined looks as follows:pool.initConnectionPool(driver, appProfile.getURI(), dbLogin, dbPwd);Map<String, String> properties = new HashMap<String, String>();properties.put(PersistenceUnitProperties.JDBC_DRIVER, driver);properties.put(PersistenceUnitProperties.JDBC_USER, dbLogin);properties.put(PersistenceUnitProperties.JDBC_PASSWORD, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_PROPERTY, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_URL, appProfile.getURI());The full version of the file can be found here:Thank you very much for reading.I've read this twice and maybe I'm being dense but I see nothing here that is readily actionable. Nor does it suggest a problem with the JDBC driver."""To recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them."""You should try to organize and simplify you situation better, and hopefully in so doing will find your problem. I'm doubting it has anything to do with the driver and am not inclined to start debugging your application from the limited information provided. Unless you are referring to pgAdmin somewhere in here but if you are you should use its proper name and not "admin UI”.
Dave
Re: user can't access own database after creation
On 2 Dec 2015, at 18:32, David G. Johnston <david.g.johnston@gmail.com> wrote:Dear everyone,When attempting to access a PostgreSQL 9.4 database via JDBC on my local Windows environment, everything works as intended. The database user can access the database they have previously created from the admin UI of the application.
Things take a turn for the worse when trying to perform the exact same operation against any PostgreSQL 9.x backend running remotely on either Ubuntu 12.04 / 14.04 / 15.04. The application log keeps spewing the error below.
2015-12-01 11:04:25,291 WARN [http-nio-8080-exec-5] log.Log4jLogger - the entity manager of "Task" has not been initialized 2015-12-01 11:04:25,292 ERROR [http-nio-8080-exec-5] log.Log4jLogger - u90srlidr034307j user1 jdbc:postgresql://10.10.10.97:5432/task0bg96qj544p0yu37Changing the JDBC URL to jdbc:postgresql://10.10.10.100:5432/db1?user=user1&password=password&ssl=true did not make any difference.
I have ascertained that postgres can log in via psql using the details JDBC is suppilied with. Got similar results on PoatgreSQL 9.2, 9.3 and 9.4
root@Ubuntu-1204-precise-64-minimal ~ # sql -d db1 -U user1 -h 10.10.10.97 -W Password for user user1: psql (9.4.5, server 9.4.5) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. db1=#Moreover, the auth method is set to trust on pg_hba.conf, meaning that PostgreSQL will accept all kinds of auth methods from the specified host.
host all all 10.10.10.99/32 trustTo recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them.I've compared the pg_hba.conf and postgresql.comf files on both my localhost and the remote server and did not find anything outstanding.
The database JDBC is connecting to appears to have correct permissions.
db1 | user1 | UTF8 | C | C | =Tc/user1 + | | | | | user1=CTc/user1The JDBC-PostreSQL driver used by the application is postgresql-9.4-1201.jdbc4.jar.
You may find here a partial dump of the PostgreSQL log, which shows queries performed when the error happens,Finally the relevant portion of the Java source file where the connection is defined looks as follows:pool.initConnectionPool(driver, appProfile.getURI(), dbLogin, dbPwd);Map<String, String> properties = new HashMap<String, String>();properties.put(PersistenceUnitProperties.JDBC_DRIVER, driver);properties.put(PersistenceUnitProperties.JDBC_USER, dbLogin);properties.put(PersistenceUnitProperties.JDBC_PASSWORD, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_PROPERTY, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_URL, appProfile.getURI());The full version of the file can be found here:Thank you very much for reading.I've read this twice and maybe I'm being dense but I see nothing here that is readily actionable. Nor does it suggest a problem with the JDBC driver."""To recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them."""You should try to organize and simplify you situation better, and hopefully in so doing will find your problem. I'm doubting it has anything to do with the driver and am not inclined to start debugging your application from the limited information provided. Unless you are referring to pgAdmin somewhere in here but if you are you should use its proper name and not "admin UI”.I don’t use any GUI to admin the postgresql, so by admin UI i actually mean the admin interact of the Java application that is generating the reported error.Cheers,Nuno.Dave
Re: user can't access own database after creation
On 2 Dec 2015, at 19:14, Dave Cramer <pg@fastcrypt.com> wrote:One thing I noticed is that psql is connecting via SSL.Have a look at the pg logs to see what the error isOn 2 December 2015 at 13:37, Nuno Zimas <nzimas@gmail.com> wrote:On 2 Dec 2015, at 18:32, David G. Johnston <david.g.johnston@gmail.com> wrote:Dear everyone,When attempting to access a PostgreSQL 9.4 database via JDBC on my local Windows environment, everything works as intended. The database user can access the database they have previously created from the admin UI of the application.
Things take a turn for the worse when trying to perform the exact same operation against any PostgreSQL 9.x backend running remotely on either Ubuntu 12.04 / 14.04 / 15.04. The application log keeps spewing the error below.
2015-12-01 11:04:25,291 WARN [http-nio-8080-exec-5] log.Log4jLogger - the entity manager of "Task" has not been initialized 2015-12-01 11:04:25,292 ERROR [http-nio-8080-exec-5] log.Log4jLogger - u90srlidr034307j user1 jdbc:postgresql://10.10.10.97:5432/task0bg96qj544p0yu37Changing the JDBC URL to jdbc:postgresql://10.10.10.100:5432/db1?user=user1&password=password&ssl=true did not make any difference.
I have ascertained that postgres can log in via psql using the details JDBC is suppilied with. Got similar results on PoatgreSQL 9.2, 9.3 and 9.4
root@Ubuntu-1204-precise-64-minimal ~ # sql -d db1 -U user1 -h 10.10.10.97 -W Password for user user1: psql (9.4.5, server 9.4.5) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. db1=#Moreover, the auth method is set to trust on pg_hba.conf, meaning that PostgreSQL will accept all kinds of auth methods from the specified host.
host all all 10.10.10.99/32 trustTo recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them.I've compared the pg_hba.conf and postgresql.comf files on both my localhost and the remote server and did not find anything outstanding.
The database JDBC is connecting to appears to have correct permissions.
db1 | user1 | UTF8 | C | C | =Tc/user1 + | | | | | user1=CTc/user1The JDBC-PostreSQL driver used by the application is postgresql-9.4-1201.jdbc4.jar.
You may find here a partial dump of the PostgreSQL log, which shows queries performed when the error happens,Finally the relevant portion of the Java source file where the connection is defined looks as follows:pool.initConnectionPool(driver, appProfile.getURI(), dbLogin, dbPwd);Map<String, String> properties = new HashMap<String, String>();properties.put(PersistenceUnitProperties.JDBC_DRIVER, driver);properties.put(PersistenceUnitProperties.JDBC_USER, dbLogin);properties.put(PersistenceUnitProperties.JDBC_PASSWORD, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_PROPERTY, dbPwd);//properties.put(PersistenceUnitProperties.JDBC_URL, appProfile.getURI());The full version of the file can be found here:Thank you very much for reading.I've read this twice and maybe I'm being dense but I see nothing here that is readily actionable. Nor does it suggest a problem with the JDBC driver."""To recap, once a user is added to the database backend from the admin UI (via JDBC), they can create databases themselves, but cannot access them."""You should try to organize and simplify you situation better, and hopefully in so doing will find your problem. I'm doubting it has anything to do with the driver and am not inclined to start debugging your application from the limited information provided. Unless you are referring to pgAdmin somewhere in here but if you are you should use its proper name and not "admin UI”.I don’t use any GUI to admin the postgresql, so by admin UI i actually mean the admin interact of the Java application that is generating the reported error.Cheers,Nuno.Dave
Re: user can't access own database after creation
On 12/2/2015 11:55 AM, Nuno Zimas wrote: > psql always connects successfully no matter what. > As for JDBC, we get the same results with or without ssl=true > explicitly appended to the URL. > What truly baffles me is that ye exact same java application works > with no hiccups against a quasi-vanilla pgsql backend i’ve installed > on windows 10. > So far, the only visible difference I found is in the values for > LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and > English_United States.1252 on the local pgsql instance. > Not sure how tis would affect accessing the DBs, though. can you connect using psql on the windows system to the ubuntu hosted database? -- john r pierce, recycling bits in santa cruz
Re: user can't access own database after creation
On 12/2/2015 11:55 AM, Nuno Zimas wrote:psql always connects successfully no matter what.
As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
Not sure how tis would affect accessing the DBs, though.
can you connect using psql on the windows system to the ubuntu hosted database?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
On 2 Dec 2015, at 19:57, John R Pierce <pierce@hogranch.com> wrote:On 12/2/2015 11:55 AM, Nuno Zimas wrote:psql always connects successfully no matter what.
As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
Not sure how tis would affect accessing the DBs, though.
can you connect using psql on the windows system to the ubuntu hosted database?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
On 2 Dec 2015, at 20:18, Dave Cramer <pg@fastcrypt.com> wrote:Can you try a very simple JDBC program to see if you can connect ?Dave Cramer
On 2 December 2015 at 14:57, John R Pierce <pierce@hogranch.com> wrote:On 12/2/2015 11:55 AM, Nuno Zimas wrote:psql always connects successfully no matter what.
As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
Not sure how tis would affect accessing the DBs, though.
can you connect using psql on the windows system to the ubuntu hosted database?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
On 12/2/2015 12:22 PM, Nuno Zimas wrote: > Absolutely. > I can connect via psql to postgresql on Ubuntu from party much anywhere. what does the pg_hba.conf file look like on the ubuntu server ? -- john r pierce, recycling bits in santa cruz
Re: user can't access own database after creation
import java.sql.Connection
/**
* Created by davec on 2014-03-28.
*/
class TestUrl
{
public static void main(String []args)
{
Connection con = java.sql.DriverManager.getConnection("jdbc:postgresql://yourhost","youruser","password");
con.createStatement().execute("select 1");
}
}
save it in a file called TestUrl.java
compile it with javac TestUrl.java
run it with java -cp postgresql.jar:./ TestUrl
change the names above to suit
On 2 Dec 2015, at 20:18, Dave Cramer <pg@fastcrypt.com> wrote:Can you try a very simple JDBC program to see if you can connect ?Dave CramerCould you please suggest one already compiled?I’m not a java programmer and it’s been hell on rather to compile even the simplest java source file due to dependency issues.On 2 December 2015 at 14:57, John R Pierce <pierce@hogranch.com> wrote:On 12/2/2015 11:55 AM, Nuno Zimas wrote:psql always connects successfully no matter what.
As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
Not sure how tis would affect accessing the DBs, though.
can you connect using psql on the windows system to the ubuntu hosted database?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
On 12/2/2015 12:22 PM, Nuno Zimas wrote:Absolutely.
I can connect via psql to postgresql on Ubuntu from party much anywhere.
what does the pg_hba.conf file look like on the ubuntu server ?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
On 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:this isn't compiled, but it has no dependencies to compile and only one to runimport java.sql.Connection
/**
* Created by davec on 2014-03-28.
*/
class TestUrl
{
public static void main(String []args)
{
Connection con = java.sql.DriverManager.getConnection("jdbc:postgresql://yourhost","youruser","password");
con.createStatement().execute("select 1");
}
}save it in a file called TestUrl.javacompile it with javac TestUrl.javarun it with java -cp postgresql.jar:./ TestUrlchange the names above to suitOn 2 December 2015 at 15:35, Nuno Zimas <nzimas@gmail.com> wrote:On 2 Dec 2015, at 20:18, Dave Cramer <pg@fastcrypt.com> wrote:Can you try a very simple JDBC program to see if you can connect ?Dave CramerCould you please suggest one already compiled?I’m not a java programmer and it’s been hell on rather to compile even the simplest java source file due to dependency issues.On 2 December 2015 at 14:57, John R Pierce <pierce@hogranch.com> wrote:On 12/2/2015 11:55 AM, Nuno Zimas wrote:psql always connects successfully no matter what.
As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
Not sure how tis would affect accessing the DBs, though.
can you connect using psql on the windows system to the ubuntu hosted database?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
That's easily fixed by adding the missing ';' just as the error indicates :)
On Dec 2, 2015, at 12:48 PM, Nuno Zimas wrote:
>
> Hi Dave,
>
> I’m getting an error.
>
> root@aida2next /u/2next# javac TestUrl.java
> TestUrl.java:1: error: ';' expected
> import java.sql.Connection
> ^
> 1 error
>
>
>
>> On 2 Dec 2015, at 20:39, Dave Cramer wrote:
>>
>> this isn't compiled, but it has no dependencies to compile and only one to run
>>
>> import java.sql.Connection
>>
>> /**
>> * Created by davec on 2014-03-28.
>> */
>> class TestUrl
>> {
>> public static void main(String []args)
>> {
>> Connection con = java.sql.DriverManager.getConnection("jdbc:postgresql://yourhost","youruser","password");
>> con.createStatement().execute("select 1");
>> }
>> }
>> save it in a file called TestUrl.java
>> compile it with javac TestUrl.java
>> run it with java -cp postgresql.jar:./ TestUrl
>>
>> change the names above to suit
>>
>> Dave Cramer
>>
>> davec@postgresintl.com
>> www.postgresintl.com
>>
>> On 2 December 2015 at 15:35, Nuno Zimas wrote:
>>
>>> On 2 Dec 2015, at 20:18, Dave Cramer wrote:
>>>
>>> Can you try a very simple JDBC program to see if you can connect ?
>>>
>>> Dave Cramer
>>
>> Could you please suggest one already compiled?
>> I’m not a java programmer and it’s been hell on rather to compile even the simplest java source file due to dependency issues.
>>
>>>
>>> davec@postgresintl.com
>>> www.postgresintl.com
>>>
>>> On 2 December 2015 at 14:57, John R Pierce wrote:
>>> On 12/2/2015 11:55 AM, Nuno Zimas wrote:
>>> psql always connects successfully no matter what.
>>> As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
>>> What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
>>> So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
>>> Not sure how tis would affect accessing the DBs, though.
>>>
>>> can you connect using psql on the windows system to the ubuntu hosted database?
>>>
>>>
>>>
>>> --
>>> john r pierce, recycling bits in santa cruz
>>>
>>>
>>>
>>> --
>>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-jdbc
>>>
>>
>>
>
Re: user can't access own database after creation
That's easily fixed by adding the missing ';' just as the error indicates :)
On Dec 2, 2015, at 12:48 PM, Nuno Zimas <nzimas@gmail.com> wrote:
>
> Hi Dave,
>
> I’m getting an error.
>
> root@aida2next /u/2next# javac TestUrl.java
> TestUrl.java:1: error: ';' expected
> import java.sql.Connection
> ^
> 1 error
>
>
>
>> On 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:
>>
>> this isn't compiled, but it has no dependencies to compile and only one to run
>>
>> import java.sql.Connection
>>
>> /**
>> * Created by davec on 2014-03-28.
>> */
>> class TestUrl
>> {
>> public static void main(String []args)
>> {
>> Connection con = java.sql.DriverManager.getConnection("jdbc:postgresql://yourhost","youruser","password");
>> con.createStatement().execute("select 1");
>> }
>> }
>> save it in a file called TestUrl.java
>> compile it with javac TestUrl.java
>> run it with java -cp postgresql.jar:./ TestUrl
>>
>> change the names above to suit
>>
>> Dave Cramer
>>
>> davec@postgresintl.com
>> www.postgresintl.com
>>
>> On 2 December 2015 at 15:35, Nuno Zimas <nzimas@gmail.com> wrote:
>>
>>> On 2 Dec 2015, at 20:18, Dave Cramer <pg@fastcrypt.com> wrote:
>>>
>>> Can you try a very simple JDBC program to see if you can connect ?
>>>
>>> Dave Cramer
>>
>> Could you please suggest one already compiled?
>> I’m not a java programmer and it’s been hell on rather to compile even the simplest java source file due to dependency issues.
>>
>>>
>>> davec@postgresintl.com
>>> www.postgresintl.com
>>>
>>> On 2 December 2015 at 14:57, John R Pierce <pierce@hogranch.com> wrote:
>>> On 12/2/2015 11:55 AM, Nuno Zimas wrote:
>>> psql always connects successfully no matter what.
>>> As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
>>> What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
>>> So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
>>> Not sure how tis would affect accessing the DBs, though.
>>>
>>> can you connect using psql on the windows system to the ubuntu hosted database?
>>>
>>>
>>>
>>> --
>>> john r pierce, recycling bits in santa cruz
>>>
>>>
>>>
>>> --
>>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-jdbc
>>>
>>
>>
>
Re: user can't access own database after creation
On 2 Dec 2015, at 20:50, Steven Schlansker <stevenschlansker@gmail.com> wrote:That's easily fixed by adding the missing ';' just as the error indicates :)
On Dec 2, 2015, at 12:48 PM, Nuno Zimas <nzimas@gmail.com> wrote:
Hi Dave,
I’m getting an error.
root@aida2next /u/2next# javac TestUrl.java
TestUrl.java:1: error: ';' expected
import java.sql.Connection
^
1 errorOn 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:
this isn't compiled, but it has no dependencies to compile and only one to run
import java.sql.Connection
/**
* Created by davec on 2014-03-28.
*/
class TestUrl
{
public static void main(String []args)
{
Connection con = java.sql.DriverManager.getConnection("jdbc:postgresql://yourhost","youruser","password");
con.createStatement().execute("select 1");
}
}
save it in a file called TestUrl.java
compile it with javac TestUrl.java
run it with java -cp postgresql.jar:./ TestUrl
change the names above to suit
Dave Cramer
davec@postgresintl.com
www.postgresintl.com
On 2 December 2015 at 15:35, Nuno Zimas <nzimas@gmail.com> wrote:On 2 Dec 2015, at 20:18, Dave Cramer <pg@fastcrypt.com> wrote:
Can you try a very simple JDBC program to see if you can connect ?
Dave Cramer
Could you please suggest one already compiled?
I’m not a java programmer and it’s been hell on rather to compile even the simplest java source file due to dependency issues.
davec@postgresintl.com
www.postgresintl.com
On 2 December 2015 at 14:57, John R Pierce <pierce@hogranch.com> wrote:
On 12/2/2015 11:55 AM, Nuno Zimas wrote:
psql always connects successfully no matter what.
As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
Not sure how tis would affect accessing the DBs, though.
can you connect using psql on the windows system to the ubuntu hosted database?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
Change
public static void main(String []args)
to
public static void main(String []args) throws Exception
On Dec 2, 2015, at 12:52 PM, Nuno Zimas wrote:
> Thanks, Steve. How silly of me :(
> Still falling to compile, though.
>
> root@aida2next /u/2next# javac TestUrl.java
> TestUrl.java:10: error: unreported exception SQLException; must be caught or declared to be thrown
> Connection con = java.sql.DriverManager.getConnection("jdbc:postgresql://10.10.10.100","postgres","smartdoc");
> ^
> TestUrl.java:11: error: unreported exception SQLException; must be caught or declared to be thrown
> con.createStatement().execute("select 1");
> ^
> TestUrl.java:11: error: unreported exception SQLException; must be caught or declared to be thrown
> con.createStatement().execute("select 1");
> ^
> 3 errors
>
>
>
>> On 2 Dec 2015, at 20:50, Steven Schlansker wrote:
>>
>> That's easily fixed by adding the missing ';' just as the error indicates :)
>>
>> On Dec 2, 2015, at 12:48 PM, Nuno Zimas wrote:
>>
>>>
>>> Hi Dave,
>>>
>>> I’m getting an error.
>>>
>>> root@aida2next /u/2next# javac TestUrl.java
>>> TestUrl.java:1: error: ';' expected
>>> import java.sql.Connection
>>> ^
>>> 1 error
>>>
>>>
>>>
>>>> On 2 Dec 2015, at 20:39, Dave Cramer wrote:
>>>>
>>>> this isn't compiled, but it has no dependencies to compile and only one to run
>>>>
>>>> import java.sql.Connection
>>>>
>>>> /**
>>>> * Created by davec on 2014-03-28.
>>>> */
>>>> class TestUrl
>>>> {
>>>> public static void main(String []args)
>>>> {
>>>> Connection con = java.sql.DriverManager.getConnection("jdbc:postgresql://yourhost","youruser","password");
>>>> con.createStatement().execute("select 1");
>>>> }
>>>> }
>>>> save it in a file called TestUrl.java
>>>> compile it with javac TestUrl.java
>>>> run it with java -cp postgresql.jar:./ TestUrl
>>>>
>>>> change the names above to suit
>>>>
>>>> Dave Cramer
>>>>
>>>> davec@postgresintl.com
>>>> www.postgresintl.com
>>>>
>>>> On 2 December 2015 at 15:35, Nuno Zimas wrote:
>>>>
>>>>> On 2 Dec 2015, at 20:18, Dave Cramer wrote:
>>>>>
>>>>> Can you try a very simple JDBC program to see if you can connect ?
>>>>>
>>>>> Dave Cramer
>>>>
>>>> Could you please suggest one already compiled?
>>>> I’m not a java programmer and it’s been hell on rather to compile even the simplest java source file due to dependency issues.
>>>>
>>>>>
>>>>> davec@postgresintl.com
>>>>> www.postgresintl.com
>>>>>
>>>>> On 2 December 2015 at 14:57, John R Pierce wrote:
>>>>> On 12/2/2015 11:55 AM, Nuno Zimas wrote:
>>>>> psql always connects successfully no matter what.
>>>>> As for JDBC, we get the same results with or without ssl=true explicitly appended to the URL.
>>>>> What truly baffles me is that ye exact same java application works with no hiccups against a quasi-vanilla pgsql backend i’ve installed on windows 10.
>>>>> So far, the only visible difference I found is in the values for LC_COLLATE and LC_TYPE, which is V on the remote pgsql instances and English_United States.1252 on the local pgsql instance.
>>>>> Not sure how tis would affect accessing the DBs, though.
>>>>>
>>>>> can you connect using psql on the windows system to the ubuntu hosted database?
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> john r pierce, recycling bits in santa cruz
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>>>>> To make changes to your subscription:
>>>>> http://www.postgresql.org/mailpref/pgsql-jdbc
>>>>>
>>>>
>>>>
>>>
>>
>
Re: user can't access own database after creation
On 2 Dec 2015, at 20:39, John R Pierce <pierce@hogranch.com> wrote:On 12/2/2015 12:22 PM, Nuno Zimas wrote:Absolutely.
I can connect via psql to postgresql on Ubuntu from party much anywhere.
what does the pg_hba.conf file look like on the ubuntu server ?
--
john r pierce, recycling bits in santa cruz
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Re: user can't access own database after creation
Systems Administrator & Web Developer
On 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:java -cp postgresql.jar:./ TestUrl
Re: user can't access own database after creation
Hmmm, says no suitable driver found. Strange.If the application I’m trying to deploy couldn’t see the JDBC driver, how would to even communicate with the pgsql backend? I mean, users can log in and create databases, but they can’t access them.I’m puzzled.root@aida2next /u/2next# java -cp postgresql.jar:./ TestUrlException in thread "main" java.sql.SQLException: No suitable driver found for jdbc:postgresql://10.10.10.100at java.sql.DriverManager.getConnection(DriverManager.java:689)at java.sql.DriverManager.getConnection(DriverManager.java:247)at TestUrl.main(TestUrl.java:10)Nuno Zimas
Systems Administrator & Web DeveloperOn 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:java -cp postgresql.jar:./ TestUrl
Re: user can't access own database after creation
On 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:java -cp postgresql.jar:./ TestUrl
Re: user can't access own database after creation
Thanks Dave,Like such?root@aida2next /u/2next# java -cp /usr/2next/libs/jdbc/postgresql-9.4-1201.jdbc4.jar:./ TestUrlException in thread "main" java.sql.SQLException: No suitable driver found for jdbc:postgresql://10.10.10.100at java.sql.DriverManager.getConnection(DriverManager.java:689)at java.sql.DriverManager.getConnection(DriverManager.java:247)at TestUrl.main(TestUrl.java:10)On 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:java -cp postgresql.jar:./ TestUrl
Re: user can't access own database after creation
Systems Administrator & Web Developer
On 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:java -cp postgresql.jar:./ TestUrl
Re: user can't access own database after creation
Should I look for them on the pgsql logs or?…pgsql remained silent--Nuno Zimas
Systems Administrator & Web DeveloperOn 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:java -cp postgresql.jar:./ TestUrl
Re: user can't access own database after creation
Systems Administrator & Web Developer
On 2 Dec 2015, at 21:20, Dave Cramer <pg@fastcrypt.com> wrote:if you were able to run that program and you did not get errors then it connected and workedOn 2 December 2015 at 16:20, Nuno Zimas <nzimas@gmail.com> wrote:Should I look for them on the pgsql logs or?…pgsql remained silent--Nuno Zimas
Systems Administrator & Web DeveloperOn 2 Dec 2015, at 20:39, Dave Cramer <pg@fastcrypt.com> wrote:java -cp postgresql.jar:./ TestUrl
Re: user can't access own database after creation
what does the pg_hba.conf file look like on the ubuntu server ?You can see the file contents here:
these three lines,
- host all all 78.47.104.116/32 trust
- host all all 62.210.69.197/32 trust
- host all all 10.10.10.99/32 trust
they state that anyone on those 3 hosts can connect as any postgres user including the superuser 'postgres' without any authentication required at all
.
Also, I see nothing in there about SSL.
-- john r pierce, recycling bits in santa cruz
Re: user can't access own database after creation
On 12/2/2015 1:00 PM, Nuno Zimas wrote:
what does the pg_hba.conf file look like on the ubuntu server ?You can see the file contents here:
these three lines,
host all all 78.47.104.116/32 trust host all all 62.210.69.197/32 trust host all all 10.10.10.99/32 trust
they state that anyone on those 3 hosts can connect as any postgres user including the superuser 'postgres' without any authentication required at all
.
Also, I see nothing in there about SSL.-- john r pierce, recycling bits in santa cruz
Re: user can't access own database after creation
On 2 Dec 2015, at 21:24, John R Pierce <pierce@hogranch.com> wrote:On 12/2/2015 1:00 PM, Nuno Zimas wrote:
what does the pg_hba.conf file look like on the ubuntu server ?You can see the file contents here:
these three lines,
host all all 78.47.104.116/32 trust host all all 62.210.69.197/32 trust host all all 10.10.10.99/32 trust
they state that anyone on those 3 hosts can connect as any postgres user including the superuser 'postgres' without any authentication required at all
.
Also, I see nothing in there about SSL.-- john r pierce, recycling bits in santa cruz
Re: user can't access own database after creation
On 2 Dec 2015, at 21:24, John R Pierce <pierce@hogranch.com> wrote:On 12/2/2015 1:00 PM, Nuno Zimas wrote:
what does the pg_hba.conf file look like on the ubuntu server ?You can see the file contents here:
these three lines,
host all all 78.47.104.116/32 trust host all all 62.210.69.197/32 trust host all all 10.10.10.99/32 trust
they state that anyone on those 3 hosts can connect as any postgres user including the superuser 'postgres' without any authentication required at all
That’s pretty much the intended behaviour at this point.As far as SSL goes, it really doesn’t make any difference.I’ve tried adding ?ssl=true and ?ssl=false to the jdbc URL with no success..
Also, I see nothing in there about SSL.-- john r pierce, recycling bits in santa cruz
Re: user can't access own database after creation
On 2 Dec 2015, at 21:15, Nuno Zimas <nzimas@gmail.com> wrote:root@aida2next /u/2next# java -cp /usr/2next/libs/jdbc/postgresql-9.4-1201.jdbc4.jar:./ TestUrlException in thread "main" java.sql.SQLException: No suitable driver found for jdbc:postgresql://10.10.10.100at java.sql.DriverManager.getConnection(DriverManager.java:689)at java.sql.DriverManager.getConnection(DriverManager.java:247)at TestUrl.main(TestUrl.java:10)
Re: user can't access own database after creation
Thanks Dave.It was missing the db bit.Now it executes silently and there are no vestiges on the pgsql log.Guess it means that it’s working, but should’t pgqsl log the select statement?On 2 Dec 2015, at 21:15, Nuno Zimas <nzimas@gmail.com> wrote:root@aida2next /u/2next# java -cp /usr/2next/libs/jdbc/postgresql-9.4-1201.jdbc4.jar:./ TestUrlException in thread "main" java.sql.SQLException: No suitable driver found for jdbc:postgresql://10.10.10.100at java.sql.DriverManager.getConnection(DriverManager.java:689)at java.sql.DriverManager.getConnection(DriverManager.java:247)at TestUrl.main(TestUrl.java:10)
Re: user can't access own database after creation
On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
On 2 Dec 2015, at 22:05, Nuno Zimas <nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas <nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
On 2 Dec 2015, at 22:17, Dave Cramer <pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas <nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
I belive you should enable a greater level of debugging in JPA, otherwise would be difficult to help.
Also, looking your could I can foresee one future problem that is the lack of a connection pool for the cloud environment. Without a pool you would run out of scalability.
Just my 2c.
Regards
Edson Richter
Enviado do meu smartphone Sony Xperia™
---- Nuno Zimas escreveu ----
On 2 Dec 2015, at 22:17, Dave Cramer <pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas <nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
On 2 Dec 2015, at 22:17, Dave Cramer <pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas <nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".
Atenciosamente, Edson Carlos Ericksson Richter
This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus(benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo(flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator(helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService(aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start (10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer <pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas <nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus(benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo(flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator(helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService(aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start (10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer <pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas <nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer <pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
Systems Administrator & Web Developer
On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
postgresql-9.4-1206-jdbc42.jar should be used for java 8: http://search.maven.org/#artifactdetails%7Corg.postgresql%7Cpostgresql%7C9.4-1206-jdbc42%7Cjar Vladimir
Re: user can't access own database after creation
The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperOn 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.
Atenciosamente, Edson Carlos Ericksson Richter
The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +44 20 3289 1162T: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
I would still put by coins in generating a verbose log. OP shall be facing other issue, not a JDBC issue at all.
I've more than 7 years working with PgSQL, JPA and JDBC, and found only one "prepared statment" glitch with JDBC+timezone+DST, which can be easly solved with "prepareThreshold=0" in connection string - I don't even think it is a JDBC issue, but a server side prepared statements issue.
All other issues I've faced so far were caused by my own mistakes on setting configuration parameters.
Atenciosamente, Edson Carlos Ericksson Richter
However if the appserver attempts to use a jdk 1.8 JDBC method it will fail miserably. As long as you stay to jdk 1.6 methods you will be fine with those JVM'sOn 3 December 2015 at 09:15, Edson Richter <edsonrichter@hotmail.com> wrote:This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
On 3 Dec 2015, at 14:28, Edson Richter <edsonrichter@hotmail.com> wrote:Well, I don't use JDBC methods directly - just like the OP, I do use JPA for database access, and set "Target Database" to PostgreSQL - IN THIS SPECIFIC CASE - is enough so it will not throw any errors.
I would still put by coins in generating a verbose log. OP shall be facing other issue, not a JDBC issue at all.
I've more than 7 years working with PgSQL, JPA and JDBC, and found only one "prepared statment" glitch with JDBC+timezone+DST, which can be easly solved with "prepareThreshold=0" in connection string - I don't even think it is a JDBC issue, but a server side prepared statements issue.
All other issues I've faced so far were caused by my own mistakes on setting configuration parameters.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:19, Dave Cramer escreveu:However if the appserver attempts to use a jdk 1.8 JDBC method it will fail miserably. As long as you stay to jdk 1.6 methods you will be fine with those JVM'sOn 3 December 2015 at 09:15, Edson Richter <edsonrichter@hotmail.com> wrote:This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
from
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "CONFIG");
to
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "ALL");
According with this page (http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logging_level.htm), the CONFIG will not log stacktraces.
Atenciosamente, Edson Carlos Ericksson Richter
I’ve replaced postgresql-9.4-1201.jdbc4.jar with postgresql-9.4-1206.jdbc42.jar, then renamed it back to postgresql-9.4-1201.jdbc4.jar so that the application could see it.As suggested buy Edson, I’ve passed an argument to the jdbc URL to increase verbosity, but without success.2015-12-03 14:47:22,540 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 14:47:23,027 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 14:47:23,028 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=22015-12-03 14:47:23,600 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 14:47:24,833 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 14:47:26,170 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 14:47:26,177 INFO [main] simpl.SimpleThreadPool - Job execution threads willOn 3 Dec 2015, at 14:28, Edson Richter <edsonrichter@hotmail.com> wrote:Well, I don't use JDBC methods directly - just like the OP, I do use JPA for database access, and set "Target Database" to PostgreSQL - IN THIS SPECIFIC CASE - is enough so it will not throw any errors.
I would still put by coins in generating a verbose log. OP shall be facing other issue, not a JDBC issue at all.
I've more than 7 years working with PgSQL, JPA and JDBC, and found only one "prepared statment" glitch with JDBC+timezone+DST, which can be easly solved with "prepareThreshold=0" in connection string - I don't even think it is a JDBC issue, but a server side prepared statements issue.
All other issues I've faced so far were caused by my own mistakes on setting configuration parameters.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:19, Dave Cramer escreveu:However if the appserver attempts to use a jdk 1.8 JDBC method it will fail miserably. As long as you stay to jdk 1.6 methods you will be fine with those JVM'sOn 3 December 2015 at 09:15, Edson Richter <edsonrichter@hotmail.com> wrote:This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
On 3 Dec 2015, at 15:28, Edson Richter <edsonrichter@hotmail.com> wrote:Would you change the following and check logs again:
from
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "CONFIG");
to
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "ALL");
According with this page (http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logging_level.htm), the CONFIG will not log stacktraces.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:53, Nuno Zimas escreveu:I’ve replaced postgresql-9.4-1201.jdbc4.jar with postgresql-9.4-1206.jdbc42.jar, then renamed it back to postgresql-9.4-1201.jdbc4.jar so that the application could see it.As suggested buy Edson, I’ve passed an argument to the jdbc URL to increase verbosity, but without success.2015-12-03 14:47:22,540 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 14:47:23,027 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 14:47:23,028 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=22015-12-03 14:47:23,600 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 14:47:24,833 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 14:47:26,170 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 14:47:26,177 INFO [main] simpl.SimpleThreadPool - Job execution threads willOn 3 Dec 2015, at 14:28, Edson Richter <edsonrichter@hotmail.com> wrote:Well, I don't use JDBC methods directly - just like the OP, I do use JPA for database access, and set "Target Database" to PostgreSQL - IN THIS SPECIFIC CASE - is enough so it will not throw any errors.
I would still put by coins in generating a verbose log. OP shall be facing other issue, not a JDBC issue at all.
I've more than 7 years working with PgSQL, JPA and JDBC, and found only one "prepared statment" glitch with JDBC+timezone+DST, which can be easly solved with "prepareThreshold=0" in connection string - I don't even think it is a JDBC issue, but a server side prepared statements issue.
All other issues I've faced so far were caused by my own mistakes on setting configuration parameters.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:19, Dave Cramer escreveu:However if the appserver attempts to use a jdk 1.8 JDBC method it will fail miserably. As long as you stay to jdk 1.6 methods you will be fine with those JVM'sOn 3 December 2015 at 09:15, Edson Richter <edsonrichter@hotmail.com> wrote:This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
If I change the logging level in my EclipseLink app, I get a huge difference.
So, seems your problem is related to EclipseLink dynamic properties, which is not standard, and I would reccomend you to start digging at EclipseLink mail list.
Sorry not being of any help, at the end.
Regards,
Edson Richter
Atenciosamente, Edson Carlos Ericksson Richter
On 3 Dec 2015, at 15:28, Edson Richter <edsonrichter@hotmail.com> wrote:Would you change the following and check logs again:
from
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "CONFIG");
to
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "ALL");Had done that already and then recompiled.Getting the exact same level of detail, though.According with this page (http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logging_level.htm), the CONFIG will not log stacktraces.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:53, Nuno Zimas escreveu:I’ve replaced postgresql-9.4-1201.jdbc4.jar with postgresql-9.4-1206.jdbc42.jar, then renamed it back to postgresql-9.4-1201.jdbc4.jar so that the application could see it.As suggested buy Edson, I’ve passed an argument to the jdbc URL to increase verbosity, but without success.2015-12-03 14:47:22,540 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 14:47:23,027 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 14:47:23,028 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=22015-12-03 14:47:23,600 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 14:47:24,833 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 14:47:26,170 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 14:47:26,177 INFO [main] simpl.SimpleThreadPool - Job execution threads willOn 3 Dec 2015, at 14:28, Edson Richter <edsonrichter@hotmail.com> wrote:Well, I don't use JDBC methods directly - just like the OP, I do use JPA for database access, and set "Target Database" to PostgreSQL - IN THIS SPECIFIC CASE - is enough so it will not throw any errors.
I would still put by coins in generating a verbose log. OP shall be facing other issue, not a JDBC issue at all.
I've more than 7 years working with PgSQL, JPA and JDBC, and found only one "prepared statment" glitch with JDBC+timezone+DST, which can be easly solved with "prepareThreshold=0" in connection string - I don't even think it is a JDBC issue, but a server side prepared statements issue.
All other issues I've faced so far were caused by my own mistakes on setting configuration parameters.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:19, Dave Cramer escreveu:However if the appserver attempts to use a jdk 1.8 JDBC method it will fail miserably. As long as you stay to jdk 1.6 methods you will be fine with those JVM'sOn 3 December 2015 at 09:15, Edson Richter <edsonrichter@hotmail.com> wrote:This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
Systems Administrator & Web Developer
On 3 Dec 2015, at 16:00, Edson Richter <edsonrichter@hotmail.com> wrote:Well, being so (no difference), then your problem is: your properties are being just ignored!
If I change the logging level in my EclipseLink app, I get a huge difference.
So, seems your problem is related to EclipseLink dynamic properties, which is not standard, and I would reccomend you to start digging at EclipseLink mail list.
Sorry not being of any help, at the end.
Regards,
Edson RichterAtenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 13:39, Nuno Zimas escreveu:On 3 Dec 2015, at 15:28, Edson Richter <edsonrichter@hotmail.com> wrote:Would you change the following and check logs again:
from
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "CONFIG");
to
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "ALL");Had done that already and then recompiled.Getting the exact same level of detail, though.According with this page (http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logging_level.htm), the CONFIG will not log stacktraces.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:53, Nuno Zimas escreveu:I’ve replaced postgresql-9.4-1201.jdbc4.jar with postgresql-9.4-1206.jdbc42.jar, then renamed it back to postgresql-9.4-1201.jdbc4.jar so that the application could see it.As suggested buy Edson, I’ve passed an argument to the jdbc URL to increase verbosity, but without success.2015-12-03 14:47:22,540 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 14:47:23,027 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 14:47:23,028 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=22015-12-03 14:47:23,600 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 14:47:24,833 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 14:47:26,170 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 14:47:26,177 INFO [main] simpl.SimpleThreadPool - Job execution threads willOn 3 Dec 2015, at 14:28, Edson Richter <edsonrichter@hotmail.com> wrote:Well, I don't use JDBC methods directly - just like the OP, I do use JPA for database access, and set "Target Database" to PostgreSQL - IN THIS SPECIFIC CASE - is enough so it will not throw any errors.
I would still put by coins in generating a verbose log. OP shall be facing other issue, not a JDBC issue at all.
I've more than 7 years working with PgSQL, JPA and JDBC, and found only one "prepared statment" glitch with JDBC+timezone+DST, which can be easly solved with "prepareThreshold=0" in connection string - I don't even think it is a JDBC issue, but a server side prepared statements issue.
All other issues I've faced so far were caused by my own mistakes on setting configuration parameters.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:19, Dave Cramer escreveu:However if the appserver attempts to use a jdk 1.8 JDBC method it will fail miserably. As long as you stay to jdk 1.6 methods you will be fine with those JVM'sOn 3 December 2015 at 09:15, Edson Richter <edsonrichter@hotmail.com> wrote:This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperT: +351 244 204 857On 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration
Re: user can't access own database after creation
It’s actually “funnier” than that.Apparently, some properties get processed.For instance, changes to properties.put(PersistenceUnitProperties.JDBC_URL become visible in the log, whereas properties.put(PersistenceUnitProperties.LOGGING_LEVEL so not seem to.--Nuno Zimas
Systems Administrator & Web DeveloperOn 3 Dec 2015, at 16:00, Edson Richter <edsonrichter@hotmail.com> wrote:Well, being so (no difference), then your problem is: your properties are being just ignored!
If I change the logging level in my EclipseLink app, I get a huge difference.
So, seems your problem is related to EclipseLink dynamic properties, which is not standard, and I would reccomend you to start digging at EclipseLink mail list.
Sorry not being of any help, at the end.
Regards,
Edson RichterAtenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 13:39, Nuno Zimas escreveu:On 3 Dec 2015, at 15:28, Edson Richter <edsonrichter@hotmail.com> wrote:Would you change the following and check logs again:
from
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "CONFIG");
to
properties.put(PersistenceUnitProperties.LOGGING_LEVEL, "ALL");Had done that already and then recompiled.Getting the exact same level of detail, though.According with this page (http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logging_level.htm), the CONFIG will not log stacktraces.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:53, Nuno Zimas escreveu:I’ve replaced postgresql-9.4-1201.jdbc4.jar with postgresql-9.4-1206.jdbc42.jar, then renamed it back to postgresql-9.4-1201.jdbc4.jar so that the application could see it.As suggested buy Edson, I’ve passed an argument to the jdbc URL to increase verbosity, but without success.2015-12-03 14:47:22,540 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 14:47:23,027 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 14:47:23,028 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=22015-12-03 14:47:23,600 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 14:47:24,833 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 14:47:26,170 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 14:47:26,177 INFO [main] simpl.SimpleThreadPool - Job execution threads willOn 3 Dec 2015, at 14:28, Edson Richter <edsonrichter@hotmail.com> wrote:Well, I don't use JDBC methods directly - just like the OP, I do use JPA for database access, and set "Target Database" to PostgreSQL - IN THIS SPECIFIC CASE - is enough so it will not throw any errors.
I would still put by coins in generating a verbose log. OP shall be facing other issue, not a JDBC issue at all.
I've more than 7 years working with PgSQL, JPA and JDBC, and found only one "prepared statment" glitch with JDBC+timezone+DST, which can be easly solved with "prepareThreshold=0" in connection string - I don't even think it is a JDBC issue, but a server side prepared statements issue.
All other issues I've faced so far were caused by my own mistakes on setting configuration parameters.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 12:19, Dave Cramer escreveu:However if the appserver attempts to use a jdk 1.8 JDBC method it will fail miserably. As long as you stay to jdk 1.6 methods you will be fine with those JVM'sOn 3 December 2015 at 09:15, Edson Richter <edsonrichter@hotmail.com> wrote:This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also, postgresql-9.3-1101.jdbc41.jar works well with both Java versions.Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 11:57, Nuno Zimas escreveu:The jar is named postgresql-9.4-1201.jdbc4.jarNuno.--Nuno Zimas
Systems Administrator & Web DeveloperOn 3 Dec 2015, at 13:27, Dave Cramer <pg@fastcrypt.com> wrote:OK, so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8On 3 December 2015 at 08:25, Nuno Zimas <nzimas@gmail.com> wrote:We're using the same Java version on both the local windows machine and the remote Ubuntu server.
JRE 1.8.0_65.
On 3 Dec 2015, at 12:30, Dave Cramer <pg@fastcrypt.com> wrote:If I had to guess what was wrong here I'd look at whether you have the right jar for the java version you are using. It will fail silently if notOn 3 December 2015 at 07:26, Edson Richter <edsonrichter@hotmail.com> wrote:You can add additional logging JPA and JDBC specific:
JPA:
With EclipseLink, I do use the following property:
<property name="eclipselink.logging.level" value="DEBUG"/>
You can set it at runtime, but you should look at it - and also check if your provider has similar option.
In my application, I've left all defaults in configuration file (persistence.xml), and just adjust the custom properties at runtime.
JDBC:
You can add higher logging for jdbc itself with
jdbc:postgresql:// 10.10.10.100:5432/benexus?loglevel=2
Double check configuration:
Just in case, to make connections out of 127.0.0.1 you must configure postgres with "listen_address = '10.10.10.100' or listen_address='*' and port = '5432' in postgresql.conf; also in pg_hba.conf you must have the line "host all all 10.10.10.99/32 md5".Atenciosamente, Edson Carlos Ericksson RichterEm 03/12/2015 09:56, Nuno Zimas escreveu:This is as much as I can get from the application log.Relevant bit is shown in bold.2015-12-03 11:51:26,821 INFO [main] log.Log4jLogger - 2Next 1.0.0 start2015-12-03 11:51:26,823 INFO [main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved2015-12-03 11:51:26,824 INFO [main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64), jvm: 1.8.0_652015-12-03 11:51:26,878 INFO [main] log.Log4jLogger - initialize runtime environment2015-12-03 11:51:28,160 INFO [main] log.Log4jLogger - webServer will use port: 80802015-12-03 11:51:28,680 INFO [main] log.Log4jLogger - mailAgent will redirect some messages to host: smtp.mail.ru2015-12-03 11:51:28,682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-20152015-12-03 11:51:28,690 DEBUG [main] log.Log4jLogger - init webserver ...2015-12-03 11:51:29,429 INFO [main] log.Log4jLogger - load "benexus( benexus.nzimas.com)"2015-12-03 11:51:29,701 INFO [main] log.Log4jLogger - load "FlabserPromo( flabser.com)"2015-12-03 11:51:29,767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.rest.Service"2015-12-03 11:51:29,776 INFO [main] log.Log4jLogger - load "Task"2015-12-03 11:51:29,813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:29,831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:29,837 INFO [main] log.Log4jLogger - load "administrator( helloadmin.info)"2015-12-03 11:51:29,845 INFO [main] log.Log4jLogger - load "CashTracker"2015-12-03 11:51:29,860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.AccountService"2015-12-03 11:51:29,863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.BudgetService"2015-12-03 11:51:29,865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CategoryService"2015-12-03 11:51:29,868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.CostCenterService"2015-12-03 11:51:29,870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.DashboardService"2015-12-03 11:51:29,872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.ReportsService"2015-12-03 11:51:29,874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TagService"2015-12-03 11:51:29,876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest.TransactionService"2015-12-03 11:51:29,913 INFO [main] log.Log4jLogger - load "ImmigrationService( aikonamedia.kz)"2015-12-03 11:51:29,979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservice.rest.Service"2015-12-03 11:51:30,057 INFO [main] log.Log4jLogger - webserver start ( 10.10.10.99:8080)2015-12-03 11:51:33,913 INFO [ flabser.com-startStop-1] log.Log4jLogger - # init "FlabserPromo"2015-12-03 11:51:35,192 INFO [aikonamedia.kz-startStop-1] log.Log4jLogger - # init "ImmigrationService"2015-12-03 11:51:36,478 INFO [ helloadmin.info-startStop-1] log.Log4jLogger - # init "administrator"2015-12-03 11:51:37,080 INFO [benexus.nzimas.com-startStop-1] log.Log4jLogger - # init "benexus"2015-12-03 11:51:37,616 WARN [benexus.nzimas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized2015-12-03 11:51:37,617 ERROR [benexus.nzimas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus2015-12-03 11:51:38,217 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "Task"2015-12-03 11:51:39,508 INFO [ benexus.nzimas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"2015-12-03 11:51:40,859 INFO [main] impl.StdSchedulerFactory - Using default implementation for ThreadExecutor2015-12-03 11:51:40,866 INFO [main] simpl.SimpleThreadPool - Job execution threads will use class loader of thread: main2015-12-03 11:51:40,929 INFO [main] core.SchedulerSignalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl2015-12-03 11:51:40,931 INFO [main] core.QuartzScheduler - Quartz Scheduler v.2.1.7 created.2015-12-03 11:51:40,934 INFO [main] simpl.RAMJobStore - RAMJobStore initialized.2015-12-03 11:51:40,937 INFO [main] core.QuartzScheduler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.NOT STARTED.Currently in standby mode.Number of jobs executed: 0Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.2015-12-03 11:51:40,938 INFO [main] impl.StdSchedulerFactory - Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'2015-12-03 11:51:40,939 INFO [main] impl.StdSchedulerFactory - Quartz scheduler version: 2.1.72015-12-03 11:51:40,964 INFO [main] core.QuartzScheduler - Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.2015-12-03 11:51:40,986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77d0w13" application...2015-12-03 11:51:41,072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueService"2015-12-03 11:51:41,074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagService"2015-12-03 11:51:41,122 INFO [Thread-6] log.Log4jLogger - users contexts are ready2015-12-03 11:52:00,061 INFO [DefaultQuartzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks2015-12-03 11:52:00,082 INFO [DefaultQuartzScheduler_Worker-2] log.Log4jLogger - start database remover taskOn 2 Dec 2015, at 22:17, Dave Cramer < pg@fastcrypt.com> wrote:Yes, JDBC is still involved. I'd say there is a mistake in the JPA configOn 2 December 2015 at 17:15, Nuno Zimas <nzimas@gmail.com> wrote:The programmer says that she relies on JPA to establish the connection, but I suppose that JDBC is still involved, otherwise i can’t see how java would talk to postgresql.Unless JPA does so directly.Like I said, Java really isn’t my thing.On 2 Dec 2015, at 22:05, Nuno Zimas < nzimas@gmail.com> wrote:Thanks a lot, everyone (and specially Dave Cramer).Now I know the issue is not JDBC related.Not sure of this is good news for me, though :)I’d think that the application needs to be amended.Still, this does not account for the fact that it works on a local win machine.As you can see, Dave’s little program connects like a charm,2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: duration: 16.239 ms parse <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: duration: 0.023 ms bind <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: duration: 0.031 ms execute <unnamed>: SET extra_float_digits = 32015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: duration: 0.217 ms parse <unnamed>: select 12015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: duration: 0.100 ms bind <unnamed>: select 12015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: duration: 0.953 ms execute <unnamed>: select 1On 2 Dec 2015, at 21:45, Dave Cramer < pg@fastcrypt.com> wrote:log_min_duration