[Mono-devel-list] Npgsql - null reference exception during opening connection
Kamil Skalski
nazgul at omega.pl
Wed May 19 03:07:22 EDT 2004
Wednesday 19 May 2004 03:32 otrzymałem od Ciebie:
> Kamil Skalski wrote:
> > I've encountered an exception during opening of NpgsqlConnection. The
> > stack trace is following:
> >
> > sql.n:17:9: debug: System.NullReferenceException: A null value was found
> > where an object instance was required.
> > in (unmanaged) /usr/lib/libmono.so.0(mono_class_from_name+0xd7)
> > [0x4011c2a8] in (unmanaged) /usr/lib/libmono.so.0 [0x400eb9a3]
> > in (unmanaged) /usr/lib/libmono.so.0 [0x400edbcf]
> > in (unmanaged) /usr/lib/libmono.so.0 [0x400ee2eb]
> > in <0x00066> System.Net.Dns:GetHostByName (string)
> > in <0x00032> System.Net.Sockets.TcpClient:Connect (string,int)
> > in <0x00026> System.Net.Sockets.TcpClient:.ctor (string,int)
> > in <0x00080> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnection)
> > in <0x00662> Npgsql.NpgsqlConnection:Open ()
> > in <0x0004f> (wrapper remoting-invoke-with-check)
> > Npgsql.NpgsqlConnection:Open ()
> >
> > my connection string is
> > "Server=localhost;Database=test;User ID=postgres;Password=sql;"
> >
> > The starngest thing is that I have another application, where exactly the
> > same connection string succedes and I can query database without problem.
> > I'm not yet able to find any related differences between those two
> > application - there is no network / database specific code at all in
> > them.
> > I also tried Server=127.0.0.1 but the behavior is identical - I've one
> > application succesfully opening connection and other failing.
> >
> > I'm still trying to reproduce behavior in some small example, but maybe
> > anybody has any suggestions?
>
> Hi Kamil.
>
> I'm also getting this behavior when runing nunit-tests. I still don't
> know why this is happening too. Please, if you find something about it,
> let me know.
With mono CVS from 1-2 days ago the problem disappears. I'm not sure what was
the cause, but I hope it will hold current state.
Kamil Skalski
More information about the Mono-devel-list
mailing list