5 Replies Latest reply on Aug 23, 2011 5:42 PM by Christopher Marcel

    java.util.NoSuchElementException

    dman_gypsy

      Using FlashBuilder for PHP with Wamp, Mysql 5.1.56 on Windows 7 professional.

       

      Developing an application with ZendFramework 1.11 with a MySQL backend.  When I edit my services in the PHP root directory I get the following error.

       

      'ServiceRefreshJob' has encountered a problem.

       

      An internal error has occurred.
      java.util.NoSuchElementException

       

      I cannot update my services.  I removed the project and restored it and that worked for a little bit, I also went as far as reinstalling the Flash Builder to no luck.

       

      Thanks

        • 1. Re: java.util.NoSuchElementException
          dman_gypsy Level 1

          Also I tried deleting the Service from Flash builder and it doesn't do anything.  Heres the log

           

          !ENTRY org.eclipse.ui 4 0 2011-06-20 11:42:58.309
          !MESSAGE Unhandled event loop exception
          !STACK 0
          java.util.NoSuchElementException
              at java.util.AbstractList$Itr.next(Unknown Source)
              at com.adobe.flexbuilder.DCDService.core.AbstractFlexServiceOperation.isArgumentListSame(Abs tractFlexServiceOperation.java:737)
              at com.adobe.flexbuilder.DCDService.core.AbstractFlexServiceOperation.equals(AbstractFlexSer viceOperation.java:634)
              at com.adobe.flexbuilder.DCDService.core.AbstractFlexServiceOperation.equals(AbstractFlexSer viceOperation.java:604)
              at com.adobe.flexbuilder.DCDService.core.FlexServiceOperation.equals(FlexServiceOperation.ja va:48)
              at com.adobe.flexbuilder.DCDService.core.FlexService.equals(FlexService.java:785)
              at org.eclipse.jface.viewers.StructuredViewer.equals(StructuredViewer.java:706)
              at org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.java:2798)
              at org.eclipse.jface.viewers.TreeViewer.updatePlus(TreeViewer.java:852)
              at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:830)
              at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:804)
              at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
              at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:778)
              at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:644)
              at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:749)
              at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.ja va:1492)
              at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:833)
              at org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1476)
              at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1422 )
              at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:403)
              at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1383 )
              at org.eclipse.jface.viewers.CheckboxTreeViewer.preservingSelection(CheckboxTreeViewer.java: 416)
              at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1469)
              at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:274)
              at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1664)
              at com.adobe.flexbuilder.dcrad.ui.dialogs.FileSelectionForDeletionDialog.createDialogArea(Fi leSelectionForDeletionDialog.java:135)
              at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
              at org.eclipse.jface.window.Window.create(Window.java:431)
              at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
              at org.eclipse.jface.window.Window.open(Window.java:790)
              at com.adobe.flexbuilder.dcrad.views.ServiceExplorerView.deleteSelectedItems(ServiceExplorer View.java:2067)
              at com.adobe.flexbuilder.dcrad.views.internal.actions.DeleteServiceOrEntityAction.run(Delete ServiceOrEntityAction.java:38)
              at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
              at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:584)
              at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
              at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java :411)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
              at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
              at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
              at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
              at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
              at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
              at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
              at com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.ja va:108)
              at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
              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:369)
              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:619)
              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
              at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

          • 2. Re: java.util.NoSuchElementException
            xrg2005

            I took this from Richard and Sth at StackOverflow, put my own spin on it, and it seemed to help me with this particular issue:

             

            "There is a way to do this but its a bit brutal. Go to the directory where your projects are located. Usually somewhere in your My Documents. And go to the directory of the project you want all the Data services from.

            Find the ".model" directory and there you will find your "~project name~.fml" file. Now open a text editor and open that file."

             

            I opened using Dreamweaver, which made it easier to read than in Notepad.  From there I just deleted whatever service was giving me problems including its service tag and contents <service></service>.  After that restart Flash Builder, it'll read the fml file and only the data service(s) you deleted should be gone from the Data/Services Window.  Redo the wizard to add and it should update properly.  Its pretty quick and dirty.  Hopefully it helps.

            -X

            • 3. Re: java.util.NoSuchElementException
              Christopher Marcel

              I had the same problem, and the problem was with the .fml file. I just wanted to add some info in case someone else had this problem with my circumstances.

               

              My problem arose because of SVN, and the fact that someone on my team had put the server side (PHP) on their desktop instead of in the web root when they "checked out". They had tried refreshing their data services and then they committed the changes to the SVN server. So when I went to update the files on my workstation it downloaded their .fml file which had references to their desktop. This broke the data services all together. Luckily I was able to just revert back to an older version from my SVN server.

               

              This is the only post I found on the subject so I just wanted to add another scenario where this problem might arise.

              • 4. Re: java.util.NoSuchElementException
                Christopher Marcel Level 1

                An update. If I paste in my old .fml file I get 1 data refresh, and that is it. THen my file is corrupt again and I loose the ability to create new services. I don't see any glaring problems when I look at the .fml, but I am trying to figure out why it is corrupt after one data refresh.

                • 5. Re: java.util.NoSuchElementException
                  Christopher Marcel Level 1

                  So instead of just pasting the old .fml file I did your suggestion of deleting the service altogether and it seems to be working fine now.