-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: connector -net problem
PostPosted: Thu May 26, 2005 9:24 am 
I'm using mysql connector -net version 1.0.4 and i can't connect MySQL DB. i got the following message.

Code:
log4net:ERROR DOMConfigurator: ConfigureFromXML called with null 'element' parameter
Begin failed with SQL exception
Press any key to continue


How i m doing : i have install the connector and i added refernece to mysqldata.dll and i put local copie to true moreover i tried that with many version of connector (1.0.3 , 1.0.1) and i got the same problem.

Does any one have any suggestion ???

Regards.


Top
  
 
 Post subject:
PostPosted: Thu May 26, 2005 3:08 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
That first error is harmless, ignore it for now.
The second error actually comes from MySQL connector, so it works, but there is some problem. It's hard to say what the problem is, try to configure logging (see http://wiki.nhibernate.org/display/NH/Configuring+log4net+Logging), maybe you'll find something.


Top
 Profile  
 
 Post subject: continuing
PostPosted: Fri May 27, 2005 2:15 am 
Hello,

Thanks u for your reply, it could help to resolve the first problem, so i ve no more the following error message :

Code:
log4net:ERROR DOMConfigurator: ConfigureFromXML called with null 'element' parameter


But i still have the second problem, so no connection to database.

Code:
Begin failed with SQL exception


I just want to know which MySQL Connector is used generaly ?? because when i can connect the database using odbc but i get another problem.

regards


Top
  
 
 Post subject: NB
PostPosted: Fri May 27, 2005 2:23 am 
NB : I don't think that mysql connector is working because i get the same problem when i take it off (i delete the refernce).


Top
  
 
 Post subject:
PostPosted: Fri May 27, 2005 3:23 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
It doesn't depend on having a reference or not, NHibernate loads the provider dlls using LoadAssembly call or something like that, so as long as the connector dll is in the same directory as your application, NH will pick it up. Or you can have the connector in the GAC and that one gets picked up always.

By the way, look at this bug: http://bugs.mysql.com/bug.php?id=7528. Maybe it's related to your problem. Ensure you have at least version 1.0.3 of the connector.


Top
 Profile  
 
 Post subject: suite
PostPosted: Fri May 27, 2005 3:51 am 
Hello ,

I ve alredy been there!! and i effectively have 1.0.3. I ve droped connector.dll from the project folder ( No trace of the connector) and i got the same error message. Another thing i reput the connect and i stopped the database server and i got the same error message. And what i noticed is that the problem appear when i try to begin transaction

Code:
ITransaction transaction = session.BeginTransaction();


once i put it into comment the message disapear but it's impossible to work without transaction.

Has that given u any ideas ???

Thank u very much for the helps;

Regards


Top
  
 
 Post subject: suite
PostPosted: Fri May 27, 2005 4:59 am 
Now i could connect the database using the following code

Code:
string strConn = "Data Source=localhost;Database=nagiosstatic;User ID=ocs;Password=;";
            ByteFX.Data.MySqlClient.MySqlConnection oConn = new ByteFX.Data.MySqlClient.MySqlConnection(strConn);
            oConn.Open();


But when i try to insert an object into the database i get the followinf error message.

Code:
could not load object
[/code]


Top
  
 
 Post subject:
PostPosted: Fri May 27, 2005 6:51 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
It's hard to tell what the error is from the error message. It would be best if you could provide the stack trace and the inner exceptions.


Top
 Profile  
 
 Post subject: To Sergey and all users
PostPosted: Mon May 30, 2005 4:13 am 
Thanks u Sergey for your replies.

I finnaly found the problem and i resolve it. It was due to the value of CharSet in the configuration file and the program worked.
I think it will be interesting to add a topic about this variable in the documentation.I spent more than week trying to resolve the problem.

Regards


Top
  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.