4 Replies Latest reply on Apr 26, 2017 9:37 PM by JABIR5ALI

    "Could not create the view" error

    danceboogie8 Level 1

      Hey everyone,

       

      I'm new to Flash Builder and have been following a tutorial video to learn the basics. Today, when I tried to access my project, this error appeared in the Package Explorer:

       

      Could not create the view: Plug-in "com.adobe.flexbuilder.as.editor" was unable to instantiate class "com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorer".

       

      I also can't seem to create a new Flex project. If I try to, I can never click Finish. The button just remains faded out.

       

      Below are the details on the package explorer error.

       

      Any help would be much appreciated.

       

      Thanks.

       

      java.lang.NoClassDefFoundError: com/adobe/flexbuilder/codemodel/common/CMFactory
          at com.adobe.flexbuilder.as.editor.ui.packageexplorer.FlexPackageExplorer.<init>(FlexPackage Explorer.java:263)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
          at java.lang.reflect.Constructor.newInstance(Unknown Source)
          at java.lang.Class.newInstance0(Unknown Source)
          at java.lang.Class.newInstance(Unknown Source)
          at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(Re gistryStrategyOSGI.java:170)
          at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionR egistry.java:874)
          at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(Configu rationElement.java:243)
          at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(C onfigurationElementHandle.java:51)
          at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:267)
          at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
          at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:263)
          at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
          at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:324)
          at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:226)
          at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
          at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:4212)
          at org.eclipse.ui.internal.WorkbenchPage$18.runWithException(WorkbenchPage.java:3271)
          at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
          at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
          at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
          at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3855)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3476)
          at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
          at org.eclipse.ui.internal.Workbench$28.runWithException(Workbench.java:1384)
          at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
          at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
          at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
          at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3855)
          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3476)
          at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2316)
          at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
          at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
          at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
          at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
          at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
          at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java :109)
          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
          at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
      Caused by: org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundExce ption: An error occurred while automatically activating bundle com.adobe.flexbuilder.codemodel (16).
          at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLa zyStarter.java:125)
          at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java :449)
          at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoade r.java:211)
          at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381)
          at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:3 3)
          at org.eclipse.osgi.internal.loader.MultiSourcePackage.loadClass(MultiSourcePackage.java:31)
          at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:454)
          at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
          at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
          at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.jav a:105)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClassInternal(Unknown Source)
          ... 51 more
      Caused by: org.osgi.framework.BundleException: Exception in com.adobe.flexbuilder.codemodel.internal.bridge.CMBridge.start() of bundle com.adobe.flexbuilder.codemodel.
          at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextIm pl.java:806)
          at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:7 55)
          at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
          at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
          at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
          at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLa zyStarter.java:111)
          ... 62 more
      Caused by: java.nio.channels.OverlappingFileLockException
          at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(Unknown Source)
          at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(Unknown Source)
          at sun.nio.ch.FileChannelImpl.tryLock(Unknown Source)
          at java.nio.channels.FileChannel.tryLock(Unknown Source)
          at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:246)
          at org.apache.lucene.store.NativeFSLockFactory.acquireTestLock(NativeFSLockFactory.java:79)
          at org.apache.lucene.store.NativeFSLockFactory.setLockDir(NativeFSLockFactory.java:139)
          at org.apache.lucene.store.NativeFSLockFactory.<init>(NativeFSLockFactory.java:117)
          at com.adobe.flexbuilder.codemodel.internal.common.AbstractTextDatabase.start(AbstractTextDa tabase.java:111)
          at com.adobe.flexbuilder.codemodel.internal.search.ASSearchDataProvider.<init>(ASSearchDataP rovider.java:43)
          at com.adobe.flexbuilder.codemodel.internal.search.ASProviderFactory.createDataProvider(ASPr oviderFactory.java:47)
          at com.adobe.flexbuilder.codemodel.internal.search.SearchIndexManager.addISearchDataProvider dFactory(SearchIndexManager.java:70)
          at com.adobe.flexbuilder.codemodel.internal.CMCoreActivator.activate(CMCoreActivator.java:19 9)
          at com.adobe.flexbuilder.codemodel.internal.bridge.CMBridge.start(CMBridge.java:77)
          at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:7 83)
          at java.security.AccessController.doPrivileged(Native Method)
          at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextIm pl.java:774)
          ... 67 more

        • 1. Re: "Could not create the view" error
          MiroSabo

          I have the same problem/error, but no one seems to know what's wrong. No reply from Adobe Support either. Same project works with FB 4 and 4.6, but not with 4.7.

          • 2. Re: "Could not create the view" error
            Erez Inchy Level 1

            Hi Miro,

            I'm having the same issue on FB 4.7 command line.

             

            Did you manage to resolve/analyze it?

             

            Also, it seems that this error is related to this one:

            !MESSAGE An error occurred while automatically activating bundle com.adobe.flexbuilder.codemodel (29).

            org.osgi.framework.BundleException: Exception in com.adobe.flexbuilder.codemodel.CMCoreActivator.start() of bundle com.adobe.flexbuilder.codemodel.

             

            Any ideas?

             

            Thanks,

            Erez.

            • 3. Re: "Could not create the view" error
              cosmacol Level 1

              I'm having this issue since ever with FB 4.7 (the normal IDE version, not the command-line one).

              The most consistent way I found to resolve it is to delete the output folders of all flex projects, then restart and perform a clean build.


              My suspect is that the incremental compilation is flawed, but cannot be sure of it.

               

              P.S. usually the initial error has this root exception

              Root exception:

              java.lang.NullPointerException

                at com.adobe.flexbuilder.codemodel.internal.bridge.WorkspaceSpecification.getStateLocation(W orkspaceSpecification.java:157)

                at com.adobe.flexbuilder.codemodel.internal.bridge.WorkspaceSpecification.getFileInStateLoca tion(WorkspaceSpecification.java:149)

                at com.adobe.flexbuilder.codemodel.internal.search.AbstractTextDatabase.start(AbstractTextDa tabase.java:81)

                at com.adobe.flexbuilder.codemodel.internal.search.ASSearchDataProvider.<init>(ASSearchDataP rovider.java:25)

                at com.adobe.flexbuilder.codemodel.internal.search.SearchIndexManager.initialize(SearchIndex Manager.java:155)

                at com.adobe.flexbuilder.codemodel.CMCoreActivator.activate(CMCoreActivator.java:189)

                at com.adobe.flexbuilder.codemodel.CMCoreActivator.start(CMCoreActivator.java:76)

              • 4. Re: "Could not create the view" error
                JABIR5ALI

                appears the air sdk is indeed not complete. So you need to overwrite the old sdk with the new one without deleting old, so that missing files would stay. I just don't understand why all the instructions say that you should delete the old one completely.