Reverse Engineering wizard can't find it's own files.

11 posts, 0 answers
  1. Bill
    Bill avatar
    85 posts
    Member since:
    Oct 2007

    Posted 23 Sep 2009 Link to this post

    I'm running the reverse engineering wizard to go from an Oracle 10g db to classes.
    Everything is going fine now up until I try to generate the sources - then I get :


    Could not find file 'C:\Users\wblevins\AppData\Local\Temp\RefEmailtype.Telerik.OpenAccess.cs'

    Please try again after fixing the problem.

    In the "Generate Sources" window.

    It is saving everything in the reversemapping.config file

    RefEmailtype is one of the oracle tables I'm trying to map...

  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 25 Sep 2009 Link to this post

    Hi Bill,

    Unfortunately, we were not able to reproduce this behavior. The problem seems to be that the code generator cannot create the source files in the temporary directory. You can try restarting Visual Studio. If this does not help, please create another test project and see if the same thing happens or the problem is only in the current project.

    Regards,
    Alexander
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Bill
    Bill avatar
    85 posts
    Member since:
    Oct 2007

    Posted 25 Sep 2009 Link to this post

    It's happening on any project I create.  I've even tried running Studio 2008 under the Administrator account/credentials/

    Does OA need the temp directory to be in a specific place?

    The temp dir on this (vista ultimate os) machine is C:\temp

    Bill

  5. Bill
    Bill avatar
    85 posts
    Member since:
    Oct 2007

    Posted 28 Sep 2009 Link to this post

    I decided to back up and take a look at your example - but I can't seem to get it running either...


    Unable to cast object of type 'Factory' to type 'OpenAccessRuntime.Relational.RelationalKeyGeneratorFactory'.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.InvalidCastException: Unable to cast object of type 'Factory' to type 'OpenAccessRuntime.Relational.RelationalKeyGeneratorFactory'.

    Source Error:

    Line 116:			Database db = Database();
    Line 117:
    Line 118: IObjectScope newScope = db.GetObjectScope();Line 119:			return newScope;
    Line 120:		}

    Source File: C:\OA_Telerik_Ajax\OpenAccessSimpleApplication\OpenAccessSimpleApplication.WebSite\ObjectScopeProvider1.cs    Line: 118

    Stack Trace:

    [InvalidCastException: Unable to cast object of type 'Factory' to type 'OpenAccessRuntime.Relational.RelationalKeyGeneratorFactory'.]
       OpenAccessRuntime.Relational.RelationalKeyGeneratorFactoryRegistry.getFactory(String name) +265
    
    [OpenAccessException: Unable to create RelationalKeyGeneratorFactory instance OpenAccessRuntime.Relational.sql.HighLowRelationalKeyGenerator+Factory]
       Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e) +28
       Telerik.OpenAccess.RT.ExceptionWrapper.Throw() +34
       OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createSmfForURL() +408
       OpenAccessRuntime.storagemanager.StorageManagerFactoryBuilder.createStorageManagerFactory() +474
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.createStorageManagerFactory() +446
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryBase.init() +562
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.init() +101
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp..ctor(IDictionary properties, Object classloader) +542
       OpenAccessRuntime.DataObjects.PersistenceManagerFactoryImp.getPersistenceManagerFactory(IDictionary props) +49
       OpenAccessRuntime.DataObjects.BootstrapPMF.getPersistenceManagerFactory(IDictionary props) +242
       Telerik.OpenAccess.RT.Helper.getPersistenceManagerFactory(IDictionary props) +883
       Telerik.OpenAccess.RT.DatabaseAdapter.AssertPersistenceManagerFactory(String usr, String password, Boolean open) +1772
       Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope(TransactionProvider provider) +70
       Telerik.OpenAccess.RT.DatabaseAdapter.GetObjectScope() +37
       Telerik.OpenAccess.Database.GetObjectScope() +34
       OpenAccessSimpleApplication.WebSite.ObjectScopeProvider1.GetNewObjectScope() in C:\OA_Telerik_Ajax\OpenAccessSimpleApplication\OpenAccessSimpleApplication.WebSite\ObjectScopeProvider1.cs:118
    
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
       System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +19
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ConstructContext() +892
    
    [InvalidOperationException: No constructor for the strongly-typed IObjectScope takes 0 parameters.]
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ConstructContext() +1014
       Telerik.OpenAccess.RT.DataSource.OpenAccessDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +126
       System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +19
       System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
       Telerik.Web.UI.GridTableView.PerformSelect() +28
       System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
       Telerik.Web.UI.GridTableView.DataBind() +365
       Telerik.Web.UI.RadGrid.DataBind() +165
       System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
       System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +72
       System.Web.UI.Control.EnsureChildControls() +87
       Telerik.Web.UI.GridBaseDataList.get_Controls() +33
       Telerik.Web.UI.RadAjaxControl.PopulatePlainPanels(Control parent, List`1 list, Control root) +114
       Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1777
       System.EventHandler.Invoke(Object sender, EventArgs e) +0
       System.Web.UI.Control.OnPreRender(EventArgs e) +8682870
       System.Web.UI.Control.PreRenderRecursiveInternal() +80
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    
  6. Brendan Enrick
    Brendan Enrick avatar
    28 posts
    Member since:
    Jul 2009

    Posted 29 Sep 2009 Link to this post

    Hey Bill,

    Have you checked to see if you have any OpenAccess files in the "C:\Users\wblevins\AppData\Local\Temp\" folder?

    Brendan
  7. Bill
    Bill avatar
    85 posts
    Member since:
    Oct 2007

    Posted 29 Sep 2009 Link to this post

    There are other  'Telerik.OpenAccess.cs' files for the project I was trying to do there, but not 'RefEmailType'... 

    The only 'RefEmailType' file on the machine is at:

    c:\Users\wblevins\Documents\Visual Studio 2008\Projects\WebSiteTest\OAlib\Refemailtype.Telerik.OpenAccess.cs

    When I tried moving it - the file was deleted from the temp directory and I got the error message again.


    I'm going to delete everything and start over again one more time.

  8. Ady
    Admin
    Ady avatar
    589 posts

    Posted 30 Sep 2009 Link to this post

    Hi Bill,

     Can you send us some more information about your setup - the kind of project on which you are running the Reverse mapping wizard, have you been able to successfully generate the sources for any other class before this?

    Can you try switching off partial classes generation via the Options dialog? This could help us in narrowing down the problem.

    All the best,
    Ady
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Chris Jansen
    Chris Jansen avatar
    7 posts
    Member since:
    Sep 2009

    Posted 08 Oct 2009 Link to this post


    For what it's worth, I was having the same issue. However, I deleted all of the entity classes that were created, deleted reversemapping.config and app.config, and re-enabled the project to use ORM. I then generated classes without generating partial classes, and it worked.

  10. Ady
    Admin
    Ady avatar
    589 posts

    Posted 13 Oct 2009 Link to this post

    Hi,

     @Chris - Thank you for the input Chris. There seems to be an intermittent problem while generating the designer class file (<classname>.Telerik.OpenAccess.cs/vb).

    We would like to try and determine the reason behind this.

    @Bill -
    Hi Bill..were you able to progress after removing all files and starting again? If you are still experiencing the error can you send us the information requested in my earlier reply and also your system information (OS,Visual Studio version etc) ? Thanks.

    Regards,
    Ady
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  11. Bill
    Bill avatar
    85 posts
    Member since:
    Oct 2007

    Posted 17 Nov 2009 Link to this post

    I've been off of this project for a while - just installed 2009 Q3 - I'll let you know if I have the same trouble.
  12. Ady
    Admin
    Ady avatar
    589 posts

    Posted 23 Nov 2009 Link to this post

    Hi Bill,

     Any news on this problem after installing the Q3 version? Feel free to share your experience with us which will help us continuously improve the product.

    Best wishes,
    Ady
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
DevCraft banner