holgerbrandl / send2terminal

Intellij plugin to send line or selection to terminal
BSD 2-Clause "Simplified" License
17 stars 2 forks source link

Cannot run program "...\RGWConnector.exe" #9

Closed paulosalvatore closed 5 years ago

paulosalvatore commented 5 years ago

Trying to use 'Send2Terminal' I get this error: java.io.IOException: Cannot run program "C:\Users\paulo\RGWConnector.exe": CreateProcess error=193, %1 não é um aplicativo Win32 válido Which means windows can't run RGWConnector.exe.

Tried to launch it with compatibility settings and admin access but isn't possible.

Reference Image: image

Full stack trace:

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at io.github.holgerbrandl.send2terminal.connectors.RGWLauncher.submitCode(RGWLauncher.java:100)
    at io.github.holgerbrandl.send2terminal.connectors.ConnectorUtils.sendText(ConnectorUtils.java:42)
    at io.github.holgerbrandl.send2terminal.actions.EvaluateLineOrSelectionAction.actionPerformed(EvaluateLineOrSelectionAction.java:45)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:258)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:275)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:249)
    at com.intellij.ui.popup.ActionPopupStep.performAction(ActionPopupStep.java:200)
    at com.intellij.ui.popup.ActionPopupStep.performAction(ActionPopupStep.java:190)
    at com.intellij.ui.popup.ActionPopupStep.lambda$onChosen$2(ActionPopupStep.java:184)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
    at com.intellij.ui.popup.AbstractPopup.lambda$dispose$12(AbstractPopup.java:1417)
    at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:3049)
    at com.intellij.ide.IdeEventQueue.ifFocusEventsInTheQueue(IdeEventQueue.java:172)
    at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:124)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:179)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:58)
    at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1413)
    at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:160)
    at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:308)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.dispose(PopupFactoryImpl.java:279)
    at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:48)
    at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44)
    at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:138)
    at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:107)
    at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:193)
    at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:107)
    at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:157)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:129)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:125)
    at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:263)
    at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:444)
    at com.intellij.ui.popup.list.ListPopupImpl._handleSelect(ListPopupImpl.java:397)
    at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:343)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionGroupPopup.handleSelect(PopupFactoryImpl.java:299)
    at com.intellij.ui.popup.list.ListPopupImpl$MyMouseListener.mouseReleased(ListPopupImpl.java:503)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
    at java.awt.Component.processMouseEvent(Component.java:6548)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3325)
    at com.intellij.ui.popup.list.ListPopupImpl$MyList.processMouseEvent(ListPopupImpl.java:557)
    at java.awt.Component.processEvent(Component.java:6313)
    at java.awt.Container.processEvent(Container.java:2237)
    at java.awt.Component.dispatchEventImpl(Component.java:4903)
    at java.awt.Container.dispatchEventImpl(Container.java:2295)
    at java.awt.Component.dispatchEvent(Component.java:4725)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
    at java.awt.Container.dispatchEventImpl(Container.java:2281)
    at java.awt.Window.dispatchEventImpl(Window.java:2746)
    at java.awt.Component.dispatchEvent(Component.java:4725)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    at java.awt.EventQueue$4.run(EventQueue.java:737)
    at java.awt.EventQueue$4.run(EventQueue.java:735)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:719)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:664)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:363)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.reflect.InvocationTargetException
    ... 71 more
Caused by: java.io.IOException: Cannot run program "C:\Users\paulo\RGWConnector.exe": CreateProcess error=193, %1 não é um aplicativo Win32 válido
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at java.lang.Runtime.exec(Runtime.java:620)
    at java.lang.Runtime.exec(Runtime.java:485)
    at io.github.holgerbrandl.send2terminal.connectors.RGWLauncher.submitCode(RGWLauncher.java:95)
    ... 70 more
Caused by: java.io.IOException: CreateProcess error=193, %1 não é um aplicativo Win32 válido
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
    at java.lang.ProcessImpl.start(ProcessImpl.java:137)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    ... 73 more

Execution path image

ghost commented 5 years ago

Similar error on my system too

Details: PyCharm 2019.1.3 (Professional Edition) Build #PY-191.7479.30, built on May 29, 2019 JRE: 11.0.2+9-b159.60 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0.17134

stacktrace:

java.lang.RuntimeException: Error Loading R-GUI-Windows-Connector:
    at io.github.holgerbrandl.send2terminal.connectors.RGWLauncher.<init>(RGWLauncher.java:39)
    at io.github.holgerbrandl.send2terminal.connectors.ConnectorUtils.getPlatformConnector(ConnectorUtils.java:30)
    at io.github.holgerbrandl.send2terminal.connectors.ConnectorUtils.sendText(ConnectorUtils.java:40)
    at io.github.holgerbrandl.send2terminal.actions.EvaluateLineOrSelectionAction.actionPerformed(EvaluateLineOrSelectionAction.java:45)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:261)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:278)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:292)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:283)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:107)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:282)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111)
    at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
    at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
    at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:121)
    at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:524)
    at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:35)
    at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:546)
    at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
    at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.desktop/java.awt.Component.processEvent(Unknown Source)
    at java.desktop/java.awt.Container.processEvent(Unknown Source)
    at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
    at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
    at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at io.github.holgerbrandl.send2terminal.connectors.RGWLauncher.copyStream2File(RGWLauncher.java:72)
    at io.github.holgerbrandl.send2terminal.connectors.RGWLauncher.getLauncher(RGWLauncher.java:56)
    at io.github.holgerbrandl.send2terminal.connectors.RGWLauncher.<init>(RGWLauncher.java:37)
    ... 52 more
holgerbrandl commented 5 years ago

As a workaround (until rgwconnector has been removed) you could change the evaluation target to conemu (assuming that you have conemu installed and are intending to use it).

ghost commented 5 years ago

Thanks for the suggestion. Can you guide me how to change the evaluation target? I downloaded cmder and changed the terminal path as described here. When I opened terminal in pycharm it is opening cmder, but I am trying to send R code to terminal, it is still trying to lauch RGWLauncher and throwing the error described above java.lang.reflect.InvocationTargetException Cannot run program "C:\Users\Reddy\RGWConnector.exe": CreateProcess error=193, %1 is not a valid Win32 application

holgerbrandl commented 5 years ago

You can change the evaluation target in the plugin settings: image

holgerbrandl commented 5 years ago

The conemu/cmder functionality was published with the rather recent v1.4 of the plugin.