[Mono-list] Re: Npgsql doesn't work anymore
--- Jaroslaw Kowalski <[EMAIL PROTECTED]> escreveu: > > I'm using Fedora Core 1 with "postgresql-server-7.3.4-11" installed from RPM > and Npgsql (from Mono/CVS) doesn't work for me (while it used to work > properly about one month ago). > > I get "System.NullReferenceException : Object reference not set to an > instance of an object" when connecting. The problem seems to occur in > NpgsqlConnection.ProcessServerVersion(). > > > if (BackendProtocolVersion == ProtocolVersion.Version2) > { > > > and it prints "_serverVersion is null". It obviously fails on > _serverVersion.IndexOf() right after that. > > My ConnectionString is: > > 'Server=fw.home.lan;Initial Catalog=SoodaUnitTests;User > Id=mono;Password=mono' > > I can provide more debug info but I don't know what exactly is needed here. > Any ideas? Hi Jaroslaw. I'm checking that. In my nunit tests here I'm not getting this problem. We had this problem some time ago, but we already fixed it. But may there is some case which is still getting problems. In the Open method, near its end, and before the call to ProcessServerVersion there is a line: ServerVersion = Connector.ServerVersion; Could you check what is the value of ServerVersion when this code executes? Also, a little bit above, is where we set the Connector.ServerVersion. Could you also check what value is being set? Thanks in advance. Regards, Francisco Figueiredo Jr. __ Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora: http://br.yahoo.com/info/mail.html ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Re: Npgsql doesn't work anymore
I've made some tests. My new diff is attached (I've added two WriteLine's, one of them never was never executed). The output is: ZZZ ServerVersion: False _serverVersion is null - Hope it helps. BTW. I've tried to add "MaxPoolSize=0" to the CS but it just caused the connection to hang. Jarek - Original Message - From: "Francisco Figueiredo Jr." <[EMAIL PROTECTED]> To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, March 19, 2004 9:35 PM Subject: [Mono-list] Re: Npgsql doesn't work anymore > --- Jaroslaw Kowalski <[EMAIL PROTECTED]> escreveu: > > > > I'm using Fedora Core 1 with "postgresql-server-7.3.4-11" installed from RPM > > and Npgsql (from Mono/CVS) doesn't work for me (while it used to work > > properly about one month ago). > > > > I get "System.NullReferenceException : Object reference not set to an > > instance of an object" when connecting. The problem seems to occur in > > NpgsqlConnection.ProcessServerVersion(). > > > > > > > > if (BackendProtocolVersion == ProtocolVersion.Version2) > > { > > > > > > and it prints "_serverVersion is null". It obviously fails on > > _serverVersion.IndexOf() right after that. > > > > My ConnectionString is: > > > > 'Server=fw.home.lan;Initial Catalog=SoodaUnitTests;User > > Id=mono;Password=mono' > > > > I can provide more debug info but I don't know what exactly is needed here. > > Any ideas? > > > Hi Jaroslaw. > > I'm checking that. > In my nunit tests here I'm not getting this problem. > We had this problem some time ago, but we already fixed it. But may there is > some case which is still getting problems. > > In the Open method, near its end, and before the call to ProcessServerVersion > there is a line: > > ServerVersion = Connector.ServerVersion; > > Could you check what is the value of ServerVersion when this code executes? > > Also, a little bit above, is where we set the Connector.ServerVersion. Could > you also check what value is being set? > > Thanks in advance. > > Regards, > > Francisco Figueiredo Jr. > > > > > > > > __ > > Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora: > http://br.yahoo.com/info/mail.html > ___ > Mono-list maillist - [EMAIL PROTECTED] > http://lists.ximian.com/mailman/listinfo/mono-list > ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Re: Npgsql doesn't work anymore
Sorry, obviously I forgot to add the diff. Jarek - Original Message - From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]> To: "Francisco Figueiredo Jr." <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, March 19, 2004 10:02 PM Subject: Re: [Mono-list] Re: Npgsql doesn't work anymore > I've made some tests. My new diff is attached (I've added two WriteLine's, > one of them never was never executed). > > The output is: > > > ZZZ ServerVersion: False > _serverVersion is null > - > > Hope it helps. > > BTW. I've tried to add "MaxPoolSize=0" to the CS but it just caused the > connection to hang. > > Jarek > > - Original Message - > From: "Francisco Figueiredo Jr." <[EMAIL PROTECTED]> > To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Friday, March 19, 2004 9:35 PM > Subject: [Mono-list] Re: Npgsql doesn't work anymore > > > > --- Jaroslaw Kowalski <[EMAIL PROTECTED]> escreveu: > > > > > > I'm using Fedora Core 1 with "postgresql-server-7.3.4-11" installed from > RPM > > > and Npgsql (from Mono/CVS) doesn't work for me (while it used to work > > > properly about one month ago). > > > > > > I get "System.NullReferenceException : Object reference not set to an > > > instance of an object" when connecting. The problem seems to occur in > > > NpgsqlConnection.ProcessServerVersion(). > > > > > > > > > > > > > if (BackendProtocolVersion == ProtocolVersion.Version2) > > > { > > > > > > > > > and it prints "_serverVersion is null". It obviously fails on > > > _serverVersion.IndexOf() right after that. > > > > > > My ConnectionString is: > > > > > > 'Server=fw.home.lan;Initial Catalog=SoodaUnitTests;User > > > Id=mono;Password=mono' > > > > > > I can provide more debug info but I don't know what exactly is needed > here. > > > Any ideas? > > > > > > Hi Jaroslaw. > > > > I'm checking that. > > In my nunit tests here I'm not getting this problem. > > We had this problem some time ago, but we already fixed it. But may there > is > > some case which is still getting problems. > > > > In the Open method, near its end, and before the call to > ProcessServerVersion > > there is a line: > > > > ServerVersion = Connector.ServerVersion; > > > > Could you check what is the value of ServerVersion when this code > executes? > > > > Also, a little bit above, is where we set the Connector.ServerVersion. > Could > > you also check what value is being set? > > > > Thanks in advance. > > > > Regards, > > > > Francisco Figueiredo Jr. > > > > > > > > > > > > > > > > __ > > > > Yahoo! Mail - O melhor e-mail do Brasil! Abra sua conta agora: > > http://br.yahoo.com/info/mail.html > > ___ > > Mono-list maillist - [EMAIL PROTECTED] > > http://lists.ximian.com/mailman/listinfo/mono-list > > > > ___ > Mono-list maillist - [EMAIL PROTECTED] > http://lists.ximian.com/mailman/listinfo/mono-list > npgsql.diff Description: Binary data
Re: [Mono-list] Re: Npgsql doesn't work anymore
Jaroslaw Kowalski wrote: I've made some tests. My new diff is attached (I've added two WriteLine's, one of them never was never executed). Hi Jaroslaw... The AAA output should have be executed. This is the output I get with the latest cvs code... AAA ServerVersion: PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) True ZZZ ServerVersion: PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) True If you aren't seeing the AAA output, it's because the connector is already initialized, but it shouldn't!! Could you add the following lines in your test app? NpgsqlEventLog.Level = LogLevel.Debug; NpgsqlEventLog.LogName = "NpgsqlTests.LogFile"; This will create a file NpgsqlTests.LogFile with logging which could help track the problem. Thanks in advance. The output is: ZZZ ServerVersion: False _serverVersion is null - Hope it helps. BTW. I've tried to add "MaxPoolSize=0" to the CS but it just caused the connection to hang. Yeap, it has to be at least 1 :) I will add a check for that. -- Regards, Francisco Figueiredo Jr. Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founder Member http://monobrasil.softwarelivre.org - "Science without religion is lame; religion without science is blind." ~ Albert Einstein ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Re: Npgsql doesn't work anymore
OK. It was my fault. I didn't notice the first AAA message (I ran the tests through nunit) My problem was related to invalid hostname in the connection string. I should have used localhost instead of DNS name. After I changed it - it worked. Jarek - Original Message - From: "Francisco Figueiredo Jr." <[EMAIL PROTECTED]> To: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>; "MONO List" <[EMAIL PROTECTED]> Sent: Saturday, March 20, 2004 8:30 PM Subject: Re: [Mono-list] Re: Npgsql doesn't work anymore > Jaroslaw Kowalski wrote: > > I've made some tests. My new diff is attached (I've added two WriteLine's, > > one of them never was never executed). > > > > Hi Jaroslaw... > > The AAA output should have be executed. > This is the output I get with the latest cvs code... > > AAA ServerVersion: PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by > GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) True > ZZZ ServerVersion: PostgreSQL 7.3.4 on i686-pc-linux-gnu, compiled by > GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) True > > > > If you aren't seeing the AAA output, it's because the connector is > already initialized, but it shouldn't!! > > Could you add the following lines in your test app? > NpgsqlEventLog.Level = LogLevel.Debug; > NpgsqlEventLog.LogName = "NpgsqlTests.LogFile"; > > This will create a file NpgsqlTests.LogFile with logging which could > help track the problem. > > > Thanks in advance. > > > > The output is: > > > > > > ZZZ ServerVersion: False > > _serverVersion is null > > - > > > > Hope it helps. > > > > BTW. I've tried to add "MaxPoolSize=0" to the CS but it just caused the > > connection to hang. > > > > Yeap, it has to be at least 1 :) > I will add a check for that. > > > -- > Regards, > > Francisco Figueiredo Jr. > Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founder Member > http://monobrasil.softwarelivre.org > > > > - > "Science without religion is lame; > religion without science is blind." > >~ Albert Einstein > ___ > Mono-list maillist - [EMAIL PROTECTED] > http://lists.ximian.com/mailman/listinfo/mono-list > ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Re: Npgsql doesn't work anymore
Jaroslaw Kowalski wrote: OK. It was my fault. I didn't notice the first AAA message (I ran the tests through nunit) :) My problem was related to invalid hostname in the connection string. I should have used localhost instead of DNS name. After I changed it - it worked. Hmmm, don't you get any NpgsqlException regarding connection problem? Thanks in advance. -- Regards, Francisco Figueiredo Jr. Membro Fundador do Projeto MonoBrasil - MonoBrasil Project Founder Member http://monobrasil.softwarelivre.org - "Science without religion is lame; religion without science is blind." ~ Albert Einstein ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list