Hi,

I am using IBatisNet.DataMapper-bin-1.6.1.

I create my application in Dot Net Framework 3.5 using Visual Studio 2008.
I used MySql Server 5.0 with MySQL Connector-Net  5.2
when I running my application following exception fired....

"Exception has been thrown by the target of an invocation."

--
-------------------------------------------------------------------------------------------
with Below Details..

System.Reflection.TargetInvocationException was unhandled
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
       at Samyak.Utilities.DelegateService.DataGateway.PerformOperation(Object BusinessObject)
       at Samyak.Framework.Controls.LoginUserControl.Login_Click(Object sender, RoutedEventArgs e)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.Controls.Button.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnAccessKey(AccessKeyEventArgs e)
       at System.Windows.Input.AccessKeyManager.ProcessKey(List`1 targets, String key, Boolean existsElsewhere, Boolean userInitiated)
       at System.Windows.Input.AccessKeyManager.ProcessKeyForSender(Object sender, String key, Boolean existsElsewhere, Boolean userInitiated)
       at System.Windows.Input.AccessKeyManager.OnKeyDown(KeyEventArgs e)
       at System.Windows.Input.AccessKeyManager.PostProcessInput(Object sender, ProcessInputEventArgs e)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
       at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
       at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
       at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
       at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
       at System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)
       at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.Run()
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at System.Windows.Application.Run()
       at Samyak.CMS.App.Main() in E:\DOTNET_APP_Framwork\CorrogationManagementSystem\Source\CorrogationManagementSystem\CorrogationManagementSystem\obj\Debug\App.g.cs:line 0
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: IBatisNet.Common.Exceptions.ConfigurationException
       Message="\r\n- The error occurred while loading Providers.\r\n- initialize provider  \r\n- Check the MySql."
       Source="IBatisNet.DataMapper"

       StackTrace:
            at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao)
            at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, Boolean useConfigFileWatcher)
            at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String resource, ConfigureHandler configureDelegate)
            at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(ConfigureHandler configureDelegate)
            at IBatisNet.DataMapper.Mapper.InitMapper()
            at IBatisNet.DataMapper.Mapper.Instance()
            at Samyak.Utilities.DataAccess.CommonDataAccess.SelectDataForQueryList(Object _BusinessBase)
            at Samyak.Utilities.DataAccess.CommonDataAccess.PerformOperation(Object _BusinessBase)
            at Samyak.Utilities.Business.DBAuthentication.AuthenticateUser(UsersBusiness _UserBusiness)
            at Samyak.Utilities.Business.SecurityService.AuthenticateUser(UsersBusiness _UserBusiness)
       InnerException: IBatisNet.Common.Exceptions.ConfigurationException
            Message="Could not configure providers. Unable to load provider named \"MySql\" not found, failed. Cause: Could not load file or assembly 'MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified."

            Source="IBatisNet.Common"
            StackTrace:
                 at IBatisNet.Common.DbProvider.Initialize()
                 at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.GetProviders()
                 at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize()
                 at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao)
            InnerException: System.IO.FileNotFoundException
                 Message="Could not load file or assembly 'MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified."
                 Source="mscorlib"
                 FileName="MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d"

                 FusionLog="=== Pre-bind state information ===\r\nLOG: User = SAMYAK\\pgandhi\r\nLOG: DisplayName = MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d\n (Fully-specified)\r\nLOG: Appbase = file:///E:/DOTNET_APP_Framwork/CorrogationManagementSystem/Source/CorrogationManagementSystem/CorrogationManagementSystem/bin/Debug/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : IBatisNet.Common, Version=1.6.1.0, Culture=neutral, PublicKeyToken=ed781d9fc396c6ca.\r\n===\r\nLOG: This bind starts in default load context.\r\nLOG: No application configuration file found.\r\nLOG: Using machine configuration file from C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\config\\machine.config.\r\nLOG: Post-policy reference: MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d\r\nLOG: Attempting download of new URL file:///E:/DOTNET_APP_Framwork/CorrogationManagementSystem/Source/CorrogationManagementSystem/CorrogationManagementSystem/bin/Debug/MySql.Data.DLL.\r\nLOG: Attempting download of new URL file:///E:/DOTNET_APP_Framwork/CorrogationManagementSystem/Source/CorrogationManagementSystem/CorrogationManagementSystem/bin/Debug/MySql.Data/MySql.Data.DLL.\r\nLOG: Attempting download of new URL file:///E:/DOTNET_APP_Framwork/CorrogationManagementSystem/Source/CorrogationManagementSystem/CorrogationManagementSystem/bin/Debug/MySql.Data.EXE.\r\nLOG: Attempting download of new URL file:///E:/DOTNET_APP_Framwork/CorrogationManagementSystem/Source/CorrogationManagementSystem/CorrogationManagementSystem/bin/Debug/MySql.Data/MySql.Data.EXE.\r\n"
                 StackTrace:
                      at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
                      at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
                      at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
                      at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
                      at System.Reflection.Assembly.Load(String assemblyString)
                      at IBatisNet.Common.DbProvider.Initialize()
                 InnerException:

--------------------------------------------------------------------------------------------------------------

Please help me regarding this ASAP.....

Thanks & Regards,
-- 
- Parth Gandhi
Samyak Infotech Pvt. Ltd.
905-908, Abhijeet, Mithakhali Six Roads,
Ellisbridge, Ahmedabad - 380006
Gujarat, India
Phone: +91-79-26465758
Fax: +91-79-2646 6804
Email: [EMAIL PROTECTED]



Reply via email to