-->
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.  [ 3 posts ] 
Author Message
 Post subject: NHibernate and embedded Firebird
PostPosted: Wed Feb 21, 2007 10:13 am 
Beginner
Beginner

Joined: Wed Nov 08, 2006 8:24 am
Posts: 26
Location: Gothenburg, Sweden
I'm using Firebird (database server) with NHibernate and all works fine. But I experience some problems when I try to use the embedded version of Firebird, an exception (FirebirdSql.Data.Common.IscException "no permission for read-write access to database C:\\MIE.GDB") is thrown.

NHibernate version is 1.2.0.Beta3, and Firebird 1.5.4.4910.

app.config:
Code:
 
<!-- Configure NHibernate -->
  <nhibernate>
    <add
      key="hibernate.connection.provider"
      value="NHibernate.Connection.DriverConnectionProvider"/>
    <add
      key="hibernate.dialect"
      value="NHibernate.Dialect.FirebirdDialect"/>
    <add
      key="hibernate.connection.driver_class"
      value="NHibernate.Driver.FirebirdClientDriver"/>
    <add
      key="hibernate.connection.connection_string"
  value="ServerType=1;User=SYSDBA;Password=masterkey;Pooling=false;Database=E:\\MIE.GDB"/>
  </nhibernate>

[/b]

Stacktrace:
Code:
-      e   0x035defe8 { "cannot open connection"}   System::Exception^
+      [NHibernate::ADOException^]   0x035defe8 { sql=<undefined value> }   NHibernate::ADOException^
      System::Object^   0x035defe8   System::Object^
+      Data   0x006e1808   System::Collections::IDictionary^
      HResult   -2146232832   int
      HelpLink   <undefined value>   System::String^
+      InnerException   0x006e1808 { "no permission for read-write access to database E:\\MIE.GDB"}   System::Exception^
      IsTransient   false   bool
      Message   "cannot open connection"   System::String^
      Source   "NHibernate"   System::String^
      StackTrace   "   at NHibernate.Impl.SessionFactoryImpl.OpenConnection() in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionFactoryImpl.cs:line 1163
   at NHibernate.Impl.ConnectionManager.Connect() in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\ConnectionManager.cs:line 53
   at NHibernate.Impl.ConnectionManager.GetConnection() in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\ConnectionManager.cs:line 202
   at NHibernate.Impl.BatcherImpl.Prepare(IDbCommand cmd) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\BatcherImpl.cs:line 90
   at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\BatcherImpl.cs:line 179
   at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Loader\Loader.cs:line 1392
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\net\nhibernate\nhibernate\src\NHibernate\Loader\Loader.cs:line 417
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) in c:\net\nhibernate\nhibernate\src\NHibernate\Loader\Loader.cs:line 183
   at NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) in c:\net\nhibernate\nhibernate\src\NHibernate\Loader\Loader.cs:line 1783
   at NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) in c:\net\nhibernate\nhibernate\src\NHibernate\Loader\Loader.cs:line 1731
   at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) in c:\net\nhibernate\nhibernate\src\NHibernate\Loader\Loader.cs:line 1725
   at NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) in c:\net\nhibernate\nhibernate\src\NHibernate\Loader\Criteria\CriteriaLoader.cs:line 66
   at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 4964
   at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria) in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\SessionImpl.cs:line 4904
   at NHibernate.Impl.CriteriaImpl.List() in c:\net\nhibernate\nhibernate\src\NHibernate\Impl\CriteriaImpl.cs:line 305
   at MIE.Server.SignCommonManager.getAllSigns() in e:\mie\mieserver\trunk\mieserver\signcommonmanager.cpp:line 46"   System::String^
+      TargetSite   0x006e1800   System::Reflection::MethodBase^
      _COMPlusExceptionCode   -532459699   int
      _HResult   -2146232832   int
      _className   <undefined value>   System::String^
+      _data   0x010d2038   System::Collections::IDictionary^
      _dynamicMethods   <undefined value>   System::Object^
+      _exceptionMethod   0x010d202c   System::Reflection::MethodBase^
      _exceptionMethodString   <undefined value>   System::String^
      _helpURL   <undefined value>   System::String^
+      _innerException   0x010d203c { "no permission for read-write access to database E:\\MIE.GDB"}   System::Exception^
      _message   "cannot open connection"   System::String^
      _remoteStackIndex   0   int
      _remoteStackTraceString   <undefined value>   System::String^
      _source   "NHibernate"   System::String^
+      _stackTrace   {System.Array}   System::Object^
      _stackTraceString   <undefined value>   System::String^
      _xcode   -532459699   int
      _xptrs   0   int


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 21, 2007 1:57 pm 
Regular
Regular

Joined: Fri Feb 18, 2005 3:34 am
Posts: 88
Location: Poland/Wrocław
Shouldn't the server type in the connection string be 2 or 3? I was experiencing with FB embeded some time ago and it seems it should be so.

Have you seen this: http://www.dotnetfirebird.org/ ?

_________________
Please rate this post if you've found it helpfull
Roland


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 22, 2007 8:04 am 
Beginner
Beginner

Joined: Wed Nov 08, 2006 8:24 am
Posts: 26
Location: Gothenburg, Sweden
rolandz wrote:
Shouldn't the server type in the connection string be 2 or 3? I was experiencing with FB embeded some time ago and it seems it should be so.

Have you seen this: http://www.dotnetfirebird.org/ ?


ServerType=2 gives exception "Unable to load DLL 'clrexternalengine': The specified module could not be found", and ServerType=3 is invalid.

When I read the Firebird documentation I find that server type 0 is the "normal" windows service application, and server type 1 means the embedded database.

NHibernate seems to find the database (when I try with a faulty filename I get another exception), but isn't able to connect to it. Does someone know why?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.