Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a4Vp8-0005my-5h for pgsql-jdbc@arkaria.postgresql.org; Thu, 03 Dec 2015 15:29:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a4Vp7-00080k-3W for pgsql-jdbc@arkaria.postgresql.org; Thu, 03 Dec 2015 15:29:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a4VoQ-0006t6-Gy for pgsql-jdbc@postgresql.org; Thu, 03 Dec 2015 15:28:51 +0000 Received: from blu004-omc3s14.hotmail.com ([65.55.116.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a4VoM-0008VU-6k for pgsql-jdbc@postgresql.org; Thu, 03 Dec 2015 15:28:49 +0000 Received: from BLU436-SMTP108 ([65.55.116.74]) by BLU004-OMC3S14.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Thu, 3 Dec 2015 07:28:44 -0800 X-TMN: [rLjKz0JQYj+Yq4kK6NqFEANhIfMuVObd] X-Originating-Email: [edsonrichter@hotmail.com] Message-ID: Subject: Re: user can't access own database after creation References: <25B91293-CCF8-42D9-B4ED-19DF36AA881C@gmail.com> <00A2FA5A-3C2A-40CD-9174-EBCC14164B74@gmail.com> <6B5C6030-ABBE-4283-9195-8E4D3E031261@gmail.com> <9C9EB124-5C7C-48B3-BF8D-52B8A7A88F36@gmail.com> <8DC65D5F-EC46-449D-A9B3-486EDD05C17E@gmail.com> <44d99a13-6cd0-4f20-8f0b-227d36f13c67@typeapp.com> <2E9B7FDD-3038-4B5A-9310-5EA98DD0602B@gmail.com> <3DA4A9D2-41B3-4899-836B-809C72CDCEB6@gmail.com> CC: List From: Edson Richter Date: Thu, 3 Dec 2015 13:28:39 -0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <3DA4A9D2-41B3-4899-836B-809C72CDCEB6@gmail.com> Content-Type: multipart/alternative; boundary="------------040707020802080401060809" X-OriginalArrivalTime: 03 Dec 2015 15:28:41.0848 (UTC) FILETIME=[4A54BF80:01D12DDF] X-Pg-Spam-Score: 0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org --------------040707020802080401060809 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Would you change the following and check logs again: from properties.put(PersistenceUnitProperties.LOGGING_LEVEL=2C "CONFIG")=3B to properties.put(PersistenceUnitProperties.LOGGING_LEVEL=2C "ALL")=3B According with this page=20 (http://www.eclipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logg= ing_level.htm)=2C=20 the CONFIG will not log stacktraces. Atenciosamente=2C Edson Carlos Ericksson Richter Em 03/12/2015 12:53=2C Nuno Zimas escreveu: > I=E2=80=99ve replaced postgresql-9.4-1201.jdbc4.jar with=20 > postgresql-9.4-1206.jdbc42.jar=2C then renamed it back to=20 > postgresql-9.4-1201.jdbc4.jar so that the application could see it. > > As suggested buy Edson=2C I=E2=80=99ve passed an argument to the jdbc URL= to=20 > increase verbosity=2C but without success. > > 2015-12-03 14:47:22=2C540 INFO [benexus.nzimas.com=20 > -startStop-1] log.Log4jLogger - # init=20 > "benexus" > 2015-12-03 14:47:23=2C027 WARN [benexus.nzimas.com=20 > -startStop-1] log.Log4jLogger - the entity=20 > manager of "benexus" has not been initialized > 2015-12-03 14:47:23=2C028 ERROR [benexus.nzimas.com=20 > -startStop-1] log.Log4jLogger - smartdoc=20 > postgres jdbc:postgresql://10.10.10.100:5432/benexus?loglevel=3D2 > 2015-12-03 14:47:23=2C600 INFO [benexus.nzimas.com=20 > -startStop-1] log.Log4jLogger - # init=20 > template "Task" > 2015-12-03 14:47:24=2C833 INFO [benexus.nzimas.com=20 > -startStop-1] log.Log4jLogger - # init=20 > template "CashTracker" > 2015-12-03 14:47:26=2C170 INFO [main] impl.StdSchedulerFactory - Using=20 > default implementation for ThreadExecutor > 2015-12-03 14:47:26=2C177 INFO [main] simpl.SimpleThreadPool - Job=20 > execution threads will > >> On 3 Dec 2015=2C at 14:28=2C Edson Richter > > wrote: >> >> Well=2C I don't use JDBC methods directly - just like the OP=2C I do use= =20 >> JPA for database access=2C and set "Target Database" to PostgreSQL - IN= =20 >> 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=20 >> facing other issue=2C not a JDBC issue at all. >> >> I've more than 7 years working with PgSQL=2C JPA and JDBC=2C and found=20 >> only one "prepared statment" glitch with JDBC+timezone+DST=2C which can= =20 >> be easly solved with "prepareThreshold=3D0" in connection string - I=20 >> don't even think it is a JDBC issue=2C but a server side prepared=20 >> statements issue. >> All other issues I've faced so far were caused by my own mistakes on=20 >> setting configuration parameters. >> >> Atenciosamente=2C >> >> Edson Carlos Ericksson Richter >> Em 03/12/2015 12:19=2C Dave Cramer escreveu: >>> However if the appserver attempts to use a jdk 1.8 JDBC method it=20 >>> will fail miserably. As long as you stay to jdk 1.6 methods you will=20 >>> be fine with those JVM's >>> >>> Dave Cramer >>> >>> davec@postgresintl.com >>> www.postgresintl.com >>> >>> On 3 December 2015 at 09:15=2C Edson Richter >> > wrote: >>> >>> This is the same I use in production servers either with JDK >>> 1.7_80 and 1.8_65. >>> Also=2C postgresql-9.3-1101.jdbc41.jar works well with both Java >>> versions. >>> >>> Atenciosamente=2C >>> >>> Edson Carlos Ericksson Richter >>> >>> Em 03/12/2015 11:57=2C Nuno Zimas escreveu: >>>> The jar is named postgresql-9.4-1201.jdbc4.jar >>>> >>>> Nuno. >>>> >>>> -- >>>> Nuno Zimas >>>> Systems Administrator & Web Developer >>>> >>>> T: +44 20 3289 1162 >>>> T: +351 244 204 857 >>>> >>>>> On 3 Dec 2015=2C at 13:27=2C Dave Cramer wrote= : >>>>> >>>>> OK=2C so what version of the postgresql driver are you using. It >>>>> should have a 42 in the name if you are using java 8 >>>>> >>>>> Dave Cramer >>>>> >>>>> davec@postgresintl.com >>>>> www.postgresintl.com >>>>> >>>>> On 3 December 2015 at 08:25=2C Nuno Zimas wrot= e: >>>>> >>>>> 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=2C at 12:30=2C Dave Cramer >>>> > 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 not >>>>> >>>>> Dave Cramer >>>>> >>>>> davec@postgresintl.com >>>>> www.postgresintl.com >>>>> >>>>> On 3 December 2015 at 07:26=2C Edson Richter >>>>> wrote: >>>>> >>>>> You can add additional logging JPA and JDBC specific: >>>>> >>>>> _*JPA:*_ >>>>> With EclipseLink=2C I do use the following property: >>>>> >>>>> >>>> value=3D"DEBUG"/> >>>>> >>>>> You can set it at runtime=2C but you should look at >>>>> it - and also check if your provider has similar >>>>> option. >>>>> In my application=2C I've left all defaults in >>>>> configuration file (persistence.xml)=2C 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=3D2 >>>>> >>>>> >>>>> >>>>> _*Double check configuration:*_ >>>>> Just in case=2C to make connections out of 127.0.0.1 >>>>> you must configure postgres with "listen_address =3D >>>>> '10.10.10.100' or listen_address=3D'*' and port =3D >>>>> '5432' in postgresql.conf=3B also in pg_hba.conf you >>>>> must have the line "host all all 10.10.10.99/32 >>>>> md5". >>>>> >>>>> >>>>> Atenciosamente=2C >>>>> >>>>> Edson Carlos Ericksson Richter >>>>> >>>>> Em 03/12/2015 09:56=2C 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=2C821 INFO [main] >>>>>> log.Log4jLogger - 2Next 1.0.0 start >>>>>> 2015-12-03 11:51:26=2C823 INFO [main] >>>>>> log.Log4jLogger - copyright(c) the flabser team >>>>>> 2015. All Right Reserved >>>>>> 2015-12-03 11:51:26=2C824 INFO [main] >>>>>> log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd64)=2C >>>>>> jvm: 1.8.0_65 >>>>>> 2015-12-03 11:51:26=2C878 INFO [main] >>>>>> log.Log4jLogger - initialize runtime environment >>>>>> 2015-12-03 11:51:28=2C160 INFO [main] >>>>>> log.Log4jLogger - webServer will use port: 8080 >>>>>> 2015-12-03 11:51:28=2C680 INFO [main] >>>>>> log.Log4jLogger - mailAgent will redirect some >>>>>> messages to host: smtp.mail.ru >>>>>> >>>>>> 2015-12-03 11:51:28=2C682 DEBUG [main] >>>>>> log.Log4jLogger - build: 11:44 3-December-2015 >>>>>> 2015-12-03 11:51:28=2C690 DEBUG [main] >>>>>> log.Log4jLogger - init webserver ... >>>>>> 2015-12-03 11:51:29=2C429 INFO [main] >>>>>> log.Log4jLogger - load "benexus( >>>>>> benexus.nzimas.com )" >>>>>> 2015-12-03 11:51:29=2C701 INFO [main] >>>>>> log.Log4jLogger - load "FlabserPromo( flabser.com >>>>>> )" >>>>>> 2015-12-03 11:51:29=2C767 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "flabserpromo.rest.Service" >>>>>> 2015-12-03 11:51:29=2C776 INFO [main] >>>>>> log.Log4jLogger - load "Task" >>>>>> 2015-12-03 11:51:29=2C813 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "task.rest.IssueService" >>>>>> 2015-12-03 11:51:29=2C831 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "task.rest.TagService" >>>>>> 2015-12-03 11:51:29=2C837 INFO [main] >>>>>> log.Log4jLogger - load "administrator( >>>>>> helloadmin.info )" >>>>>> 2015-12-03 11:51:29=2C845 INFO [main] >>>>>> log.Log4jLogger - load "CashTracker" >>>>>> 2015-12-03 11:51:29=2C860 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.AccountService" >>>>>> 2015-12-03 11:51:29=2C863 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.BudgetService" >>>>>> 2015-12-03 11:51:29=2C865 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.CategoryService" >>>>>> 2015-12-03 11:51:29=2C868 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.CostCenterService" >>>>>> 2015-12-03 11:51:29=2C870 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.DashboardService" >>>>>> 2015-12-03 11:51:29=2C872 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.ReportsService" >>>>>> 2015-12-03 11:51:29=2C874 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.TagService" >>>>>> 2015-12-03 11:51:29=2C876 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "cashtracker.rest.TransactionService" >>>>>> 2015-12-03 11:51:29=2C913 INFO [main] >>>>>> log.Log4jLogger - load "ImmigrationService( >>>>>> aikonamedia.kz )" >>>>>> 2015-12-03 11:51:29=2C979 DEBUG [main] >>>>>> log.Log4jLogger - register REST handler >>>>>> "immigrationservice.rest.Service" >>>>>> 2015-12-03 11:51:30=2C057 INFO [main] >>>>>> log.Log4jLogger - webserver start ( >>>>>> 10.10.10.99:8080 ) >>>>>> 2015-12-03 11:51:33=2C913 INFO [ flabser.com >>>>>> -startStop-1] >>>>>> log.Log4jLogger - # init "FlabserPromo" >>>>>> 2015-12-03 11:51:35=2C192 INFO >>>>>> [aikonamedia.kz-startStop-1] log.Log4jLogger - # >>>>>> init "ImmigrationService" >>>>>> 2015-12-03 11:51:36=2C478 INFO [ helloadmin.info >>>>>> -startStop-1] >>>>>> log.Log4jLogger - # init "administrator" >>>>>> *2015-12-03 11:51:37=2C080 INFO >>>>>> [benexus.nzimas.com >>>>>> -startStop-1] >>>>>> log.Log4jLogger - # init "benexus"* >>>>>> *2015-12-03 11:51:37=2C616 WARN >>>>>> [benexus.nzimas.com >>>>>> -startStop-1] >>>>>> log.Log4jLogger - the entity manager of "benexus" >>>>>> has not been initialized* >>>>>> *2015-12-03 11:51:37=2C617 ERROR >>>>>> [benexus.nzimas.com >>>>>> -startStop-1] >>>>>> log.Log4jLogger - smartdoc postgres >>>>>> jdbc:postgresql://10.10.10.100:5432/benexus >>>>>> * >>>>>> 2015-12-03 11:51:38=2C217 INFO [ >>>>>> benexus.nzimas.com >>>>>> -startStop-1] >>>>>> log.Log4jLogger - # init template "Task" >>>>>> 2015-12-03 11:51:39=2C508 INFO [ >>>>>> benexus.nzimas.com >>>>>> -startStop-1] >>>>>> log.Log4jLogger - # init template "CashTracker" >>>>>> 2015-12-03 11:51:40=2C859 INFO [main] >>>>>> impl.StdSchedulerFactory - Using default >>>>>> implementation for ThreadExecutor >>>>>> 2015-12-03 11:51:40=2C866 INFO [main] >>>>>> simpl.SimpleThreadPool - Job execution threads >>>>>> will use class loader of thread: main >>>>>> 2015-12-03 11:51:40=2C929 INFO [main] >>>>>> core.SchedulerSignalerImpl - Initialized >>>>>> Scheduler Signaller of type: class >>>>>> org.quartz.core.SchedulerSignalerImpl >>>>>> 2015-12-03 11:51:40=2C931 INFO [main] >>>>>> core.QuartzScheduler - Quartz Scheduler v.2.1.7 >>>>>> created. >>>>>> 2015-12-03 11:51:40=2C934 INFO [main] >>>>>> simpl.RAMJobStore - RAMJobStore initialized. >>>>>> 2015-12-03 11:51:40=2C937 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: 0 >>>>>> Using 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=2C938 INFO [main] >>>>>> impl.StdSchedulerFactory - Quartz scheduler >>>>>> 'DefaultQuartzScheduler' initialized from default >>>>>> resource file in Quartz package: 'quartz.properties' >>>>>> 2015-12-03 11:51:40=2C939 INFO [main] >>>>>> impl.StdSchedulerFactory - Quartz scheduler >>>>>> version: 2.1.7 >>>>>> 2015-12-03 11:51:40=2C964 INFO [main] >>>>>> core.QuartzScheduler - Scheduler >>>>>> DefaultQuartzScheduler_$_NON_CLUSTERED started. >>>>>> 2015-12-03 11:51:40=2C986 DEBUG [Thread-6] >>>>>> log.Log4jLogger - add context >>>>>> "Task/1o7r2598w77d0w13" application... >>>>>> 2015-12-03 11:51:41=2C072 DEBUG [Thread-6] >>>>>> log.Log4jLogger - register REST handler >>>>>> "task.rest.IssueService" >>>>>> 2015-12-03 11:51:41=2C074 DEBUG [Thread-6] >>>>>> log.Log4jLogger - register REST handler >>>>>> "task.rest.TagService" >>>>>> 2015-12-03 11:51:41=2C122 INFO [Thread-6] >>>>>> log.Log4jLogger - users contexts are ready >>>>>> 2015-12-03 11:52:00=2C061 INFO >>>>>> [DefaultQuartzScheduler_Worker-1] >>>>>> log.Log4jLogger - start temp file cleaner tasks >>>>>> 2015-12-03 11:52:00=2C082 INFO >>>>>> [DefaultQuartzScheduler_Worker-2] >>>>>> log.Log4jLogger - start database remover task >>>>>> >>>>>> >>>>>> >>>>>>> On 2 Dec 2015=2C at 22:17=2C Dave Cramer < >>>>>>> pg@fastcrypt.com> wrote: >>>>>>> >>>>>>> Yes=2C JDBC is still involved. I'd say there is a >>>>>>> mistake in the JPA config >>>>>>> >>>>>>> Dave Cramer >>>>>>> >>>>>>> davec@postgresintl.com >>>>>>> www.postgresintl.com >>>>>>> >>>>>>> On 2 December 2015 at 17:15=2C Nuno Zimas >>>>>>> wrote: >>>>>>> >>>>>>> The programmer says that she relies on JPA >>>>>>> to establish the connection=2C but I suppose >>>>>>> that JDBC is still involved=2C otherwise i >>>>>>> can=E2=80=99t see how java would talk to postgr= esql. >>>>>>> Unless JPA does so directly. >>>>>>> Like I said=2C Java really isn=E2=80=99t my thi= ng. >>>>>>> >>>>>>> >>>>>>> >>>>>>>> On 2 Dec 2015=2C at 22:05=2C Nuno Zimas < >>>>>>>> nzimas@gmail.com> wrote: >>>>>>>> >>>>>>>> >>>>>>>> Thanks a lot=2C everyone (and specially Dave >>>>>>>> Cramer). >>>>>>>> Now I know the issue is not JDBC related. >>>>>>>> Not sure of this is good news for me=2C >>>>>>>> though :) >>>>>>>> >>>>>>>> I=E2=80=99d think that the application needs t= o be >>>>>>>> amended. >>>>>>>> Still=2C this does not account for the fact >>>>>>>> that it works on a local win machine. >>>>>>>> >>>>>>>> As you can see=2C Dave=E2=80=99s little progra= m >>>>>>>> connects like a charm=2C >>>>>>>> >>>>>>>> 2015-12-02 17:00:22 EST [2408-1] >>>>>>>> postgres@postgres LOG: duration: 16.239 ms >>>>>>>> parse : SET extra_float_digits =3D 3 >>>>>>>> 2015-12-02 17:00:22 EST [2408-2] >>>>>>>> postgres@postgres LOG: duration: 0.023 ms >>>>>>>> bind : SET extra_float_digits =3D 3 >>>>>>>> 2015-12-02 17:00:22 EST [2408-3] >>>>>>>> postgres@postgres LOG: duration: 0.031 ms >>>>>>>> execute : SET extra_float_digits =3D= 3 >>>>>>>> 2015-12-02 17:00:22 EST [2408-4] >>>>>>>> postgres@postgres LOG: duration: 0.217 ms >>>>>>>> parse : select 1 >>>>>>>> 2015-12-02 17:00:22 EST [2408-5] >>>>>>>> postgres@postgres LOG: duration: 0.100 ms >>>>>>>> bind : select 1 >>>>>>>> 2015-12-02 17:00:22 EST [2408-6] >>>>>>>> postgres@postgres LOG: duration: 0.953 ms >>>>>>>> execute : select 1 >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> On 2 Dec 2015=2C at 21:45=2C Dave Cramer < >>>>>>>>> pg@fastcrypt.com> wrote: >>>>>>>>> >>>>>>>>> log_min_duration >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> >>> >>> >> > --------------040707020802080401060809 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Would you change the following and check logs again:

from
properties.put(Persi= stenceUnitProperties.LOGGING_LEVEL=2C = "CONFIG")=3B

to
properties.put(Persi= stenceUnitProperties.LOGGING_LEVEL=2C = "ALL")=3B

According with this page (http://www.ec= lipse.org/eclipselink/documentation/2.5/jpa/extensions/p_logging_level.htm<= /a>)=2C the CONFIG will not log stacktraces.

Atenciosamente=2C

Edson Carlos Ericksson Richter
Em 03/12/2015 12:53=2C Nuno Zimas escreveu:
I=E2=80=99ve replaced=C2=A0postgresql-9.4-1201.jdbc4.jar with=C2=A0postgresql-9.4-= 1206.jdbc42.jar=2C then=C2=A0renamed it back to=C2=A0postgresql-9.4-1201.jdbc4.jar so=C2=A0that the=C2=A0application co= uld see it.

As suggested buy Edson=2C I=E2=80= =99ve passed an argument to the jdbc URL to increase verbosity=2C but without success.

2015-12-03 14:47:22=2C540 INFO = =C2=A0[benexus.nzimas.com-startSt= op-1] log.Log4jLogger - # init "benexus"
2015-12-03 14:47:23=2C027 WARN = =C2=A0[benexus.nzimas.com-startSt= op-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized
2015-12-03 14:47:23=2C028 ERROR = [benexus.nzimas.com-startSt= op-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql://10.10.10.100:5432/benexus= ?loglevel=3D2
2015-12-03 14:47:23=2C600 INFO = =C2=A0[benexus.nzimas.com-startSt= op-1] log.Log4jLogger - # init template "Task"
2015-12-03 14:47:24=2C833 INFO = =C2=A0[benexus.nzimas.com-startSt= op-1] log.Log4jLogger - # init template "CashTracker"
2015-12-03 14:47:26=2C170 INFO =C2=A0[main] impl.StdSchedulerFactory - Usi= ng default implementation for ThreadExecutor
2015-12-03 14:47:26=2C177 INFO =C2=A0[main] simpl.SimpleThreadPool - Job execution threads will=C2=A0

On 3 Dec 2015=2C at 14:28=2C Edson Richter <=3B= edso= nrichter@hotmail.com>=3B wrote:

Well=2C I don't use JDBC methods directly - just like the OP=2C I do use JPA for database access=2C 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=2C not a JDBC issue at all.

I've more than 7 years working with PgSQL=2C JPA and JDBC=2C and found only one "prepared statment" glitch with JDBC+timezone+DST=2C which can be easly solved with "prepareThreshold=3D0" in connection string - I don't even think it is a JDBC issue=2C 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=2C

Edson Carlos Ericksson Richter
Em 03/12/2015 12:19=2C 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's


On 3 December 2015 at 09:15=2C Edson Richter <=3Bedsonrichter@hotma= il.com>=3B wrote:
This is the same I use in production servers either with JDK 1.7_80 and 1.8_65.
Also=2C postgresql-9.3-1101.jdbc41.jar works well with both Java versions.

Atenciosamente=2C

Edson Carlos Ericksson Richter
Em 03/12/2015 11:57=2C Nuno Zimas escreveu:
The jar i= s named=C2=A0postgresql-9.4-1201.jdbc4.jar

Nuno.

--
Nuno Zimas
Systems Administrator &=3B Web Developer

T: +351 244 204 857

On 3 Dec 2015=2C at 13:27=2C Dave Cramer <=3Bpg@fas= tcrypt.com>=3B wrote:

OK=2C so what version of the postgresql driver are you using. It should have a 42 in the name if you are using java 8


On 3 December 2015 at 08:25=2C Nuno Zimas <=3Bnzimas@gmail.com>=3B 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=2C at 12:30=2C Dave Cramer <=3Bpg@fastcrypt.com<= /a>>=3B 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 not


On 3 December 2015 at 07:26=2C Edson Richter <=3B= edsonrichter@hotmail.com>=3B wrote:
You can add additional logging JPA and JDBC specific:

JPA:
With EclipseLink=2C I do use the following property:

=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 <=3Bproperty name=3D"eclipseli= nk.logging.level" value=3D"DEBUG"/&= gt=3B

You can set it at runtime=2C but you should look at it - and also check if your provider has similar option.
In my application=2C I've left all defaults in configuration file (persistence.xml)= =2C and just adjust the custom properties at runtime.

JDBC:<= /b>
You can add higher logging for jdbc itself with

jdbc:postgresql:/= / 10.10.= 10.100:5432/benexus?loglevel=3D2


Double check configuration:
Just in case=2C to make connections out of 127.0.0.1 you must configure postgres with "listen_address =3D '10.10.10.100' or listen_address=3D= '*' and port =3D '5432' in postgresql.conf= =3B also in pg_hba.conf you must have the line "host all all 10.10.10.99/32<= /a> md5".


Atenciosamente=2C

Edson Carlos Ericksson Richter
Em 03/12/2015 09:56=2C 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=2C821 INFO =C2=A0[main] log.Log4jLogger - 2Next 1.0.0 start
2015-12-03 11:51:26=2C823 INFO =C2=A0[main] log.Log4jLogger - copyright(c) the flabser team 2015. All Right Reserved
2015-12-03 11:51:26=2C824 INFO =C2=A0[main] log.Log4jLogger - OS: Linux 2.6.32-34-pve(amd= 64)=2C jvm: 1.8.0_65
2015-12-03 11:51:26=2C878 INFO =C2=A0[main] log.Log4jLogger - initialize runtime environment
2015-12-03 11:51:28=2C160 INFO =C2=A0[main] log.Log4jLogger - webServer will use port: 8080
2015-12-03 11:51:28=2C682 DEBUG [main] log.Log4jLogger - build: 11:44 3-December-2015
2015-12-03 11:51:28=2C690 DEBUG [main] log.Log4jLogger - init webserver ...
2015-12-03 11:51:29=2C701 INFO =C2=A0[main] log.Log4jLogger - load "FlabserPromo( flabser.com)"=
2015-12-03 11:51:29=2C767 DEBUG [main] log.Log4jLogger - register REST handler "flabserpromo.res= t.Service"
2015-12-03 11:51:29=2C776 INFO =C2=A0[main] log.Log4jLogger - load "Task"
2015-12-03 11:51:29=2C813 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.IssueS= ervice"
2015-12-03 11:51:29=2C831 DEBUG [main] log.Log4jLogger - register REST handler "task.rest.TagSer= vice"
2015-12-03 11:51:29=2C837 INFO =C2=A0[main] log.Log4jLogger - load "administrator( helloadmin.in= fo)"
2015-12-03 11:51:29=2C845 INFO =C2=A0[main] log.Log4jLogger - load "CashTracker"
2015-12-03 11:51:29=2C860 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .AccountService"
2015-12-03 11:51:29=2C863 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .BudgetService"
2015-12-03 11:51:29=2C865 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .CategoryService"
2015-12-03 11:51:29=2C868 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .CostCenterService"
2015-12-03 11:51:29=2C870 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .DashboardService"
2015-12-03 11:51:29=2C872 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .ReportsService"
2015-12-03 11:51:29=2C874 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .TagService"
2015-12-03 11:51:29=2C876 DEBUG [main] log.Log4jLogger - register REST handler "cashtracker.rest= .TransactionService"
2015-12-03 11:51:29=2C913 INFO =C2=A0[main] log.Log4jLogger - load "ImmigrationServi= ce( aikonamedia.kz= )"
2015-12-03 11:51:29=2C979 DEBUG [main] log.Log4jLogger - register REST handler "immigrationservi= ce.rest.Service"
2015-12-03 11:51:30=2C057 INFO =C2=A0[main] log.Log4jLogger - webserver start ( 10.10.10.99:= 8080)
2015-12-03 11:51:33=2C913 INFO =C2=A0[ flabser.com-s= tartStop-1] log.Log4jLogger - # init "FlabserPromo"
2015-12-03 11:51:35=2C192 INFO =C2=A0[aikonamedi= a.kz-startStop-1] log.Log4jLogger - # init "ImmigrationServi= ce"
2015-12-03 11:51:36=2C478 INFO =C2=A0[ helloadmin.in= fo-startStop-1] log.Log4jLogger - # init "administrator"
201= 5-12-03 11:51:37=2C080 INFO =C2=A0[benexus.nz= imas.com-startStop-1] log.Log4jLogger - # init "benexus"
201= 5-12-03 11:51:37=2C616 WARN =C2=A0[benexus.nz= imas.com-startStop-1] log.Log4jLogger - the entity manager of "benexus" has not been initialized
201= 5-12-03 11:51:37=2C617 ERROR [benexus.nz= imas.com-startStop-1] log.Log4jLogger - smartdoc postgres jdbc:postgresql:/= /10.10.= 10.100:5432/benexus
2015-12-03 11:51:38=2C217 INFO =C2=A0[ benexus.nz= imas.com-startStop-1] log.Log4jLogger - # init template "Task"
2015-12-03 11:51:39=2C508 INFO =C2=A0[ benexus.nz= imas.com-startStop-1] log.Log4jLogger - # init template "CashTracker"
2015-12-03 11:51:40=2C859 INFO =C2=A0[main] impl.StdScheduler= Factory - Using default implementation for ThreadExecutor
2015-12-03 11:51:40=2C866 INFO =C2=A0[main] simpl.SimpleThrea= dPool - Job execution threads will use class loader of thread: main
2015-12-03 11:51:40=2C929 INFO =C2=A0[main] core.SchedulerSig= nalerImpl - Initialized Scheduler Signaller of type: class org.quartz.core.S= chedulerSignalerImpl
2015-12-03 11:51:40=2C931 INFO =C2=A0[main] core.QuartzSchedu= ler - Quartz Scheduler v.2.1.7 created.
2015-12-03 11:51:40=2C934 INFO =C2=A0[main] simpl.RAMJobStore - RAMJobStore initialized.
2015-12-03 11:51:40=2C937 INFO =C2=A0[main] core.QuartzSchedu= ler - Scheduler meta-data: Quartz Scheduler (v2.1.7) 'DefaultQuartzSch= eduler' with instanceId 'NON_CLUSTERED'
=C2=A0 Scheduler class: 'org.quartz.core.= QuartzScheduler' - running locally.
=C2=A0 NOT STARTE= D.
=C2=A0 Currently = in standby mode.
=C2=A0 Number of jobs executed: 0
=C2=A0 Using thre= ad pool 'org.quartz.simpl= .SimpleThreadPool' - with 10 threads.
=C2=A0 Using job-store 'org.quartz.simpl= .RAMJobStore' - which does not support persistence. and is not clustered.

2015-12-03 11:51:40=2C938 INFO =C2=A0[main] impl.StdScheduler= Factory - Quartz scheduler 'DefaultQuartzSch= eduler' initialized from default resource file in Quartz package: 'quartz.propertie= s'
2015-12-03 11:51:40=2C939 INFO =C2=A0[main] impl.StdScheduler= Factory - Quartz scheduler version: 2.1.7
2015-12-03 11:51:40=2C964 INFO =C2=A0[main] core.QuartzSchedu= ler - Scheduler DefaultQuartzSche= duler_$_NON_CLUSTERED started.
2015-12-03 11:51:40=2C986 DEBUG [Thread-6] log.Log4jLogger - add context "Task/1o7r2598w77= d0w13" application...
2015-12-03 11:51:41=2C072 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.IssueS= ervice"
2015-12-03 11:51:41=2C074 DEBUG [Thread-6] log.Log4jLogger - register REST handler "task.rest.TagSer= vice"
2015-12-03 11:51:41=2C122 INFO =C2=A0[Thread-6] log.Log4jLogger - users contexts are ready
2015-12-03 11:52:00=2C061 INFO =C2=A0[DefaultQua= rtzScheduler_Worker-1] log.Log4jLogger - start temp file cleaner tasks
2015-12-03 11:52:00=2C082 INFO =C2=A0[DefaultQua= rtzScheduler_Worker-2] log.Log4jLogger - start database remover task



On 2 Dec 2015=2C at 22:17=2C Dave Cramer <=3B pg@fastcrypt.com>=3B wrote:

Yes= =2C JDBC is still involved. I'd say there is a mistake in the JPA config


On 2 December 2015 at 17:15=2C Nuno Zimas <=3B= nzimas@gmail.com>=3B wrote:
The programmer says that she relies on JPA to establish the connection=2C but I suppose that JDBC is still involved=2C otherwise i can=E2=80=99t see= how java would talk to postgresql.=C2=A0=
Unless JPA does so directly.
Like I said=2C Java really isn=E2=80=99t my thing.



On 2 Dec 2015=2C at 22:05=2C Nuno Zimas <=3B nzimas@gmail.com>=3B wrote:


Thanks a lot=2C everyone (and specially Dave Cramer).
Now I know the issue is not JDBC related.
Not sure of this is good news for me=2C though :)

I=E2= =80=99d think that the application needs to be amended.
Still=2C this does not account for the fact that it works on a local win machine.

As you can see=2C Dave=E2=80=99s li= ttle program connects like a charm=2C

2015-12-02 17:00:22 EST [2408-1] postgres@postgres LOG: =C2=A0duration: 16.239 ms =C2=A0parse <=3Bunnamed>= =3B: SET extra_float_digit= s =3D 3
2015-12-02 17:00:22 EST [2408-2] postgres@postgres LOG: =C2=A0duration: 0.023 ms =C2=A0bi= nd <=3Bunnamed>= =3B: SET extra_float_digit= s =3D 3
2015-12-02 17:00:22 EST [2408-3] postgres@postgres LOG: =C2=A0duration: 0.031 ms =C2=A0execute <=3Bunnamed>= =3B: SET extra_float_digit= s =3D 3
2015-12-02 17:00:22 EST [2408-4] postgres@postgres LOG: =C2=A0duration: 0.217 ms =C2=A0parse <=3Bunnamed>= =3B: select 1
2015-12-02 17:00:22 EST [2408-5] postgres@postgres LOG: =C2=A0duration: 0.100 ms =C2=A0bi= nd <=3Bunnamed>= =3B: select 1
2015-12-02 17:00:22 EST [2408-6] postgres@postgres LOG: =C2=A0duration: 0.953 ms =C2=A0execute <=3Bunnamed>= =3B: select 1



On 2 Dec 2015=2C at 21:45=2C Dave Cramer <=3B pg@fastcrypt.com>=3B wrote:

log_mi= n_duration













--------------040707020802080401060809--