+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Unable to Upgrade Database Schema

Unable to Upgrade Database Schema

11 posts, 0 answered
  1. Rushman
    Rushman avatar
    16 posts
    Registered:
    31 Dec 2008
    27 May 2011
    Link to this post
    Hello Everybody,

    I am having some issues with a module that I am writing and basing off of the SDK Product module.  I have basically copied everything from the products module and changed what I needed to change to get the requirements that I need for my module.  Mostly I changed back end create looks and added several fields.

    When I try running the application I am getting an error in the manager file (GetManager(string providerName)) and the Message is:

    Unable to upgrade database schema metadataSource provided by 'Promos.Data.Implementation.OpenAccessProvider': Failed to create relational class of
    class 'Promos.Model.PromoItem'.

    the InnerException is:

    {"Failed to create relational class of class 'Promos.Model.PromoItem'."}

    and the InnerException of the InnerException is:

    {"Input string was not in a correct format."}

    Does anyone have any ideas why this might be happening?

    Thanks,
    Tim
  2. Nikolay Datchev
    Nikolay Datchev avatar
    87 posts
    Registered:
    01 Nov 2016
    02 Jun 2011
    Link to this post
    Hello Rushman,

    Is it possible that you have omitted to provide fluent mapping for the PromoItem class. It will be easier to investigate if you attach your project and so we can take a closer look.

    Kind regards,
    Nikolay Datchev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Rushman
    Rushman avatar
    16 posts
    Registered:
    31 Dec 2008
    06 Jun 2011
    Link to this post
    Hey Nikolay,

    Thank you for your response.  After many issues with creating a module, I decided to try creating a module in a different way.  I am following Josh Morales' series on creating a basic page based module and have a semi working module.  I have another forum post that asks a question about my current issue.

    I have been beating my head against the wall with this module configuration and I am trying everything that I can to get it working.

    Thank you,

    Tim
  4. Nikolay Datchev
    Nikolay Datchev avatar
    87 posts
    Registered:
    01 Nov 2016
    10 Jun 2011
    Link to this post
    Hi Rushman,

    It seems Ivan Dimitrov  from support has given you a hint on this forum post - did it work for you.

    Regards,
    Nikolay Datchev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Rushman
    Rushman avatar
    16 posts
    Registered:
    31 Dec 2008
    10 Jun 2011
    Link to this post
    Hey Nikolay,

    Thank you for your reply.  What forum post are you talking about? And I would love to know how I can attach my solution to a post (as was requested in your first post).  All I can attach to a forum post is an image (or images) that totals less than 2 MB.

    As for Ivan's post, I have not tried that yet (other work got in my way) but in the mean time I have actually gone a different way and I am using a standard ASP.Net ListView to do my listing/editing/deleting and inserting.  And that is working fine.  I will try Ivan's suggestion on the next module that I need to create (probably next week) and reply to his post with the results.

    Thank you for responding.

    Tim
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    16 Jun 2011
    Link to this post
    Hello,

    Since the website you have is quite large you can set an FTP that we can use to download the project or provide an external link from where we can download it. Then you can send the details using our support system. Just to let you know that the support system allows attachments up to 20 MB.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Lewis
    Lewis avatar
    4 posts
    Registered:
    30 Apr 2011
    01 Sep 2011
    Link to this post
    Was this ever resolved? I am recieving this error as well.

    Also, I am sick to death of always having to email my solution to you guys to figure issues out, how about some more useful error messages?
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Sep 2011
    Link to this post
    Hi Lewis,

    In cases when you use a custom implementations like this one in the initial post(Failed to create relational class of class 'Promos.Model.PromoItem'.)
    It would be hard to tell you what is wrong with your code and why you get error related to the data provider responsible to persist data for a custom objects without having the project locally.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  9. Scott
    Scott avatar
    3 posts
    Registered:
    29 Dec 2011
    22 Mar 2012
    Link to this post
    EDIT: Duplicate post, see below....
  10. Scott
    Scott avatar
    3 posts
    Registered:
    29 Dec 2011
    22 Mar 2012
    Link to this post
    I am having an identical issue in my code. Interestingly enough I am also implementing a custom module for promos with a "PromoItem". I had everything working perfectly, until I tried to add another content type/item (PromoBundleItem) to the same module (and project in visual studio). I created duplicate classes and files for this new content item (PromoBundle) except for the "Data\PromosDataProvider" class/file, "Data\Implementation\OpenAccessDataProvider" and FluentMetadataSource as I received some cryptic error from Sitefinity about me declaring something like "ContentLinks" metadata twice. I also only have one Config file (Configuration\PromoConfig.cs)... I also modified by PromoModule.cs file to include the adding of new pages etc. for my new PromoBundle Content Item.

    I don't see anywhere where I didn't implement the fluent stuff like Ivan suggested for another user so I am at a loss. I can paste some code, if desired but not sure if it is overkill to paste everything or just code chunks of importance. Let me know what code would be desireable to see and I will post it. Thanks for any help!!!

    Can anyone help me with this?

    EDIT: For some reason it seems my code is accessing the constructor of my "PromoManager" instead of the constructor of my "PromoBundleManager" class and has a blank value for provider name. Shortly after that it crashes. If I dig into the inner exceptions it is the same error about being Unable to upgrade.... I feel like somehow my PromoBundle Item installation stuff is using PromoManager vs. PromoBundleManager but cannot seem to locate where this would be happening...

    EDIT #2: I had this declared in my install code (PromoModule.cs):        
    private static readonly Type[] ManagerTypes = new[] { typeof(PromosManager), typeof(PromoBundlesManager) };

    If I remove the first entry "PromosManager" to try and install my PromoBundle stuff it does use PromoBundleManager.cs instead of PromoManager.cs but the exact same error is thrown...

    EDIT #3: Should I have a service for each content item or just one for both? What classes/files can be duplicated and what one cannot? Answers to these questions would be helpful. Thanks!
  11. Devin
    Devin avatar
    1 posts
    Registered:
    17 Dec 2014
    07 Jun in reply to Lewis
    Link to this post
    Errors that are actually descriptive would be nice - as would accurate documentation. We are looking at a free\opensouce product that is very similar to Sitefinity - so far it is faster, easier to manage, and even though there is no official support, the community is faster at responding with useful information even faster than Sitefinity paid support. May just start porting this over since i have had ZERO luck with the support that was actually paid for.
11 posts, 0 answered