org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error

Appcelerator JIRA | Ingo Muschenetz | 5 years ago
  1. 0

    While following the steps for APSTUD-2564, I saw this in my log file when I started typing "body": {code} (Build 3.0.3.qualifier) [ERROR] Cannot recover from the syntax error beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:590) at beaver.Parser.parse(Parser.java:487) at beaver.Parser.parse(Parser.java:428) at com.aptana.editor.css.parsing.CSSParser.parse(CSSParser.java:131) at com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:286) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:244) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:231) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:213) at com.aptana.editor.common.AbstractThemeableEditor.getAST(AbstractThemeableEditor.java:1084) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy$2.run(CommonReconcilingStrategy.java:253) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3935) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3612) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) at org.eclipse.equinox.launcher.Main.main(Main.java:1386) (Build 3.0.3.qualifier) [ERROR] Cannot recover from the syntax error org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:126) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:83) at com.aptana.editor.css.contentassist.index.CSSFileIndexingParticipant.index(CSSFileIndexingParticipant.java:42) at com.aptana.core.internal.build.IndexBuildParticipant.buildFile(IndexBuildParticipant.java:83) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:306) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:238) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:208) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:396) at com.aptana.editor.common.text.reconciler.CompositeReconcilingStrategy.fullReconcile(CompositeReconcilingStrategy.java:125) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:590) at beaver.Parser.parse(Parser.java:487) at beaver.Parser.parse(Parser.java:428) at com.aptana.editor.css.parsing.CSSParser.parse(CSSParser.java:131) at com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:286) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:244) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:117) ... 10 more ckgroundThread.run(AbstractReconciler.java:206) {code} Those error messages aren't necessary.

    Appcelerator JIRA | 5 years ago | Ingo Muschenetz
    org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error
  2. 0

    # Open a new JS file # Start typing "function" # Note the following in the log file: {code} !SUBENTRY 1 com.aptana.index.core 4 0 2012-02-23 09:34:54.197 !MESSAGE Cannot recover from the syntax error !STACK 0 beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:590) at com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:604) at beaver.Parser.parse(Parser.java:487) at beaver.Parser.parse(Parser.java:428) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:428) at com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:286) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:244) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:117) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:83) at com.aptana.editor.js.contentassist.index.JSFileIndexingParticipant.index(JSFileIndexingParticipant.java:104) at com.aptana.core.internal.build.IndexBuildParticipant.buildFile(IndexBuildParticipant.java:83) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:306) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:238) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:208) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:396) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) (Build 3.0.3.qualifier) [ERROR] Cannot recover from the syntax error org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:126) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:83) at com.aptana.editor.js.contentassist.index.JSFileIndexingParticipant.index(JSFileIndexingParticipant.java:104) at com.aptana.core.internal.build.IndexBuildParticipant.buildFile(IndexBuildParticipant.java:83) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:306) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:238) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:208) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:396) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:590) at com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:604) at beaver.Parser.parse(Parser.java:487) at beaver.Parser.parse(Parser.java:428) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:428) at com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:286) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:244) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:117) ... 9 more {code}

    Appcelerator JIRA | 5 years ago | Ingo Muschenetz
    beaver.Parser$Exception: Cannot recover from the syntax error
  3. 0

    # Open a new JS file # Start typing "function" # Note the following in the log file: {code} !SUBENTRY 1 com.aptana.index.core 4 0 2012-02-23 09:34:54.197 !MESSAGE Cannot recover from the syntax error !STACK 0 beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:590) at com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:604) at beaver.Parser.parse(Parser.java:487) at beaver.Parser.parse(Parser.java:428) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:428) at com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:286) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:244) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:117) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:83) at com.aptana.editor.js.contentassist.index.JSFileIndexingParticipant.index(JSFileIndexingParticipant.java:104) at com.aptana.core.internal.build.IndexBuildParticipant.buildFile(IndexBuildParticipant.java:83) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:306) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:238) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:208) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:396) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) (Build 3.0.3.qualifier) [ERROR] Cannot recover from the syntax error org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:126) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:83) at com.aptana.editor.js.contentassist.index.JSFileIndexingParticipant.index(JSFileIndexingParticipant.java:104) at com.aptana.core.internal.build.IndexBuildParticipant.buildFile(IndexBuildParticipant.java:83) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:306) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:238) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:208) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:396) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:590) at com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:604) at beaver.Parser.parse(Parser.java:487) at beaver.Parser.parse(Parser.java:428) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:428) at com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:286) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:244) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:117) ... 9 more {code}

    Appcelerator JIRA | 5 years ago | Ingo Muschenetz
    org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Given the code below, add and remove the missing () after the first alertMsg: {code} <html> <head> <script type="text/javascript"> function alertMsg(){alert("Popup");} </script> </head> <body> <form> <input type="button" value="Show alert box" onclick="alertMsg()" /> </form> </body> </html> {code} You will see the following in the log file: {code} (Build 3.0.3.qualifier) [ERROR] Failed to parse the content beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:686) at com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:596) at beaver.Parser.parse(Parser.java:487) at beaver.Parser.parse(Parser.java:428) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:428) at com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:271) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:229) at com.aptana.editor.js.contentassist.JSContentAssistProcessor.getActiveASTNode(JSContentAssistProcessor.java:584) at com.aptana.editor.js.contentassist.JSContentAssistProcessor.getArgumentsNode(JSContentAssistProcessor.java:647) at com.aptana.editor.js.contentassist.JSContentAssistProcessor.getFunctionElement(JSContentAssistProcessor.java:685) at com.aptana.editor.js.contentassist.JSContentAssistProcessor.computeContextInformation(JSContentAssistProcessor.java:436) at com.aptana.editor.common.contentassist.ContentAssistant.computeContextInformation(ContentAssistant.java:2245) {code} This related to messing with the problems view error we were chatting about before (Adding/removing () after the first alertMsg in the text below). I get it every time I edit.

    Appcelerator JIRA | 5 years ago | Ingo Muschenetz
    beaver.Parser$Exception: Cannot recover from the syntax error
  6. 0

    Saw this in the log. I created two projects, inserted two breakpoints, and ran both in android device. They were default projects, one with an extra event listener. Log: {code} !ENTRY com.aptana.editor.js 4 0 2012-10-16 15:29:36.290 !MESSAGE (Build 3.0.0.201210151149) [ERROR] Failed to parse file:/Users/dhyde/Desktop/TISTUD-RC/workspace/MyProject/Resources/app.js for JS Parser Validation !STACK 1 org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:129) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:97) at com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:145) at com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:437) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:697) at com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:557) at beaver.Parser.parse(Parser.java:498) at beaver.Parser.parse(Parser.java:439) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:383) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:345) at com.aptana.parsing.ParsingEngine.noCacheParse(ParsingEngine.java:424) at com.aptana.parsing.ParsingEngine.parse(ParsingEngine.java:229) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:230) at com.aptana.index.core.build.BuildContext.parse(BuildContext.java:150) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:121) ... 9 more !SUBENTRY 1 com.aptana.index.core 4 0 2012-10-16 15:29:36.290 !MESSAGE Cannot recover from the syntax error !STACK 0 beaver.Parser$Exception: Cannot recover from the syntax error at beaver.Parser.recoverFromError(Parser.java:697) at com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:557) at beaver.Parser.parse(Parser.java:498) at beaver.Parser.parse(Parser.java:439) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:383) at com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:345) at com.aptana.parsing.ParsingEngine.noCacheParse(ParsingEngine.java:424) at com.aptana.parsing.ParsingEngine.parse(ParsingEngine.java:229) at com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:230) at com.aptana.index.core.build.BuildContext.parse(BuildContext.java:150) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:121) at com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:97) at com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:145) at com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:437) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) {code} app.js {code} // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); // create tab group var tabGroup = Titanium.UI.createTabGroup(); // // create base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'red' }); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 1', window:win1 }); var label1 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 1', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win1.add(label1); // // create controls tab and root window // var win2 = Titanium.UI.createWindow({ title:'Tab 2', backgroundColor:'#fff' }); var tab2 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 2', window:win2 }); var label2 = Titanium.UI.createLabel({ color:'#999', text:'I am Window 2', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto' }); win2.add(label2); // // add tabs // tabGroup.addTab(tab1); tabGroup.addTab(tab2); // open tab group tabGroup.open(); win1.addEventListener('click', function(){ win1.backgroundColor = win1.backgroundColor == 'red' ? 'blue' : 'red'; }); {code}

    Appcelerator JIRA | 4 years ago | Dustin Hyde
    org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. beaver.Parser$Exception

      Cannot recover from the syntax error

      at beaver.Parser.recoverFromError()
    2. beaver
      Parser.parse
      1. beaver.Parser.recoverFromError(Parser.java:590)
      2. beaver.Parser.parse(Parser.java:487)
      3. beaver.Parser.parse(Parser.java:428)
      3 frames
    3. com.aptana.editor
      CSSParser.parse
      1. com.aptana.editor.css.parsing.CSSParser.parse(CSSParser.java:131)
      1 frame
    4. com.aptana.parsing
      ParserPoolFactory.parse
      1. com.aptana.parsing.ParserPoolFactory.doParse(ParserPoolFactory.java:286)
      2. com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:244)
      2 frames
    5. com.aptana.index
      BuildContext.getAST
      1. com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:117)
      2. com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:83)
      2 frames
    6. com.aptana.editor
      CSSFileIndexingParticipant.index
      1. com.aptana.editor.css.contentassist.index.CSSFileIndexingParticipant.index(CSSFileIndexingParticipant.java:42)
      1 frame
    7. com.aptana.core
      IndexBuildParticipant.buildFile
      1. com.aptana.core.internal.build.IndexBuildParticipant.buildFile(IndexBuildParticipant.java:83)
      1 frame
    8. com.aptana.editor
      CommonReconciler.process
      1. com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:306)
      2. com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:238)
      3. com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:208)
      4. com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:396)
      5. com.aptana.editor.common.text.reconciler.CompositeReconcilingStrategy.fullReconcile(CompositeReconcilingStrategy.java:125)
      6. com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162)
      6 frames
    9. JFace Text
      AbstractReconciler$BackgroundThread.run
      1. org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)
      1 frame