20 Replies Latest reply on Sep 21, 2007 8:49 PM by atongmu518

    Flex 2.0 IDE Hosed

    vaporboy
      Hey all, i've been scouring the net for answers to this but did not find anything. After starting up my Eclipse IDE Friday, I have suddenly received an error message in the Design mode:

      An unknown item is declared as the root of your MXML document. Switch to source mode to correct it.

      This is strange since all i did was create a new MXML Application and the document i am using is just the Application template that is created. No extra code at all. I am at my wits end here, do I have to reinstall the IDE? Has anyone else had this issue?

      ---EDIT---
      Also, in my Design IDE, most of the icons in my Component pane are generic icons and not specific/unique icons whether they are Controls, Layouts, Navigators, etc. the icons are generic.
        • 1. Re: Flex 2.0 IDE Hosed
          ntsiii Level 3
          Did you "clean" the project?
          Tracy
          • 2. Re: Flex 2.0 IDE Hosed
            vaporboy Level 1
            Yes i did. I also, in my frustration, re-installed Flex but am having the same issue.
            • 3. Re: Flex 2.0 IDE Hosed
              cluebcke
              Not sure if this has anything to do with it, but check your project library settings. Under Project -> Properties -> Flex Build Path -> Library Path you should have something along the lines of

              ${FRAMEWORKS}\libs\playerglobal.swc
              ${FRAMEWORKS}\libs\utilities.swc
              ${FRAMEWORKS}\libs\flex.swc
              ${FRAMEWORKS}\libs\framework.swc

              And probably a couple others. I'm just thinking that maybe the "unknown item" error is caused by FB not being able to load the framework (and hence not being able to look up the <mx:Application> class--you did switch to source mode to verify that your doc root is <mx:Application>, right?)
              • 4. Re: Flex 2.0 IDE Hosed
                vaporboy Level 1
                Yes, this is the only code in the application:

                <?xml version="1.0" encoding="utf-8"?>
                <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="horizontal">

                </mx:Application>

                but it throws the error. I confirmed that those Library paths are in the area you referenced. I'm really at a loss and am about to reinstall everything.
                • 5. Re: Flex 2.0 IDE Hosed
                  cluebcke Level 1
                  :(

                  Sorry man, I gave it my best (albeit completely random) guess. Good luck with the reinstall, post back if you still have issues, hopefully somebody around here can get it figured out.
                  • 6. Re: Flex 2.0 IDE Hosed
                    Chicerjunge
                    Reinstall doesn't work for this problem. It is a problem with the IDE itself on certain configs. I have 2.01 installed.
                    • 7. Re: Flex 2.0 IDE Hosed
                      vaporboy Level 1
                      OK, so if i cannot reinstall to make it work. then i'm hosed and cannot use it anymore? That sucks.
                      • 8. Re: Flex 2.0 IDE Hosed
                        Chicerjunge Level 1
                        You, me, and hundreds of others are having the same problem. I have no idea what the heck the problem is.
                        • 9. Re: Flex 2.0 IDE Hosed
                          llin Adobe Employee
                          Hi,
                          This error message usually indicates the project is not pointing to the right place. When you create a project, you have a choice of Basic, ColdFusion, and FDS. If you chose basic, you can point to any location, as long as you put your mxml and AS files under there. If you chose Coldfusion or FDS, then you need to point it to the web app's root directory. Note a flex web app's root directory is the top level of a web app which contains WEB-INF/flex in it. For example, if you deployed flex samples app to JRun default server, and your samples app is at : C:\flex\jrun4\servers\default\samples
                          then your project will need to point to C:\flex\jrun4\servers\default\samples
                          if you point to C:\flex\jrun4\servers\default, then you will get that error displayed in FB.

                          If you still have problem with it, please tell me how you create the project, where you point your project to,etc, and I will try to see if I can figure out the problem for you.
                          • 10. Re: Flex 2.0 IDE Hosed
                            vaporboy Level 1
                            llin,

                            Yeah, you'de think that but i have uninstalled eclipse AND Flex and have re-installed them from scratch. All of the projects i am creating are basic and were either in my C:\workspace directory or in my home\workspace directory and I still had issues with it. I also let Flex define where my workspaces were with its default configuration and still had the same problems. I finally threw up my hands in desparation and installed the whole Flex IDE separately and THAT works. So now I have two eclipse distributions on my machine which personally I hate but I can at least work. Let me know if you have any other suggestions,

                            erik
                            • 11. Re: Flex 2.0 IDE Hosed
                              llin Adobe Employee
                              So this problem happens only with plugin version, but the standalone works. If you haven't, could you please update to flex builder 2.0.1 and see if the the problem is still there? ( http://www.adobe.com/products/flex/productinfo/updater/ )
                              We fixed some issues in 2.0.1. Please let me know if the problem still exist in 2.0.1.
                              • 12. Re: Flex 2.0 IDE Hosed
                                vaporboy Level 1
                                That is the version that is currently installed. Both the plugin and full IDE are at 2.0.1
                                • 13. Flex 2.0 IDE Hosed
                                  ivop
                                  I had this same problem this morning and it was caused by using symbolic links to manage source locations.

                                  My project uses sources from a couple locations and I initially copied everything into my workspace and merged any changes back to their origin elsewhere.

                                  So I wouldnt have to move stuff around I tried the Eclipse feature 'add a new folder->link to folder in filesystem' but Flex Builder complained that the sources could not be found.

                                  Using symbolic links in the workspace directory to bring all the parts together didn't cause complaints but autocomplete, code assist, design view & all those features that make Flex builder useful were broken.

                                  Went back to copying items physically into the workspace and all the Flex Builder features are working again.
                                  • 14. Re: Flex 2.0 IDE Hosed
                                    Chicerjunge Level 1
                                    Yes, I'm so sick of rebooting, restarting flex, rolling dice, throwing bones, cutting and pasting files or the guts of files. Right in the middle of a project, boom, I get this message every other day and have to stop working. I've actually given up on Flex because I just can't take this error anymore.

                                    It's like it comes and goes with no rhyme or reason.
                                    • 15. Re: Flex 2.0 IDE Hosed
                                      llin Adobe Employee
                                      Hi,
                                      For those of you who are interested in resolve this issue, please contact me via email at lin@adobe.com, I will try my best to figure out what the problem is by working with you offline.
                                      • 16. Re: Flex 2.0 IDE Hosed
                                        deladobe
                                        Hi,

                                        Lin has worked me through a solution for this problem. All those out there please try this and let me know if it works for you too.

                                        -> Open Flex (make sure its the latest version (currently 2.0.1)
                                        -> Click File -> Switch Workspace
                                        -> Type in a NEW DIRECTORY. This step is IMPORTANT. DO NOT USE THE DEFAULT LOCATION. Create a new directory anywhere on your hard drive then click OK.
                                        -> Click File -> New -> Flex Project -> Basic -> Enter a project name -> Finish
                                        -> Click Design Mode

                                        Hope this solution helps!

                                        Del
                                        • 17. Re: Flex 2.0 IDE Hosed
                                          cyprianpl Level 1
                                          I've got the same problem, out of nowhere, at least at a first glance.
                                          At the second glance it appeared that it's because of symlinks [Mac OS X].
                                          I changed my project's directory, moved it and created a symlink in the previous location [for SVN purposes].
                                          When I deleted the project from my workspace [without deleting resources of course], then imported it as an existing project [without copying] everything got back to normal.
                                          HTH.
                                          • 18. Re: Flex 2.0 IDE Hosed
                                            vaporboy Level 1
                                            deladobe, your solution seems to have worked for me. I am a bit worried though that this seems to be a hack/workaround for a known bug. maybe 2.0.2 may fix this.

                                            rock on,

                                            erik
                                            • 19. Re: Flex 2.0 IDE Hosed
                                              llin Adobe Employee
                                              The cause of the problem is that the workspace is somehow messed up by something like symlinks or changing of class location. To fix the problem, you can either manually correct the error in .actionScriptProperties and .flexProperties, or to use a new workspace to clean up the error. The steps posted by deladobe is to use a new workspace then recreate the project. Since this is mostly usage related issue, it could be behavior the same way with a new release, unless you guys can help me verify that there is indeed a bug in flex builder or eclipse. So if you feel this is more of a bug than a usage issue, please feel free to contact me offline.
                                              • 20. Re: Flex 2.0 IDE Hosed
                                                atongmu518
                                                A really worked solution for the problem!
                                                1.rename the flex.war to another name example myFlex.war.
                                                2.start tomcat,so you can get a directory named myFlex in the webapps.
                                                3.start eclipse.create a new flex project,select flext data service and compile application on the server when the page is viewed.the next step,the Root folder point to YOUR TOMCAT_HOME/webapps/myFlex,Root URL point to http://localhost:8080/myFlex . context root point to /myFlex

                                                OK, that's all,It work!!!