ok, thanks. I'll try to use the 64 bit version of the oracle odp.net driver.
On May 12, 12:24 pm, fknebels <[email protected]> wrote: > I don't know if that's possible. > > See > here:http://visualstudiohacks.com/articles/visual-studio-net-platform-targ... > > The problem is that the Oracle Driver you are using is the 32 bit > Oracle driver. Since you are running on a 64 bit platform, your app > is getting compiled to a 64 bit application. Since a 64 bit > application can't call into a 32 bit dll, you are getting these > errors. > > Plus this may work for your machine, but not when you deploy you could > be deploying to a 32 or 64 bit environment. > > To match the Oracle dll, you need to specify the target to be x86 > (32bit). > > AnyCPU doesn't seem to be an option. > > On May 12, 11:47 am, c24chan <[email protected]> wrote: > > > > > Yes I am using Win 7 x64. I think you are right, it is a x86, x64 > > mismatch. > > > When I change my platform target from "Any CPU" to "x86", the console > > app works. > > > My question is, how do I make it work under "Any CPU", what oracle > > odp.net client to I need? > > > Thanks a lot! > > > On May 12, 10:53 am, fknebels <[email protected]> wrote: > > > > The issue could be with a x86, x64 mismatch. > > > > Are you using Win7 x64? I'm using the same version of the Oracle > > > client and set the Build -> Platform Target: -> x86. > > > > That works. > > > > On May 12, 10:20 am, c24chan <[email protected]> wrote: > > > > > Hi all, > > > > > Running into a problem with oracle data client on window 7. > > > > > The version of Oracle.DataAccess I am using is 2.111.7.20 and here is > > > > my hibernate.cfg.xml. > > > > > <?xml version="1.0" encoding="utf-8" ?> > > > > <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> > > > > <!--<reflection-optimizer use ="true"/> --> > > > > <session-factory> > > > > <property > > > > name="connection.provider">NHibernate.Connection.DriverConnectionProvider</ > > > > property> > > > > <property name="dialect">NHibernate.Dialect.Oracle10gDialect</ > > > > property> > > > > <property > > > > name="connection.driver_class">NHibernate.Driver.OracleDataClientDriver</ > > > > property> > > > > <property name="connection.connection_string"> > > > > User ID=aaa; > > > > Password=aaa; > > > > Pooling=true; > > > > Enlist=false; > > > > Statement Cache Size=50; > > > > Min Pool Size=10; > > > > Incr Pool Size=5; > > > > Decr Pool Size=2; > > > > Data Source=aaa.aaa > > > > </property> > > > > <property name="show_sql">true</property> > > > > <property > > > > name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, > > > > NHibernate.ByteCode.Castle</property> > > > > <property name="prepare_sql">true</property> > > > > <property name="query.substitutions">Y=true,N=false,0=false, > > > > 1=true</property> > > > > <property name="generate_statistics">true</property> > > > > <property name ="cache.use_second_level_cache">true</property> > > > > <property name="cache.use_query_cache">true</property> > > > > > <!-- development--> > > > > <property > > > > name="cache.provider_class">NHibernate.Cache.HashtableCacheProvider</ > > > > property> > > > > <mapping assembly="Core" /> > > > > </session-factory> > > > > </hibernate-configuration> > > > > > When I run my console test app, it is throwing me the following error. > > > > > "Could not create the driver from > > > > NHibernate.Driver.OracleDataClientDriver." > > > > > with stacktrace > > > > > at > > > > NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary`2 > > > > settings) > > > > at NHibernate.Connection.ConnectionProvider.Configure(IDictionary`2 > > > > settings) > > > > at > > > > NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary`2 > > > > settings) > > > > at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 > > > > properties) > > > > at NHibernate.Cfg.Configuration.BuildSettings() > > > > at NHibernate.Cfg.Configuration.BuildSessionFactory() > > > > at Workopolis.ConsoleTest.Program.Main(String[] args) in C: > > > > \Workopolis\Cobra\Main\Source\Workopolis.ConsoleTest\Program.cs:line > > > > 20 > > > > at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] > > > > args) > > > > at > > > > Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() > > > > at System.Threading.ExecutionContext.Run(ExecutionContext > > > > executionContext, ContextCallback callback, Object state) > > > > at System.Threading.ThreadHelper.ThreadStart() > > > > > The kicker is that the same dll and config file works in a web > > > > solution but not a console app, any ideas? > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "nhusers" group. > > > > To post to this group, send email to [email protected]. > > > > To unsubscribe from this group, send email to > > > > [email protected]. > > > > For more options, visit this group > > > > athttp://groups.google.com/group/nhusers?hl=en. > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "nhusers" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group > > > athttp://groups.google.com/group/nhusers?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "nhusers" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group > > athttp://groups.google.com/group/nhusers?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/nhusers?hl=en. -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
