David,

Thanks for your reply.

I have tried using a connection string which in effect bypasses the
TNS config files, but I get the same error. I do not believe there is
a problem actually connecting to the database itself: that seems to
work ok as I can see the session connected at the database.

The error message I posted was the one from the Inner exception. The
top level error message was a generic, cover everything sort of thing:
      "An invalid or incomplete configuration was used while creating
a SessionFactory. Check PotentialReasons collection, and
InnerException for more detail"

I'm running 1.0RC. I will download the RTM version and see how I go
with it.

I had a look at the link you supplied, but I must admit I'm on a
pretty steep learning curve with this, so at the moment, I'm not up to
speed on all the configuration and setup for NHibernate.


Chris.

On Sep 2, 12:06 am, "David R. Longnecker" <tiredstud...@gmail.com>
wrote:
> Chris-
>
> That connection string should work. I've honestly never tried
> OracleClient with FNH--preferring, like you, the Oracle ODP.  I'm
> assuming your using a tnsnames.ora reference since you're not using
> the ConnectionStringBuilder built into OracleDataClientConfiguration.
>
> A few questions:
>
> - Have you tried building a TNS-less connection string using the
> ConnectionStringBuilder?  Same thing?
>
> - Did the exception you receive return any further details in the
> inner exception?
>
> - Are you running 1.0 RTM?
>
> I also came across this from Fabio.  I haven't ran into the specified
> situation, but perhaps our Oracle environment is setup with different
> parameters (I'm happily NOT the Oracle DBA. :))
>
> http://groups.google.com/group/nhusers/browse_thread/thread/8acd81dab...
>
> -dl
>
> --
> David R. Longnecker
> blog:http://blog.tiredstudent.com
> twitter: dlongnecker
>
> "Good design is a Renaissance attitude that combines technology,
> cognitive science, human need, and beauty to produce something." -
> Paola Antonelli
>
> On Tue, Sep 1, 2009 at 12:12 AM, Chris<chris.yo...@alsenviro.com> wrote:
>
> > I am trying to evaluate Fluent NHibernate for a new development
> > project. I am attempting to use the 'Getting Started' project from the
> > Fluent NHibernate Wiki, adapted for use with an Oracle database. I
> > want to be able to use the Oracle Data Provider rather than the
> > Microsoft version because of extra features in the Oracle version and
> > the termination of support for the Microsoft offering. I can connect
> > to the database but I get the following error after the
> > Fluently.Configure() ....  function throws an exception:
>
> > Unable to cast object of type
> > 'Oracle.DataAccess.Client.OracleConnection' to type
> > 'System.Data.Common.DbConnection'
>
> > The code I am using is just the getting started code modified for use
> > with Oracle.:
>
> > private static ISessionFactory CreateSessionFactory()
> >        {
> >            //return Fluently.Configure()
> >            //    .Database(SQLiteConfiguration.Standard
> >            //        .UsingFile(DbFile))
> >            //    .Mappings(m =>
> >            //        m.FluentMappings.AddFromAssemblyOf<Program>())
> >            //    .ExposeConfiguration(BuildSchema)
> >            //    .BuildSessionFactory();
>
> >            var cfg = OracleDataClientConfiguration.Oracle10
> >                .ConnectionString( c => c
> >                    .Is( "DATA SOURCE=DEVDB;" +
> >                         "PERSIST SECURITY INFO=True;" +
> >                         "USER ID=TRY_FLUENT;" +
> >                         "PASSWORD=TEST" ) );
>
> >            return Fluently.Configure()
> >                    .Database( cfg )
> >                    .Mappings( m => m
> >                        .FluentMappings.AddFromAssemblyOf<Program>() )
> >                    .BuildSessionFactory();
> >        }
>
> > I know it does work with the Microsoft data access as a schema was
> > built and tables were populated with data when I ran the program.
>
> > Can anyone please help with a solution as I have no idea how to solve
> > this problem.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to