Hi:
I'm trying to install Cutahoga in an oracle database. I have the scripts for the table creation, but I am in trouble with one thing: In the DatabaseUtil.cs script, there is a method that load the DatabaseType. Where is the definition about DatabaseType? Where I can add the ORACLE databaseType to the app. context?
Thanks in advance
The database type enumeration is defined in /Core/Domain/Enumerations.cs.
Btw, how went porting the database scripts to Oracle? Are there any special issues?
I'm asking this because we might be going to support Oracle and Firebird in the future. The guys at
Datanamic were so kind to donate a license of Dezign for Databases to Cuyahoga. This opens up possibilities to support more databases without the hassle of having to manually write all create and update scripts.
I already did a little test for Oracle and ran into the issue that the constraint names seemed to be too long. Is it still the case for Oracle 10g that constraint names can not be longer than 30 characters?
Hi:
I Finally could define the new database type.
Actually I have the database created (I use the workbench translation of oracle), with all triggers and constarints. However, I could not make the app. function well. When I try to see the application, I got an error... May be you colud help me...
ArgumentException: Keyword not supported: 'database'.]
System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +429
System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +99
System.Data.OracleClient.OracleConnectionString..ctor(String connectionString) +22
System.Data.OracleClient.OracleConnectionFactory.CreateConnectionOptions(String connectionOptions, DbConnectionOptions previous) +25
System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions) +141
System.Data.OracleClient.OracleConnection.ConnectionString_Set(String value) +55
System.Data.OracleClient.OracleConnection.set_ConnectionString(String value) +4
NHibernate.Connection.DriverConnectionProvider.GetConnection() +63
[ADOException: Could not create connection from Driver]
NHibernate.Connection.DriverConnectionProvider.GetConnection() +119
NHibernate.Impl.SessionFactoryImpl.OpenConnection() +29
[ADOException: cannot open connection]
NHibernate.Impl.SessionFactoryImpl.OpenConnection() +83
NHibernate.Impl.SessionImpl.get_Connection() +32
NHibernate.Impl.BatcherImpl.Prepare(IDbCommand command) +105
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) +24
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) +175
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +243
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) +65
NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) +169
NHibernate.Hql.QueryTranslator.List(ISessionImplementor session, QueryParameters queryParameters) +64
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) +200
[ADOException: Could not execute query]
NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) +255
NHibernate.Impl.QueryImpl.List() +84
NHibernate.Impl.AbstractQueryImpl.UniqueResult() +7
Cuyahoga.Core.DataAccess.SiteStructureDao.GetSiteAliasByUrl(String url) in c:\Documents and Settings\Desarrollo6\Escritorio\Cuyahoga-1.5.0-src\Core\DataAccess\SiteStructureDao.cs:56
ProxyInterfaceDataAccessSiteStructureDao_ISiteStructureDao_ISerializable.callback__GetSiteAliasByUrl(String ) +10
__delegate_2.Call(Object[] ) +52
Castle.Windsor.Proxy.DefaultMethodInvocation.Proceed(Object[] args) +164
Castle.Facilities.AutomaticTransactionManagement.TransactionInterceptor.Intercept(IMethodInvocation invocation, Object[] args) +169
Castle.Windsor.Proxy.DefaultMethodInvocation.Proceed(Object[] args) +123
Castle.Windsor.Proxy.InterceptorChain.Intercept(IMethodInvocation invocation, Object[] args) +182
ProxyInterfaceDataAccessSiteStructureDao_ISiteStructureDao_ISerializable.GetSiteAliasByUrl(String url) +105
Cuyahoga.Core.Service.SiteStructure.SiteService.GetSiteAliasByUrl(String url) in c:\Documents and Settings\Desarrollo6\Escritorio\Cuyahoga-1.5.0-src\Core\Service\SiteStructure\SiteService.cs:49
Cuyahoga.Web.UI.PageEngine.OnInit(EventArgs e) in c:\Documents and Settings\Desarrollo6\Escritorio\Cuyahoga-1.5.0-src\Web\UI\PageEngine.cs:159
System.Web.UI.Control.InitRecursive(Control namingContainer) +321
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +692
------------
If you want the Oracle scripts, I have not problem in share its with you.
Thanks in advance.
This looks like an invalid connection string where the parameter 'database' doesn't seem to be recognized. Have a look at
http://www.connectionstrings.com/?carrier=oracle this page to find the proper connectionstring.
Also don't forget to set the correct nhibernateDriver and nhibernateDialect properties for Oracle in /Config/properties.config.
Hi:
Thanks for your help.
I spent many hours in config. the app, and Finally, it seems that drivers, connections and all related with the persistence and app communication functions well. However, when I get into the app. I get the following message:
An error occured:
NHibernate.ADOException: Unable to perform find ---> System.Data.OracleClient.OracleException: ORA-00942: la tabla o vista no existe at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) at NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Object optionalObject, Object optionalId, Object[] optionalCollectionKeys, Boolean returnProxies) at NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) at NHibernate.Loader.CriteriaLoader.List(ISessionImplementor session) at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria) --- End of inner exception stack trace --- at NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria) at NHibernate.Impl.CriteriaImpl.List() at Cuyahoga.Core.DataAccess.CommonDao.GetAll(Type type, String[] sortProperties) in c:\Documents and Settings\Desarrollo6\Escritorio\Cuyahoga-1.5.0-src\Core\DataAccess\CommonDao.cs:line 74 at Cuyahoga.Core.DataAccess.CommonDao.GetAll(Type type) in c:\Documents and Settings\Desarrollo6\Escritorio\Cuyahoga-1.5.0-src\Core\DataAccess\CommonDao.cs:line 59 at ProxyInterfaceDataAccessCommonDao_ICommonDao_ISerializable.callback__GetAll(Type ) at ProxyInterfaceDataAccessCommonDao_ICommonDao_ISerializable.__delegate_4.Call(Object[] ) at Castle.Windsor.Proxy.DefaultMethodInvocation.Proceed(Object[] args) at Castle.Facilities.AutomaticTransactionManagement.TransactionInterceptor.Intercept(IMethodInvocation invocation, Object[] args) at Castle.Windsor.Proxy.DefaultMethodInvocation.Proceed(Object[] args) at Castle.Windsor.Proxy.InterceptorChain.Intercept(IMethodInvocation invocation, Object[] args) at ProxyInterfaceDataAccessCommonDao_ICommonDao_ISerializable.GetAll(Type type) at Cuyahoga.Web.Install.Install.Page_Load(Object sender, EventArgs e) in c:\Documents and Settings\Desarrollo6\Escritorio\Cuyahoga-1.5.0-src\Web\Install\Install.aspx.cs:line 90
May be, you could say me more about the code, and I could finish the oracle cnfiguration...
Thanks,
Santiago
Forget my last post....
I finally could do it!
All seems to works fine...
Thanks
Hi... It is me again.
There are some things that doesn't not work well, but I think that the reason of all is that the configuration of the database is not 100% well.
However, I had worked very hard in order to make this function because I really need it. I have seen that the app. has a logger, but I never could seen it. Where are the logs located? can I set the showql propertie on? how ?
Thanks...
The log files are in [your cuyahoga folder]/Web/log
Add following node to your log4net configuration section in the Web.config file:
<logger name="NHibernate.SQL">
<level value="DEBUG" />
</logger>
And you will be able to see all the sql related logs.