Page 1 of 1

OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 9:42 am
by wjstarck
Hello and happy new year-

OD 18.4 beta is throwing the following error when I try to run:

Code: Select all

Exception thrown: 'System.MissingMethodException' in OpenDentBusiness.dll
The thread 0x4bac has exited with code 0 (0x0).
Exception thrown: 'System.MissingMethodException' in OpenDentBusiness.dll
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>OpenDental.exe</AppDomain><Exception><ExceptionType>System.MissingMethodException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Method not found: 'Int64 DataConnectionBase.DataConnection.NonQ(System.String, Boolean, System.String, System.String, Boolean, MySql.Data.MySqlClient.MySqlParameter[])'.</Message><StackTrace>   at OpenDentBusiness.Db.ExecuteQueryFunc[T](Func`1 f) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Db\Db.cs:line 454
   at OpenDentBusiness.Db.NonQ(String command, Boolean getInsertID, String columnNamePK, String tableName, OdSqlParameter[] parameters) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Db\Db.cs:line 320
   at OpenDentBusiness.Crud.SecurityLogCrud.Insert(SecurityLog securityLog, Boolean useExistingPK) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Crud\SecurityLogCrud.cs:line 141
   at OpenDentBusiness.Crud.SecurityLogCrud.Insert(SecurityLog securityLog) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Crud\SecurityLogCrud.cs:line 105
   at OpenDentBusiness.SecurityLogs.Insert(SecurityLog log) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 146
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(SecurityLog secLog) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 262
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(Permissions permType, Int64 patNum, String logText, Int64 fKey, LogSources logSource, Int64 defNum, Int64 defNumError, DateTime DateTPrevious) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 253
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(Permissions permType, Int64 patNum, String logText, Int64 fKey, LogSources logSource, DateTime DateTPrevious) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 244
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(Permissions permType, Int64 patNum, String logText) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 227
   at OpenDental.FormOpenDental.LogOnOpenDentalUser(String odUser, String odPassword) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDental\Main Modules\FormOpenDental.cs:line 8458
   at OpenDental.FormOpenDental.FormOpenDental_Load(Object sender, EventArgs e) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDental\Main Modules\FormOpenDental.cs:line 2758
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message&amp; m)
   at System.Windows.Forms.Control.WndProc(Message&amp; m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
   at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
   at System.Windows.Forms.Form.WndProc(Message&amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam)
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Control.set_Visible(Boolean value)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at OpenDental.ProgramEntry.Main(String[] args) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDental\Main Modules\ProgramEntry.cs:line 79</StackTrace><ExceptionString>System.MissingMethodException: Method not found: 'Int64 DataConnectionBase.DataConnection.NonQ(System.String, Boolean, System.String, System.String, Boolean, MySql.Data.MySqlClient.MySqlParameter[])'.
   at OpenDentBusiness.Db.ExecuteQueryFunc[T](Func`1 f) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Db\Db.cs:line 454
   at OpenDentBusiness.Db.NonQ(String command, Boolean getInsertID, String columnNamePK, String tableName, OdSqlParameter[] parameters) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Db\Db.cs:line 320
   at OpenDentBusiness.Crud.SecurityLogCrud.Insert(SecurityLog securityLog, Boolean useExistingPK) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Crud\SecurityLogCrud.cs:line 141
   at OpenDentBusiness.Crud.SecurityLogCrud.Insert(SecurityLog securityLog) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Crud\SecurityLogCrud.cs:line 105
   at OpenDentBusiness.SecurityLogs.Insert(SecurityLog log) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 146
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(SecurityLog secLog) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 262
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(Permissions permType, Int64 patNum, String logText, Int64 fKey, LogSources logSource, Int64 defNum, Int64 defNumError, DateTime DateTPrevious) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 253
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(Permissions permType, Int64 patNum, String logText, Int64 fKey, LogSources logSource, DateTime DateTPrevious) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 244
   at OpenDentBusiness.SecurityLogs.MakeLogEntry(Permissions permType, Int64 patNum, String logText) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDentBusiness\Data Interface\SecurityLogs.cs:line 227
   at OpenDental.FormOpenDental.LogOnOpenDentalUser(String odUser, String odPassword) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDental\Main Modules\FormOpenDental.cs:line 8458
   at OpenDental.FormOpenDental.FormOpenDental_Load(Object sender, EventArgs e) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDental\Main Modules\FormOpenDental.cs:line 2758
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message&amp; m)
   at System.Windows.Forms.Control.WndProc(Message&amp; m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message&amp; m)
   at System.Windows.Forms.Form.WmShowWindow(Message&amp; m)
   at System.Windows.Forms.Form.WndProc(Message&amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Int32 lParam)
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at System.Windows.Forms.Control.set_Visible(Boolean value)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at OpenDental.ProgramEntry.Main(String[] args) in C:\Users\wjs\Desktop\ODVersions\opendental18.4\opendental18.4\OpenDental\Main Modules\ProgramEntry.cs:line 79</ExceptionString></Exception></TraceRecord>
An unhandled exception of type 'System.MissingMethodException' occurred in OpenDentBusiness.dll
Method not found: 'Int64 DataConnectionBase.DataConnection.NonQ(System.String, Boolean, System.String, System.String, Boolean, MySql.Data.MySqlClient.MySqlParameter[])'.
Have I missed something obvious?

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 11:48 am
by wjstarck
Looks like it is trying to do

Code: Select all

UPDATE preference SET ValueString = '1' WHERE prefname = 'CorruptedDatabase'
	
Here:

Code: Select all

		///<summary>This query is run with full privileges.  This is for commands generated by the main program, and the user will not have access for injection attacks.  Result is usually number of rows changed, or can be insert id if requested.</summary>
		internal static long NonQ(string command,params OdSqlParameter[] parameters) {
			return NonQ(command,false,parameters);
		}
When I get the error.

Those are lines 335-338 of Db.cs

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 12:28 pm
by jsalmon
Your solution is acting like it doesn't have the "xDataConnectionBase" project... That or it can't access it for whatever reason. Double check that you have that project and that it can compile.
DataConnectionBase.DataConnection.NonQ(System.String, Boolean, System.String, System.String, Boolean, MySql.Data.MySqlClient.MySqlParameter[])'.

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 1:24 pm
by wjstarck
Jason-

Just redownloaded and recompiled 18.4b. No compilation errors. Tried to run on newly downloaded trial db. Same error.

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 1:34 pm
by teethdood
Update your MySQL connector to 8.0.11 and recompile. I posted a thread on it recently

https://downloads.mysql.com/archives/c-net/

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 1:49 pm
by wjstarck
Thanks.

I caught one of the compiler warnings which was complaining that the MySQLData.dll version in the GAC was older than the one in the project, so I replaced it with the newer version and it now it works fine. Do I still need to update the connector?

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 1:59 pm
by jsalmon
There must be something hard-coded to our directory setup because it works fine for me until I create a brand new checkout in a strange location. I'll see if I can't find where the path assumption is being made instead of using a relative path.

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 2:18 pm
by jsalmon
You don't need to have any MySQL connector installed (at least I don't have any installed) but it doesn't hurt if you do. I found where we had too much specificity in our reference to the MySql.Data.dll and fixed it (revision 21616).

Re: OD 18.4 beta runtime error

Posted: Wed Jan 02, 2019 2:42 pm
by wjstarck
Cool thx 8)