The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

Last post 10-06-2008, 5:03 AM by Mike.Griffin. 9 replies.
Sort Posts: Previous Next
  •  08-02-2008, 7:32 PM 10533

    DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    EntitySpaces: Please help.

    MyGen is seeking more and more subfolders named Generated the more tables/views selected to process. If one or two tables are selected MyGen & EntitySpaces works, but when many are selected the process runs for a bit then errors looking for a Generated sub sub folder which does not exists. See the samples.

    Using MyGen 1.2.0.7; EntitySpaces 2008 Developer; VistaDB 3.4.1.63.
     
    I followed the instructions at http://community.entityspaces.net/forums/thread/9912.aspx from Mike Griffin at 06-23-2008, 8:40 AM to recompile the MyMeta.Plugins.VistaDB3x.dll and the EntitySpaces.MetadataEngine.VistaDB.dll.

    Is there a fix for this?

    Sample Error 1
    Could not find a part of the path 'C:\Program Files\MyGeneration\Templates\EntitySpaces 2008\C#\Generated\Generated\EntitySpaces_C#_Hierarchical.csgen'.

    Sample Error 2
    Could not find a part of the path 'C:\Program Files\MyGeneration\Templates\EntitySpaces 2008\C#\Generated\Generated\Generated\EntitySpaces_C#_Hierarchical.csgen'.

    Sample Error 3
    Could not find a part of the path 'C:\Program Files\MyGeneration\Templates\EntitySpaces 2008\C#\Generated\Generated\Generated\Generated\EntitySpaces_C#_Hierarchical.csgen'.

     Thanks for your help, Stan

  •  08-02-2008, 11:22 PM 10534 in reply to 10533

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    VistaDB 3.4.1.63 is a Dev Beta. We are still using the latest production version 3.3.1.57, but I do not see how the choice of database would cause the behavior you are describing.

    1. Are you executing the Generated Master from within MyGeneration?
    2. Are you getting errors for all templates, or just the Hierarchical template?
    3. Have you been able to successfully generate from multiple tables for one of the other supported databases?
    4. Are you using ZeusCmd.exe in a batch or build file?
    5. Is your output path or default template path specified using relative addressing?
    6. Are you using a MyGeneration Project with the paths hand edited to relative addressing?
    7. When you look in Windows Explorer, do you see the extra folders? For example:

    C:\Program Files\MyGeneration\Templates\EntitySpaces 2008\C#\Generated\Generated\

    One of our VistaDB test databases has 11 tables in it. I can run the Generated Master with the default settings from within MyGeneration, and all 11 tables selected, and it works as expected. I also have a project set up that runs all test tables for all supported databases, and it, too, works perfectly when it is executed from within MyGen 1.2.0.7.

    The Hierarchical template is run from within the Generated Master using relative addressing. It expects to find the file in the "Generated" folder below the template folder that contains the Generated Master.

    context.Execute(".\\Generated\\EntitySpaces_C#_Hierarchical.csgen", false);

    But, according to your examples, it seems something is recursively creating new "Generated" folders beneath the "EntitySpaces 2008\C#\Generated" template folder that was created during install, and then attempting to run the Hierarchical template, relatively, from within the new folder.

     


    David Neal Parsons
    www.entityspaces.net
  •  08-03-2008, 11:41 AM 10536 in reply to 10534

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    Hello,

    I just ran into the same problem here (MyGen 1.2.0.7; EntitySpaces 2008 Developer; VistaDB 3.4.1.63).

    To your questions:

    1. Yes
    2. I had the problem with the hierachical template then unchecked "Generate Hierarchical Model" and the problem occured with the query template.
    3. No but I am able to browse my VistaDB database's schema through the MyMeta Browser.
    4. Just doing the basic stuff in MyGeneration
    5. No
    6. Not a project
    7. No extra folder : C:\Program Files\MyGeneration\Templates\EntitySpaces 2008\VB\Generated\

    I need to generate those classes ASAP, so a fix or work around would really be appreciated. (I know, your customers always say that Stick out tongue)


    Thanks!

    - El pipo -
  •  08-03-2008, 4:52 PM 10538 in reply to 10534

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    Thank you, David Parsons. I took the easy way and just reverted to the VistaDB 3.3.1.57 stable build. MyGen is now working.

    • 1. Yes
    • 2. I'm uncertain of the question, but I always have "Generate Hierarchical Model" check within MyGen and only build the objects within MyGen.
    • 3. I'm only using VistaDB.
    • 4. I'm not familiar with ZeusCMD.exe and only use MyGen.
    • 5. I did not change the template path, but my output path is changed. I have always changed that, however.
    • 6. I'm not using a MyGen project and the output path is fixed.
    • 7. The extra folders did not exist when looking with Windows Explorer. I tried adding an extra level or two thinking there just may be a slight bug, but that only corrected to create a few extra objects before erring out because of the recursive issue...the process kept seeking sub folder after sub folder.

     Thanks again, Stan.

  •  08-03-2008, 6:35 PM 10539 in reply to 10538

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    Thanks guys for getting back to us so quickly. We are tying to get a maintenance release out by the 11th. But, if using the latest stable production release of VistaDB solves the problem, then that is our recommended solution. What might be going on in the beta database or connector that would affect code generation in that manner is a real mystery, and we would not have the time to debug a beta version between now and next weekend.

    VistaDB has been very responsive to our inquiries in the past, so, once we have the maintenance release out, we may try the new beta to see what is going on. But, at this point, it remains to be seen whether the issue is on our end.

    ElPipo, if generating against the beta is important to you, you might try opening the Generated Master in MyGeneration, and hand editing the lines that use a relative path, and see if that solves the issue for you. You would just replace the "." (dot) in each context.Execute line, and hard-code the full path to your template files. For example, delete the dot before \\Generated in the line below:

    Code:
    context.Execute(".\\Generated\\EntitySpaces_VB_esCollection.vbgen", false);

    and paste this in its place:

    Code:
    C:\\Program Files\\MyGeneration\\Templates\\EntitySpaces 2008\\VB

    David Neal Parsons
    www.entityspaces.net
  •  08-04-2008, 7:05 AM 10541 in reply to 10539

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    Hi,

     thanks for the tip, it worked really well regarding the DirectoryNotFoundException except that the classes aren't properly generated because of another exception:

    Exception type : InvalidCastException

    Source : DotNetScriptingEngine
    Method : Void EngineExecuteCode(Zeus.IZeusCodeSegment, Zeus.IZeusContext)
    Message : Unable to cast object of type 'System.Collections.DictionaryEntry' to type 'VistaDB.DDA.IVistaDBRelationshipInformation'.
    Stack Trace :     at Zeus.DotNetScript.DotNetScriptExecutioner.EngineExecuteCode(IZeusCodeSegment segment, IZeusContext context)
       at Zeus.ZeusExecutioner.ExecuteCode(IZeusExecutionHelper helper, IZeusTemplate template, IZeusContext context, ArrayList templateGroupIds)
       at Zeus.ZeusExecutioner.ExecuteCodeSegment(IZeusCodeSegment segment, IZeusContext context)
       at Zeus.ZeusCodeSegment.Execute(IZeusContext context)
       at Zeus.ZeusExecutioner.Execute(ZeusTemplate template, IZeusContext context, Int32 timeout, InputItemCollection collectedinput, ShowGUIEventHandler eventhandler, Boolean skipGui)


     In the generated file all seems to be ok except for the MustInherit Public Class esMyTableName, the Properties region is never closed and the End Class line is missing. It seems like it's because of the exception that all the hierarchical related properties are not generated.

    I can rollback to the previous vistadb stable build (build 57), but it would be a pitty because it seemed to work really well and much faster (meeting a client next week with a beta version of my app, therefore wishing to keep the performance). Hmmm, maybe I can simply install build 57 just to generate my classes and then go back to build 63?

     


    Thanks!

    - El pipo -
  •  08-04-2008, 4:09 PM 10547 in reply to 10541

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    I've just spent a lot of time "recoding"(using the connection.getSchema instead of using dda) the MetaDataEngine (EntitySpaces 2008\CodeGeneration\Bin) but apparently the problem still occurs. I'll try something more Hardcore tomorrow but if the problem persists, I'll rollback to build 57 (VistaDB) and the wait for the next ES maintenance release.

    Thanks!

    - El pipo -
  •  08-05-2008, 4:47 AM 10556 in reply to 10547

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    Rolling back to Build .57 Stick out tongue

    Thanks!

    - El pipo -
  •  10-05-2008, 3:31 AM 11781 in reply to 10556

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    The 'casting issue' definitely seems to be a VistaDB bug.

     Please take a look at : http://forums.vistadb.net/viewtopic.php?p=12937#12937 


    Thanks!

    - El pipo -
  •  10-06-2008, 5:03 AM 11786 in reply to 11781

    Re: DirectoryNotFoundException - MyGen seeking multiple levels of directories named Generated

    Yes, looks like it's due to VistaDB's obfuscation

    EntitySpaces | Twitter | BLOG | Please honor our Software License
View as RSS news feed in XML