This is a migrated thread and some comments may be shown as answers.

ObjectProvider Error

15 Answers 162 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tajes
Top achievements
Rank 1
Tajes asked on 13 May 2010, 11:32 AM
I still couldn't try OpenAccess ORM because I get an error when I try to insert a ObjectProvider in a WinForm. Always the same error:
      " Failed to create component 'ObjectProvider'. The error message follows:
        'System.Runtime.Serialization.SerializationException: Type
       'Telerik.OpenAccess.Sdk.Addin.Model.VAProject' in Assembly
       'Telerik.OpenAccess.SDK.AddIn, Version=2010.1.312.2, Culture=neutral,
       PublicKeyToken=7ce17eeaf1d59342' is not marked as serielizable.

I'm using MySql database and I've followed step by step the OpenAccess-MadeEasy.pdf instructions.
I'm also using visual studio 2010 RC and the Trial Telerik's ORM.

I don't what to do else.
Can somebody help me?
Is there another way to use the objectProvider without using the visual form editor?
thanks.

15 Answers, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 14 May 2010, 04:40 PM
Hi Iván Tajes,

This looks like an installation problem. You can try installing the latest internal build (version 2010.1.414.3) which can be downloaded from here. Please before installing the new version, make sure that the previous one is completely uninstalled, sometimes it can happen that two installations are mixed.
Hope that helps.

Regards,
Damyan Bogoev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Tajes
Top achievements
Rank 1
answered on 18 May 2010, 08:36 AM
Hi Damyan Bogoev,
      OK, It don't throw the error now but the ObjectProvider's wizard don't let me choose context provider nor persistant class to continue.
      I've enabled the two projects, one with the persistant class generated by reversing mapping, and the other with the form where I insert the object provider. I've rebuilt the solution. What can I do?
Thanks for your time.
0
Damyan Bogoev
Telerik team
answered on 19 May 2010, 07:42 AM
Hi Iván Tajes,

It seems you are close, maybe you are missing some small detail. Please make sure that:
- The Windows Forms project references the project containing the persistent classes;
- When enabling the Windows Forms project enable only the second checkbox (DAL) on page two of the wizard. This will create an object scope provider class which is required by the ObjectProvider wizard. If you have already enabled the project without checking this checkbox, you can re-run the wizard and enable the DAL option this time.
After you rebuild the solution, the ObjectProvider should be able to see the object scope provider.
Hope that helps.

Regards,
Damyan Bogoev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Tajes
Top achievements
Rank 1
answered on 19 May 2010, 08:29 AM
Hi Damyan Bogoev,
     It's all correct. I've one project with the persistent classes, this project is enabled with only the first checkbox (persistent classes), and I've a second project with the winforms, enabled with only the second checkbox (DAL), with a reference to the first project added and the object scope provider created. After rebuilt all projects I still have the same problem. I've repeat all the process a lot of times and I always get the same problem, the objectProvider don't let me choose the object scope provider nor persistent classes to continue.
    Is there any way to set these objectProvider's settings programatically?

Thanks for your time.
0
Accepted
Damyan Bogoev
Telerik team
answered on 19 May 2010, 04:34 PM
Hi Iván Tajes,

You could set the ObjectProvider settings programatically using the following approach:

this.objectProvider1 = new ObjectProvider(this.components);
this.objectProvider1.BaseType = typeof(DataLayer.Product);
this.objectProvider1.ObjectContextProviderTypeName = "TestApp.NorthwindOAProvider, TestApp";
this.objectProvider1.OQLStatement = "SELECT * FROM ProductExtent AS x";
  
  
this.objectView1 = new ObjectView(this.components);
this.objectView1.ObjectProvider = this.objectProvider1;
this.objectView1.Position = 0;
this.objectView1.RootType = typeof(DataLayer.Product);
  
this.dataGridView1.DataSource = this.objectView1;

Hope that helps.

All the best,
Damyan Bogoev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Tajes
Top achievements
Rank 1
answered on 20 May 2010, 12:09 AM
Thank you very much Damyan Bogoev,
    It works. Doing it programatically it works perfectly. I don't now why not with form designer.

greetings Damyan Bogoev.
0
Tajes
Top achievements
Rank 1
answered on 31 May 2010, 12:43 PM
I've tried again with the new release of WinForms and OpenAccessORM and I still get the same error. I've unistall all components, unistall visual studio 2010 and reinstall all again. Is there anybody with the same issue? or I'm the onlyone?
0
Damyan Bogoev
Telerik team
answered on 01 Jun 2010, 05:40 PM
Hi Iván Tajes,

Could you please check if the Telerik.OpenAccess.Windows assembly is present in the GAC of your development machine? If this is the case, please remove it from there.
In order to reproduce the false behavior we will have to ask you for some additional information:
  • What operating system you are using on this machine?
  • What version of Visual Studio you are using, maybe it is a localized one? You can check that from the Help | About Microsoft Visual Studio menu. Just click on the Copy Info button and send us this information.

We are looking forward to your response.

Greetings,

Damyan Bogoev

the Telerik team


Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Tajes
Top achievements
Rank 1
answered on 02 Jun 2010, 01:50 PM
Here is the information, I'm using Windows 7 ultimate and MySQL database:



Microsoft Visual Studio 2010
Versión 10.0.30319.1 RTMRel
Microsoft .NET Framework
Versión 4.0.30319 RTMRel

Versión instalada: Ultimate

Corrector ortográfico de Análisis de código de Microsoft Visual Studio 2010   01019-532-2002102-70470
Corrector ortográfico de Análisis de código de Microsoft Visual Studio 2010

Partes de International CorrectSpell™ spelling correction system © 1993 por Lernout & Hauspie Speech Products N.V. Reservados todos los derechos.

The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Versión electrónica bajo licencia de Lernout & Hauspie Speech Products N.V. Reservados todos los derechos.

Microsoft Office Developer Tools   01019-532-2002102-70470
Microsoft Office Developer Tools

Microsoft Visual Basic 2010   01019-532-2002102-70470
Microsoft Visual Basic 2010

Microsoft Visual C# 2010   01019-532-2002102-70470
Microsoft Visual C# 2010

Microsoft Visual Studio 2010 Architecture and Modeling Tools   01019-532-2002102-70470
Microsoft Visual Studio 2010 Architecture and Modeling Tools
    
UML® y Unified Modeling Language™ son marcas comerciales o marcas registradas de Object Management Group, Inc. en Estados Unidos y otros países.

Microsoft Visual Studio 2010 Team Explorer   01019-532-2002102-70470
Microsoft Visual Studio 2010 Team Explorer

Microsoft Visual Web Developer 2010   01019-532-2002102-70470
Microsoft Visual Web Developer 2010

Crystal Reports Templates for Microsoft Visual Studio 2010   
Crystal Reports Templates for Microsoft Visual Studio 2010

Microsoft Visual Studio 2010 SharePoint Developer Tools   10.0.30319
Microsoft Visual Studio 2010 SharePoint Developer Tools

Telerik OpenAccess ORM   2010.1.527.2
Telerik OpenAccess ORM Copyright (C) 1996-2010 Telerik; OpenAccess is the Object-Relational Mapping Tool for the Microsoft .NET Platform. www.telerik.com


PD:  the Telerik.OpenAccess.Windows assembly is not present in the GAC of my development machine
0
Damyan Bogoev
Telerik team
answered on 03 Jun 2010, 05:59 PM
Hello Iván Tajes,

I am going to setup a machine with your setup on our side to test the problem. Once we have more information regarding the problem we will contact you.

Regards,
Damyan Bogoev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Tajes
Top achievements
Rank 1
answered on 15 Jul 2010, 01:16 PM

Hello,

I still have the same problem with the new Q2'10 release. I don't know what to do. I have tried with differents versions of visual studio.

How can I add a datasource to a Form to manage the bindingSource of controls if I can't add the objectProvider? Must I do it only programatically? I have download the project examples but neither works.

Thanks for your time.
0
Tajes
Top achievements
Rank 1
answered on 15 Jul 2010, 01:42 PM
Help!
I also tried to add a dataform using right click menu in the project but It advise me "The project has no persistent class or is not compiled. Please compile it first to reflect the recent chages". And I have enabled the projects, the first only with persistant classes checkbox enabled, the second only with the DAL checkbox enabled and with the reference to the first project added. I did reverse mapping, update config references, rebuilt all projects, the persistent classes appear in my project but I still get the same error. I tried everything and I don't know what to do.

Thanks.
0
Tajes
Top achievements
Rank 1
answered on 16 Jul 2010, 07:48 AM
Hi, I have try the OpenAccess ORM in another machine creating two projects, one for datalayer enabled with persistent classes, and another enabled with DAL for the forms, and when I try to drop the objectProvider from toolbox to the form I get the same error,
System.Runtime.Serialization.SerializationException: The type 'Telerik.OpenAccess.Sdk.Model.VAProject' in assembly 'Telerik.OpenAccess.SDK.AddIn, Version=2010.2.714.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' is not marked as serielizable.

I really need to solve this!
Thanks
0
Accepted
Damyan Bogoev
Telerik team
answered on 16 Jul 2010, 10:21 AM
Hello Iván Tajes,

We have successfully reproduced the error on our side. The issue is already fixed and will be part of the next service pack of the product. In the meantime please use the approach previously mentioned in the thread.
We are sorry for the inconvenience caused, your Telerik points have been updated.

All the best,
Damyan Bogoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Tajes
Top achievements
Rank 1
answered on 16 Jul 2010, 12:05 PM
Thank you very much! I'm so glad that you have found the error. I'm waiting for the next service pack. Thanks for the points.
Tags
Getting Started
Asked by
Tajes
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Tajes
Top achievements
Rank 1
Share this question
or