64-битное приложение Eclipse RCP не может читать и записывать в программные файлы или программные файлы (x86) - PullRequest
0 голосов
/ 02 июля 2018

Я пытаюсь поднять наше 32-битное приложение Eclipse RCP до 64-битного конечного состояния. Для этого я обновил все необходимые зависимости и библиотеки. Кроме того, я могу запустить приложение в 64-битной среде только тогда, когда приложение хранится где-либо за пределами Program Files или Program Files (x86). Когда он установлен в указанном месте, он не может быть запущен, представление результатов не может быть создано, потому что он пытается записать файл поиска в том месте, где он был установлен.

Но главная проблема в том, что один и тот же набор кода работает для 32-битной версии независимо от того, где он установлен. Также 32-битная версия приложения может считывать или записывать результат в любое нужное место без запуска в качестве администратора. И 64-битная версия приложения делает то же самое при запуске от имени администратора.

Чтобы узнать больше, я попытался использовать eclipse_mars_x86 и eclipse_mars_x86_64 с другим расположением. Когда рабочая область находится внутри Program Files или Program Files (x86), 32-битный eclipse может получить к нему доступ, не будучи запущенным от имени администратора, но тот же не может быть сделано через 64-битное затмение, без запуска его от имени администратора.

Есть идеи, почему затмение ведет себя так, и может ли это быть причиной моей проблемы? Кроме того, если есть какое-либо решение для этого?

Также см. Журнал ошибок для получения дополнительной информации.

    !SESSION 2018-06-04 13:13:23.774 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_172
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -host 
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -consolelog -host 

!ENTRY org.eclipse.osgi 4 0 2018-06-04 13:13:43.383

    !MESSAGE An error occurred while automatically activating bundle results-view (108).
    !STACK 0
    org.osgi.framework.BundleException: Exception in __.resultsview.Activator.start() of bundle results-view.
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
        at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
        at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
        at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
        at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
        at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
        at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
        at org.eclipse.core.internal.expressions.PropertyTesterDescriptor.instantiate(PropertyTesterDescriptor.java:92)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:91)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:141)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:141)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:141)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:124)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:124)
        at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:114)
        at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
        at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
        at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:72)
        at org.eclipse.ui.internal.services.EvaluationResultCache.evaluate(EvaluationResultCache.java:74)
        at org.eclipse.ui.internal.services.ExpressionAuthority.evaluate(ExpressionAuthority.java:165)
        at org.eclipse.ui.internal.services.EvaluationAuthority.refsWithSameExpression(EvaluationAuthority.java:155)
        at org.eclipse.ui.internal.services.EvaluationAuthority.sourceChanged(EvaluationAuthority.java:129)
        at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:311)
        at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:290)
        at org.eclipse.ui.AbstractSourceProvider.fireSourceChanged(AbstractSourceProvider.java:99)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.checkActivePart(WorkbenchSourceProvider.java:401)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.checkActivePart(WorkbenchSourceProvider.java:300)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.handleCheck(WorkbenchSourceProvider.java:286)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.checkOtherSources(WorkbenchSourceProvider.java:855)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:839)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
        at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1647)
        at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2137)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4525)
        at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
        at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610)
        at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
        at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
        at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:230)
        at org.eclipse.swt.widgets.Shell.open(Shell.java:1217)
        at org.eclipse.jface.window.Window.open(Window.java:797)
        at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:818)
        at org.eclipse.ui.internal.Workbench$70.runWithException(Workbench.java:3719)
        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:135)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
        at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
        at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
        at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
        at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
        at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
        at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
        at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
        at org.eclipse.ui.internal.Workbench.init(Workbench.java:1590)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2623)
        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.__.Application.start(Application.java:196)
        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:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    Caused by: java.io.IOException: java.io.FileNotFoundException: C:\Program Files\product-18.05.31-SNAPSHOT\__\Results\search.xml (Access is denied)
        at com.__.results.XmlWriter.writeXML(XmlWriter.java:97)
        at com.__.results.SummaryParser.writeXML(SummaryParser.java:50)
        at com.__.views.ResultsDisplayer.initializeModel(ResultsDisplayer.java:322)
        at com__.views.ResultsDisplayer.initializeCache(ResultsDisplayer.java:249)
        at com.__.resultsview.Activator.start(Activator.java:76)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
        ... 94 more
    Caused by: java.io.FileNotFoundException: C:\Program Files\product-18.05.31-SNAPSHOT\__\Results\search.xml (Access is denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
        at com.__.results.XmlWriter.writeXML(XmlWriter.java:87)
        ... 101 more
    Root exception:
    java.io.IOException: java.io.FileNotFoundException: C:\Program Files\product-18.05.31-SNAPSHOT\__\Results\search.xml (Access is denied)
        at com.__.results.XmlWriter.writeXML(XmlWriter.java:97)
        at com.__.SummaryParser.writeXML(SummaryParser.java:50)
        at com.__.views.ResultsDisplayer.initializeModel(ResultsDisplayer.java:322)
        at com.__.views.ResultsDisplayer.initializeCache(ResultsDisplayer.java:249)
        at com.__.resultsview.Activator.start(Activator.java:76)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
        at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
        at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
        at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
        at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
        at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
        at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
        at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
        at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
        at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
        at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
        at org.eclipse.core.internal.expressions.PropertyTesterDescriptor.instantiate(PropertyTesterDescriptor.java:92)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:91)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:141)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:141)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:141)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:124)
        at org.eclipse.core.internal.expressions.TypeExtension.findTypeExtender(TypeExtension.java:124)
        at org.eclipse.core.internal.expressions.TypeExtensionManager.getProperty(TypeExtensionManager.java:114)
        at org.eclipse.core.internal.expressions.TestExpression.evaluate(TestExpression.java:96)
        at org.eclipse.core.internal.expressions.CompositeExpression.evaluateAnd(CompositeExpression.java:53)
        at org.eclipse.core.internal.expressions.WithExpression.evaluate(WithExpression.java:72)
        at org.eclipse.ui.internal.services.EvaluationResultCache.evaluate(EvaluationResultCache.java:74)
        at org.eclipse.ui.internal.services.ExpressionAuthority.evaluate(ExpressionAuthority.java:165)
        at org.eclipse.ui.internal.services.EvaluationAuthority.refsWithSameExpression(EvaluationAuthority.java:155)
        at org.eclipse.ui.internal.services.EvaluationAuthority.sourceChanged(EvaluationAuthority.java:129)
        at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:311)
        at org.eclipse.ui.internal.services.ExpressionAuthority.sourceChanged(ExpressionAuthority.java:290)
        at org.eclipse.ui.AbstractSourceProvider.fireSourceChanged(AbstractSourceProvider.java:99)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.checkActivePart(WorkbenchSourceProvider.java:401)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.checkActivePart(WorkbenchSourceProvider.java:300)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.handleCheck(WorkbenchSourceProvider.java:286)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider.checkOtherSources(WorkbenchSourceProvider.java:855)
        at org.eclipse.ui.internal.services.WorkbenchSourceProvider$6.handleEvent(WorkbenchSourceProvider.java:839)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
        at org.eclipse.swt.widgets.Decorations.WM_ACTIVATE(Decorations.java:1647)
        at org.eclipse.swt.widgets.Shell.WM_ACTIVATE(Shell.java:2137)
        at org.eclipse.swt.widgets.Control.windowProc(Control.java:4525)
        at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
        at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610)
        at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061)
        at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
        at org.eclipse.swt.internal.win32.OS.BringWindowToTop(Native Method)
        at org.eclipse.swt.widgets.Decorations.bringToTop(Decorations.java:230)
        at org.eclipse.swt.widgets.Shell.open(Shell.java:1217)
        at org.eclipse.jface.window.Window.open(Window.java:797)
        at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:818)
        at org.eclipse.ui.internal.Workbench$70.runWithException(Workbench.java:3719)
        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:135)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
        at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
        at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
        at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
        at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
        at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
        at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
        at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
        at org.eclipse.ui.internal.Workbench.init(Workbench.java:1590)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2623)
        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.__.Application.start(Application.java:196)
        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:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    Caused by: java.io.FileNotFoundException: C:\Program Files\product-18.05.31-SNAPSHOT\__\Results\search.xml (Access is denied)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(FileOutputStream.java:270)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
        at com.__.results.XmlWriter.writeXML(XmlWriter.java:87)
        ... 101 more
...