Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Advanced Scripting Environment (EASE) » chicken and egg: can I create a workspace using an EASE script?(eclipse hangs when I invoke an EASE script using an SVN URL)
chicken and egg: can I create a workspace using an EASE script? [message #1841030] Fri, 30 April 2021 20:39 Go to next message
Richard Pennenga is currently offline Richard PennengaFriend
Messages: 3
Registered: April 2021
Junior Member
This is a chicken-and-egg question:

Can I use EASE to create and set up a new workspace?
What am I doing wrong if it's possible?

What I tried is:
1. I saved an EASE script in SVN (which just does a print)
2. I invoked it in an empty folder using a script argument with a URL value, like this (for more info see log below):

-script http://192.168.1.2/svn/company/EASE/trunk/src/newworkspace.py


This just hung.

The eclipse log showed a series of error messages some of which appear routinely and I've been ignoring since they haven't prevented my EASE scripts from running...

here's the error log (only slightly edited):

!SESSION 2021-04-30 16:20:13.159 -----------------------------------------------

eclipse.buildId=4.10.0.I20181206-0815

java.version=1.8.0_291

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Framework arguments:  -application org.eclipse.ease.runScript -script http://192.168.1.2/svn/company/EASE/trunk/src/newworkspace.py

Command-line arguments:  -os win32 -ws win32 -arch x86_64 -application org.eclipse.ease.runScript -data C:\workspaces\my_empty_folder -script http://192.168.1.2/svn/company/EASE/trunk/src/newworkspace.py



!ENTRY org.eclipse.ease.modules.modeling.ui 4 0 2021-04-30 16:20:13.956

!MESSAGE FrameworkEvent ERROR

!STACK 0

org.osgi.framework.BundleException: Could not resolve module: org.eclipse.ease.modules.modeling.ui [731]
  Unresolved requirement: Require-Bundle: org.eclipse.ocl.pivot; bundle-version="[1.0.0,2.0.0)"
    -> Bundle-SymbolicName: org.eclipse.ocl.pivot; bundle-version="1.6.0.v20181210-1441"; singleton:="true"
       org.eclipse.ocl.pivot [794]
         Unresolved requirement: Import-Package: com.google.inject


	at org.eclipse.osgi.container.Module.start(Module.java:451)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1762)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1725)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1656)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)

	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)



!ENTRY org.eclipse.ocl.pivot 4 0 2021-04-30 16:20:13.956

!MESSAGE FrameworkEvent ERROR

!STACK 0

org.osgi.framework.BundleException: Could not resolve module: org.eclipse.ocl.pivot [794]
  Unresolved requirement: Import-Package: com.google.inject


	at org.eclipse.osgi.container.Module.start(Module.java:451)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1762)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1725)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1656)

	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)

	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)

	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)



!ENTRY org.eclipse.ease 4 0 2021-04-30 16:20:14.292

!MESSAGE Loading early startup extension: org.eclipse.ui.internal.monitoring.MonitoringStartup



!ENTRY org.eclipse.ease 4 0 2021-04-30 16:20:14.300

!MESSAGE Loading early startup extension: com.python.pydev.debug.DebugEarlyStartup



!ENTRY org.eclipse.ease 4 0 2021-04-30 16:20:14.568

!MESSAGE Loading early startup extension: org.eclipse.m2e.internal.discovery.startup.UpdateConfigurationStartup



!ENTRY org.eclipse.ease 4 0 2021-04-30 16:20:14.568

!MESSAGE Loading early startup extension: org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$TasksUiStartup



!ENTRY org.eclipse.ease 4 0 2021-04-30 16:20:14.876

!MESSAGE Loading early startup extension: org.eclipse.mylyn.internal.team.ui.FocusedTeamUiPlugin$FocusedTeamUiStartup



!ENTRY org.eclipse.osgi 4 0 2021-04-30 16:20:14.876

!MESSAGE An error occurred while automatically activating bundle org.eclipse.mylyn.team.ui (447).

!STACK 0

org.osgi.framework.BundleException: Exception in org.eclipse.mylyn.internal.team.ui.FocusedTeamUiPlugin.start() of bundle org.eclipse.mylyn.team.ui.

	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:803)

	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:732)

	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1005)

	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:357)

	at org.eclipse.osgi.container.Module.doStart(Module.java:588)

	at org.eclipse.osgi.container.Module.start(Module.java:456)

	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:471)

	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)

	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:557)

	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:331)

	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)

	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)

	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)

	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)

	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)

	at java.lang.ClassLoader.loadClass(Unknown Source)

	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:612)

	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)

	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:934)

	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)

	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)

	at org.eclipse.ease.applications.RunHeadlessScript.loadEarlyStartupExtensions(RunHeadlessScript.java:175)

	at org.eclipse.ease.applications.RunHeadlessScript.start(RunHeadlessScript.java:81)

	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)

	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)

	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)

	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)

	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:659)

	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)

	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)

Caused by: java.lang.IllegalStateException: Workbench has not been created yet.

	at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:96)

	at org.eclipse.mylyn.internal.team.ui.FocusedTeamUiPlugin.start(FocusedTeamUiPlugin.java:72)

	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:782)

	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)

	at java.security.AccessController.doPrivileged(Native Method)

	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:775)

	... 34 more

Root exception:

java.lang.IllegalStateException: Workbench has not been created yet.

	at org.eclipse.ui.PlatformUI.getWorkbench(PlatformUI.java:96)

	at org.eclipse.mylyn.internal.team.ui.FocusedTeamUiPlugin.start(FocusedTeamUiPlugin.java:72)

	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:782)

	at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)

	at java.security.AccessController.doPrivileged(Native Method)

	at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:775)

	at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:732)

	at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1005)

	at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:357)

	at org.eclipse.osgi.container.Module.doStart(Module.java:588)

	at org.eclipse.osgi.container.Module.start(Module.java:456)

	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:471)

	at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)

	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:557)

	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:331)

	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)

	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)

	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)

	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)

	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)

	at java.lang.ClassLoader.loadClass(Unknown Source)

	at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:612)

	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:196)

	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:934)

	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)

	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)

	at org.eclipse.ease.applications.RunHeadlessScript.loadEarlyStartupExtensions(RunHeadlessScript.java:175)

	at org.eclipse.ease.applications.RunHeadlessScript.start(RunHeadlessScript.java:81)

	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)

	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)

	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)

	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)

	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)

	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:659)

	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)

	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)



!ENTRY org.eclipse.ease 4 0 2021-04-30 16:20:14.885

!MESSAGE Loading early startup extension: org.eclipse.ease.ui.scripts.repository.impl.Startup

[Updated on: Fri, 30 April 2021 20:40]

Report message to a moderator

Re: chicken and egg: can I create a workspace using an EASE script? [message #1841073 is a reply to message #1841030] Mon, 03 May 2021 06:47 Go to previous message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 250
Registered: July 2009
Location: Graz, Austria
Senior Member
Hi,

executing scripts from a URL should work just fine. Eg try:
eclipsec -application org.eclipse.ease.runScript -workspace "~/my workspace" -script "https://git.eclipse.org/c/ease/org.eclipse.ease.scripts.git/plain/Demos/EclipseCon%20Europe%202017/demo/01%20Simple%20Scripts/01%20Hello%20World.js"


Which prints "Hello World" to your console.

Things that might go wrong:
* URL encoding (look for special characters and escape them properly)
* website authentication. SVN smells like user/pass might be needed
* certificates in case you use https

Setting up a workspace is a common usecase in my company. Just remenber to supply the location of your fresh workspace on the command line.

HTH
Christian
Previous Topic:Start launch Config from script
Next Topic:Regexp in String.replaceAll() not working?
Goto Forum:
  


Current Time: Mon Oct 07 20:51:52 GMT 2024

Powered by FUDForum. Page generated in 0.04238 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top