-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: failing to test NHibernate 0.8.3
PostPosted: Mon May 16, 2005 2:33 pm 
Newbie

Joined: Mon May 16, 2005 2:20 pm
Posts: 2
Hi,

I build NHibernate 0.8.3 successfully. However, when I try to test NHibernate I get a 'build failed' message. I call the build file with these params:

NAnt -D:project.config=release -D:nhibernate.dialect="NHibernate.Dialect.PostgreSQLDialect" -D:nhibernate.connection.driver_class="NHibernate.Driver.NpgsqlDriver" -D:nhibernate.connection.connection_string="Server=localhost;initial catalog=nhibernate;User ID=postgres;Password=xxxxxx;Encoding=UNICODE;Min Pool Size=2" test >output-release-test.log

I am using PostgreSQL 8.0.1. The database is up and running.

Here is an extract of output-release-test.log:

2005-05-16 20:13:41,967 [3296] ERROR NHibernate.Test.TestCase [] <> - Error while setting up the database schema, ignoring the fixture
Exception: NHibernate.HibernateException
Message: Could not create the driver from NHibernate.Driver.NpgsqlDriver.
Source: NHibernate
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary settings)
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format)
at NHibernate.Tool.hbm2ddl.SchemaExport.Create(Boolean script, Boolean export)
at NHibernate.Test.TestCase.ExportSchema(IList files, String assemblyName)
at NHibernate.Test.TestCase.TestFixtureSetUp()

Nested Exception

Exception: System.Reflection.TargetInvocationException
Message: Ein Aufrufziel hat einen Ausnahmefehler verursacht.
Source: mscorlib
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)

Nested Exception

Exception: NHibernate.HibernateException
Message: The IDbCommand and IDbConnection implementation in the Assembly Npgsql.dll could not be found. Please ensure that the Assemblies needed to communicate with PostgreSQL are in the Global Assembly Cache or in a location that NHibernate can use System.Type.GetType(string) to load the types from.
Source: NHibernate
at NHibernate.Driver.NpgsqlDriver..ctor()



2005-05-16 20:13:42,108 [3296] ERROR NHibernate.Test.TestCase [] <> - Error while setting up the database schema, ignoring the fixture
Exception: NHibernate.HibernateException
Message: Could not create the driver from NHibernate.Driver.NpgsqlDriver.
Source: NHibernate
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary settings)
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format)
at NHibernate.Tool.hbm2ddl.SchemaExport.Create(Boolean script, Boolean export)
at NHibernate.Test.TestCase.ExportSchema(IList files, String assemblyName)
at NHibernate.Test.TestCase.TestFixtureSetUp()

Nested Exception

Exception: System.Reflection.TargetInvocationException
Message: Ein Aufrufziel hat einen Ausnahmefehler verursacht.
Source: mscorlib
at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)

Nested Exception

Exception: NHibernate.HibernateException
Message: The IDbCommand and IDbConnection implementation in the Assembly Npgsql.dll could not be found. Please ensure that the Assemblies needed to communicate with PostgreSQL are in the Global Assembly Cache or in a location that NHibernate can use System.Type.GetType(string) to load the types from.
Source: NHibernate
at NHibernate.Driver.NpgsqlDriver..ctor()



2005-05-16 20:13:43,061 [3296] ERROR NHibernate.Test.TestCase [] <> - Error while setting up the database schema, ignoring the fixture
Exception: NHibernate.HibernateException
Message: Could not create the driver from NHibernate.Driver.NpgsqlDriver.
Source: NHibernate
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
at NHibernate.Connection.ConnectionProvider.Configure(IDictionary settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary settings)
at NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Boolean script, Boolean export, Boolean justDrop, Boolean format)
at NHibernate.Tool.hbm2ddl.SchemaExport.Create(Boolean script, Boolean export)
at NHibernate.Test.TestCase.ExportSchema(IList files, String assemblyName)
at NHibernate.Test.TestCase.TestFixtureSetUp()


I have no idea, why a connection cannot be established. Any help is highly appreciated. Thank you.

Dirk


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 3:22 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Well, it says in the exception message that it can't find Npgsql.dll. Do you have it in the GAC or in some accessible place (in the same directory as the NHibernate.Tests.dll for example)? You also have to copy Mono.Security.Tls.dll.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 5:21 pm 
Newbie

Joined: Mon May 16, 2005 2:20 pm
Posts: 2
sergey wrote:
Well, it says in the exception message that it can't find Npgsql.dll. Do you have it in the GAC or in some accessible place (in the same directory as the NHibernate.Tests.dll for example)? You also have to copy Mono.Security.Tls.dll.


I missed Mono.Security.Tls.dll. That did the trick. Thx.


Top
 Profile  
 
 Post subject: Same problem with MySql
PostPosted: Fri Jun 02, 2006 11:49 pm 
Beginner
Beginner

Joined: Wed Oct 05, 2005 2:08 pm
Posts: 23
I'm getting the exact same error message but with MySql. I've registered MySql.Data.dll in the GAC, and I don't suppose I need Mono.Security.dll do I?

The IDbCommand and IDbConnection implementation in the assembly MySql.Data could not be found. Please ensure that the assembly MySql.Data is in the Global Assembly Cache or in a location that NHibernate can use System.Type.GetType(string) to load the types from.

I've tried using MySql.Data without NHibernate and it works fine. I've also noted that in the source code for the Connection provider it mentions that this namespace requires ICSharpCode.SharpZipLib.dll which I have also added to the GAC.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.