Menu

'Expected assignment operator' exception

Help
MMx
2009-11-26
2013-04-22
  • MMx

    MMx - 2009-11-26

    When i try to open this (http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-config-example.html) linked from the manual section 4.1:

    # my.cnf
    # example additions to my.cnf for MySQL Cluster
    # (valid in MySQL 5.0)

    # enable ndbcluster storage engine, and provide connectstring for
    # management server host (default port is 1186)

    ndbcluster
    ndb-connectstring=ndb_mgmd.mysql.com

    # provide connectstring for management server host (default port: 1186)

    connect-string=ndb_mgmd.mysql.com

    # provide connectstring for management server host (default port: 1186)

    connect-string=ndb_mgmd.mysql.com

    # provide location of cluster configuration file

    config-file=/etc/config.ini

    with the following code:

        IniConfigSource hhp = new IniConfigSource(args);

    I get this exception:

    Unhandled Exception: Nini.Ini.IniException: Expected assignment operator (=) - Line: 1, Position: 10.
       at Nini.Ini.IniDocument.LoadReader(IniReader reader) in D:\work\nini\Ini\IniDocument.cs:line 230
       at Nini.Ini.IniDocument.Load(IniReader reader) in D:\work\nini\Ini\IniDocument.cs:line 131
       at Nini.Ini.IniDocument.Load(TextReader reader) in D:\work\nini\Ini\IniDocument.cs:line 119
       at Nini.Ini.IniDocument..ctor(TextReader reader) in D:\work\nini\Ini\IniDocument.cs:line 72
       at Nini.Config.IniConfigSource.Load(TextReader reader) in D:\work\nini\Config\IniConfigSource.cs:line 88
       at Nini.Config.IniConfigSource.Load(String filePath) in D:\work\nini\Config\IniConfigSource.cs:line 81
       at Nini.Config.IniConfigSource..ctor(String filePath) in D:\work\nini\Config\IniConfigSource.cs:line 40
       at chmEmbedTOC.Program.Main(String args) in d:\work\chmEmbedTOC\Program.cs:line 23

    Nini version is 1.1.0, .NET framework 2.0.
    Am I missing something? Any help would be appreciated.

     
  • mark beaumont

    mark beaumont - 2010-09-08

    Did you ever solve this?  If so, PLEASE post the fix - I am at the crucial stage where I thought fantastic, this add-in looks like this is what I was trying to code..  I am about to give up and re-invent the wheel.

     
  • MMx

    MMx - 2010-09-08

    If I remember correctly, the exception was about the missing = after

    [mysqld]
    ndbcluster
    

    Looks like Nini requires = in every line that's not section start. All I needed was to parse ini files in a pretty specific format and to extract only little information, so I went with wcscmp and wcsstr.

     
  • mark beaumont

    mark beaumont - 2010-09-08

    !!!!!!!   WOW   !!!!!!!
    #1 : the speed of your response - MANY THANKS!
    #2 : Nini can't handle a missing '=' a little better..

    Many, many thanks for your help!
    M.
    (btw.  you remembered correctly)

     
  • MMx

    MMx - 2010-09-08

    #1: A wise man said, you can do any amount of work provided it's not what you're supposed to be doing at the moment ;-)

     

Log in to post a comment.