Error in Jobs Intermediate Module - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Error in Jobs Intermediate Module

  • Error in Jobs Intermediate Module
  • Hey folks,

    I have a need on a project to manage some specific data with a CRUD approach, so for instance let's say that data had to do with promotions which include various text fields, images, etc.  I went through the Jobs sample included in the final release documentation and found it a bit lacking.  I took a look at the Products module and found it too much.  So I'm trying to register Jobs Intermediate as a module to see what it has inside it.

    I tossed the files, as they existed, into my project.  I changed the database config to match my SQLEXPRESS info.

    First error caused me to have to change the template names in both Public Control files from Jobs. to JobsIntermediate. to match the project namespace.

    Second error caused me to have to have to add [assembly: AssemblyVersion("1.0.*")] into the assemblyinfo.cs instead of the existing [assembly: AssemblyVersion("1.0.0.0")].

    I should also note that though this module is registered in SystemConfig, it did not show up automatically in ToolboxesConfig.

    What I'm getting now is the following error:

    No class found for extent "extnt".
    Original Query: DEFINE EXTENT extnt FOR JobsIntermediate.Model.JobApplication; SELECT * FROM extnt AS t1  WHERE t1.appName =  $1

    And I've hit a dead end.

    So two questions.  Firstly, can you help me debug this further so that I can take a look at it in my application?

    Secondly, is there some example of a module that simply does CRUD features for an admin on some custom data?

    Thanks much.

    - William
  • Can anyone point me to why this might be happening?

    So far, I've tried to register and get working all three of the sample projects into mine.  To date, Jobs is the only one that has worked.  JobsIntermediate failed as shown in this post.  Products is simply not registering at all, but that'll be another forum post.  I'm a bit frustrated.

    As a side note, as a developer of a licensed Sitefinity Professional product for a client, do I have access to any official support in the form of a ticketing system?  I'd love to move some of these items into somewhere that I can get fast support as we move forward.

    Thanks.  You guys have solved 100 percent of my problems so far.  I'm hoping to get these modules resolved as quickly too.

    - William
  • Hi William,

    It seems that you are trying to perform a query and your property is not added to the persisted fields. Can you please make sure that your custom module has a reverence to the VEnhance.exe file and that you have marked field aliases for your properties, e.g.:
    /// <summary>
    /// Gets or sets the phone.
    /// </summary>
    /// <value>The phone.</value>
    [FieldAlias("phone")]
    public string Phone
        get
        
            return this.phone;
        
        set
        
            this.phone = value;
        
    ...
    private string phone;


    All the best,
    Radoslav Georgiev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  • Hi Radoslav,

    Actually, I didn't write the module at all.  This is the Jobs Intermediate module that is included in your samples, shipped with the final release.  So the code references those properties the way you wrote it.

    I'm not sure what the VEnhance.exe file is.  Can you explain more?

    All I really did was copy the files into my project, compile and try to run them.

    - William
  • Hi William,

    The VEnhance.exe file is an executable for OpenAccess which enables the ORM to handle your persistent classes. You can find more information here.

    Greetings,
    Radoslav Georgiev
    the Telerik team
  • I have tried also to install the Jobs-Intermediate, and no luck so far. Corrected the VEnhance Path on the project file, changed a bunch of stuff and nothing. I'm completely lost as to what would it take to get this one example running. The sample is the one that came with the Sitefinity installation and is under
    C:\Program Files\telerik\Sitefinity 4.0\Samples\CS\

    Help? :-S

    Regards

    System.Reflection.TargetInvocationException was unhandled by user code
      Message=Exception has been thrown by the target of an invocation.
      Source=mscorlib
      StackTrace:
           at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
           at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
           at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
           at System.Activator.CreateInstance[T]()
           at Telerik.Sitefinity.Data.ManagerBase`1.GetManager[T](String providerName, String transactionName)
           at Telerik.Sitefinity.Data.ManagerBase`1.GetManager[T](String providerName)
           at JobsIntermediate.JobsManager.GetManager(String providerName) in C:\Program Files\telerik\Sitefinity 4.0\Samples\CS\Jobs Intermediate\JobsManager.cs:line 96
      InnerException: Telerik.OpenAccess.Exceptions.MetadataException
           Message=Persistence-capable-superclass 'Telerik.Sitefinity.GenericContent.Model.Content' not declared in meta data. --> JobsIntermediate, Version=1.0.4067.16112, Culture=neutral, PublicKeyToken=null/namespace[JobsIntermediate.Model]/class[JobsIntermediate.Model.JobApplication]
           Source=Unity_ILEmit_DynamicClasses
           CanRetry=true
           ClassName=Telerik.Sitefinity.GenericContent.Model.Content
           Column=0
           Context=--> JobsIntermediate, Version=1.0.4067.16112, Culture=neutral, PublicKeyToken=null/namespace[JobsIntermediate.Model]/class[JobsIntermediate.Model.JobApplication]
           ErrorId=0
           IsWarning=false
           Line=0
           StackTrace:
                at DynamicModule.ns.Wrapped_OpenAccessJobsDataProvider_23663548744d4ed7876024fd86b3ab74.Initialize(String providerName, NameValueCollection config, Type managerType)
                at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager)
                at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager)
                at Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName)
                at Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName, String transactionName)
                at Telerik.Sitefinity.Data.ManagerBase`1..ctor(String providerName)
                at Telerik.Sitefinity.Modules.GenericContent.ContentManagerBase`1..ctor(String providerName)
                at JobsIntermediate.JobsManager..ctor(String providerName) in C:\Program Files\telerik\Sitefinity 4.0\Samples\CS\Jobs Intermediate\JobsManager.cs:line 29
                at JobsIntermediate.JobsManager..ctor() in C:\Program Files\telerik\Sitefinity 4.0\Samples\CS\Jobs Intermediate\JobsManager.cs:line 20
           InnerException:
  • Christian,

    Just so you know.  I've even reinstalled Sitefinity, gone the ticket route, and nothing.  It makes the custom modules unusable here.

    Now I can't even get Jobs, let alone Jobs Intermediate to embed.  I'm about to pull my hair out.

    - William
  • Just an add on to this thread.

    I've found that if you add the following into SystemConfig.config (modified for your module):

    <add title="JobsIntermediate" description="" resourceClassId="JobsResources" type="JobsIntermediate.JobsModule" startupType="OnApplicationStart" version="" name="JobsIntermediate" />

    I can add as many modules as I want.  Note that the version is left blank.  If I fill in a version there, I cannot register.  Leaving it blank, I can register fine.

    For stubborn cases, I've also had luck doing the above and then going into the configuration as described in the documentation (www.sitefinity.com/.../register-the-module.aspx).  JobsIntermediate (or whatever your module is called) is present.  Editing it and simply resaving it also seems to help in cases where registration is stuck.

    I'm hoping that helps get somebody else over that hurdle at least.

    - William

  • Hello William Cooper,

    You are absolutely right that such example on how to reinitialize your module is compulsory. We are currently reorganizing the Developers Manual to accommodate all the feedback we have received from customers, and this is absolutely something to be present.

    I have included your request in our documentation backlog and we will do our best to include it as soon as possible.

    Best wishes,
    Hristo Borisov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  • Hey William,

    I just went through this same issue and figured out a solution.  In your Sitefinity Web App project, add a reference to VEnhance.exe

    If you look in .../Program Files/Telerik/Sitefinity 4.0/Libraries you will find the executable.  You can copy this to the bin folder of your project if you want to keep it all together.

    This resolved this particular issue for me, and now I'm stuck on Resource localization.
  • I take it back - this error showed back up after I resolved the localization issue.
  • Hello Suzanne,

    Do you still have a problem? If the issue persists could you provide more information about the error and the steps you use to replicate the issue.

    Best wishes,
    Pavel
    the Telerik team
  • Yes, I'm still having this error.  Here's how I reproduce:

    1) Log into Sitefinity (after module is installed)
    2) Select Content->Jobs and the following error is displayed:

    No class found for extent "extnt".<br>Original Query: DEFINE EXTENT extnt FOR Job.Model.JobsModel; SELECT * FROM extnt AS t1  WHERE t1.appName =  $1<br>


    When I debug the code, it's failing in the JobsDataProvider class, on this line:

    var query = SitefinityQuery.Get<JobsModel>(this,MethodBase.GetCurrentMethod())<br>                                        .Where(b => b.ApplicationName == appName);
  • 262421_CompanyCRM.png


    Any help for Suzanne? I have the same issue (...extnt...) when I create my first module :(