These are chat archives for mfenniak/rethinkdb-net

8th
Dec 2015
Troy
@bbqchickenrobot
Dec 08 2015 01:25
Getting error when connecting from the client on Mac OSX .... says it doesn't know the <rethinkdb/> type (type initializer exception)
any one ever get that?
Mathieu Fenniak
@mfenniak
Dec 08 2015 01:29
Hm... Doesn't sound familiar. Can you paste the error message in full? Are you using the XML configuration approach?
Troy
@bbqchickenrobot
Dec 08 2015 01:33
yes, using xml config (app.config)
Mathieu Fenniak
@mfenniak
Dec 08 2015 01:34
Do you have a config sections area, like <configSections>
<section name="rethinkdb" type="RethinkDb.Configuration.RethinkDbClientSection, RethinkDb"/>
</configSections>
And if you have that, plus RethinkDb as a reference, that ought to work...
Troy
@bbqchickenrobot
Dec 08 2015 01:37
actually, just realized that the entity framework is throwing the exception - I have another config defined for NuoDB
added the line you gave and get the same error - when I comment out the <rethinkdb/> section it goes away ...
i think the entity framework client is throwing the error ...
Troy
@bbqchickenrobot
Dec 08 2015 02:01
hmmm... weird.... here is the full stack trace
Unhandled Exception:
System.TypeInitializationException: The type initializer for 'RethinkDbBuilder.MainClass' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Error Initializing the configuration system. ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section <rethinkdb> (/Users/Troy/Documents/Projects/TriviaKings/TriviaKings/RethinkDbBuilder/bin/Debug/RethinkDbBuilder.exe.config line 3)
at System.Configuration.ConfigInfo.ThrowException (System.String text, System.Xml.XmlReader reader) [0x00000] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/ConfigInfo.cs:77
at System.Configuration.SectionGroupInfo.ReadContent (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed, Boolean root) [0x0015a] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/SectionGroupInfo.cs:330
at System.Configuration.SectionGroupInfo.ReadRootData (System.Xml.XmlReader reader, System.Configuration.Configuration config, Boolean overrideAllowed) [0x00007] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/SectionGroupInfo.cs:273
at System.Configuration.Configuration.ReadConfigFile (System.Xml.XmlReader reader, System.String fileName) [0x000ec] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/Configuration.cs:568
at System.Configuration.Configuration.Load () [0x00052] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/Configuration.cs:528
at System.Configuration.Configuration.Init (IConfigSystem system, System.String configPath, System.Configuration.Configuration parent) [0x00065] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/Configuration.cs:137
at System.Configuration.Configuration..ctor (System.Configuration.InternalConfigurationSystem system, System.String locationSubPath) [0x0005c] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/Configuration.cs:96
at System.Configuration.InternalConfigurationFactory.Create (System.Type typeConfigHost, System.Object[] hostInitConfigurationParams) [0x0000e] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/InternalConfigurationFactory.cs:41
at System.Configuration.ConfigurationManager.OpenExeConfigurationInternal (ConfigurationUserLevel userLevel, System.Reflection.Assembly calling_assembly, System.String exePath) [0x00102] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs:119
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00011] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/ClientConfigurationSystem.cs:49
--- End of inner exception stack trace ---
at System.Configuration.ClientConfigurationSystem.get_Configuration () [0x00025] in /private/tmp/source-mono-mac-4.2.0-branch/bockbuild-mono-4.2.0-branch/profiles/mono-mac-xamarin/build-root/mono-4.2.1/mcs/class/System.Configuration/System.Configuration/ClientConfiguratio

and here is the app.config:

<?xml version="1.0" encoding="utf-8"?>

<configuration>
<rethinkdb>
<clusters>
<cluster name="default">
<defaultLogger enabled="true" category="Warning"/>
<connectionPool enabled="true"/>
<networkErrorHandling enabled="true" />
<endpoints>
<endpoint address="localhost" port="28015"/>
</endpoints>
</cluster>
</clusters>
</rethinkdb>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.1.3.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="rethinkdb" type="RethinkDb.Configuration.RethinkDbClientSection, RethinkDb"/>
</configSections>
<system.data>
<DbProviderFactories>
<add name="NuoDB Data Provider" invariant="NuoDb.Data.Client" description=".NET Framework Data Provider for NuoDB" type="NuoDb.Data.Client.NuoDbProviderFactory, NuoDb.Data.Client"/>
</DbProviderFactories>
</system.data>
<entityFramework>
<defaultConnectionFactory type="NuoDb.Data.Client.EntityFramework6.NuoDbConnectionFactory, EntityFramework.NuoDb" />
<providers>
<provider invariantName="NuoDb.Data.Client" type="NuoDb.Data.Client.EntityFramework6.NuoDbProviderServices, EntityFramework.NuoDb" />
</providers>
</entityFramework>
<connectionStrings>
<add name="trivia" providerName="NuoDb.Data.Client" connectionString="Server=localhost;Database=triviakings;User=sa;Password=hendrix3;Schema=triviakings" />
</connectionStrings>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.1.3.0" newVersion="6.1.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Mathieu Fenniak
@mfenniak
Dec 08 2015 02:08
Hm... It all looks fine to me. I'd suggest trying to build the rethinkdb-net connection factory manually without config, following roughly the approach that https://github.com/mfenniak/rethinkdb-net/blob/master/rethinkdb-net/Configuration/ConfigurationAssembler.cs uses. I think if you did that by hand you might uncover if the config problem is hiding something else going wrong, like a bad assembly reference.
Not sure what the issue would be if nothing pops up trying that approach. Maybe the next step would be creating a minimal reproduction case, and file a github issue
Troy
@bbqchickenrobot
Dec 08 2015 02:10
ok, cool
thx for the assistance
!
Mathieu Fenniak
@mfenniak
Dec 08 2015 02:11
No problem, wish I had a more direct answer for you!
Troy
@bbqchickenrobot
Dec 08 2015 02:33
configuring through code worked... maybe som'n else in the config file...
will investigate bu tits working for now :)