| Summary: | Documentation for starting the Equinox console is wrong | ||
|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Zoltán Tóth <zolee.t> |
| Component: | Framework | Assignee: | equinox.framework-inbox <equinox.framework-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | 1abhinav9, frederic.fays, friederike, hussain.ali.almutawa, kfirufk, l.kirchev, Lars.Vogel, matteo.palmieri, meta, paul.verest, remy.suen, stephan.herrmann, tarun, zolee.t |
| Version: | 3.8.0 Juno | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=570280 | ||
| Whiteboard: | stalebug | ||
|
Description
Zoltán Tóth
From M4 Equinox has a new console, for which you need also the bundles org.eclipse.equinox.console.jar org.apache.felix.gogo.shell.jar org.apache.felix.gogo.command.jar org.apache.felix.gogo.runtime.jar All of these are part of Equinox SDK. On the other hand, if you want the old-fashion built-in console, you should run Equinox with the property osgi.console.enable.builtin=true (In reply to comment #1) > From M4 Equinox has a new console, for which you need also the bundles > org.eclipse.equinox.console.jar > org.apache.felix.gogo.shell.jar > org.apache.felix.gogo.command.jar > org.apache.felix.gogo.runtime.jar > > All of these are part of Equinox SDK. > > On the other hand, if you want the old-fashion built-in console, you should run > Equinox with the property osgi.console.enable.builtin=true So in Eclipse I also need to add these jar-s to User Librarier or in simple windows console I have to add them to the classpath right? (In reply to comment #2) > (In reply to comment #1) > > From M4 Equinox has a new console, for which you need also the bundles > > org.eclipse.equinox.console.jar > > org.apache.felix.gogo.shell.jar > > org.apache.felix.gogo.command.jar > > org.apache.felix.gogo.runtime.jar > > > > All of these are part of Equinox SDK. > > > > On the other hand, if you want the old-fashion built-in console, you should run > > Equinox with the property osgi.console.enable.builtin=true > > So in Eclipse I also need to add these jar-s to User Librarier or in simple > windows console I have to add them to the classpath right? In Eclipse you don't have to do anything - the shell bundles come with Eclipse. When running only Equinox jar you have to describe them either in a config.ini file, as values for the property osgi.bundles, or if you don't want to use config.ini, you can pass them with -Dosgi.bundles=... to java. Here is a simple example - if you place the shell bundles and equinox in one and the same folder, you should use osgi.bundles=./org.apache.felix.gogo.runtime.jar@start, ./org.apache.felix.gogo.command.jar@start,./org.apache.felix.gogo.shelljar@start,./org.eclipse.equinox.console.jar@start You can pass osgi.console.enable.builtin=true either in config.ini, or as a system property with -D. i get that exact error message. that's looking into that bug report. (In reply to comment #4) > i get that exact error message. that's looking into that bug report. What error do you get? I have the following error message: org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console when I try to execute osgi from console. i downloaded the full osgi bundle and when I try to execute it with java -jar org.eclipse.osgi_3.8.0.v20120529-1548.jar -console -consoleLog I still get that error. even when I try to add the console jar to the execution with: java -jar org.eclipse.osgi_3.8.0.v20120529-1548.jar -cp org.eclipse.equinox.console_1.0.0.v20120522-1841.jar -console -consoleLog I still get the same error message. how can I properly execute the osgi console? again.. I'm running it from the full sdk, not from the eclipse package. (In reply to comment #6) Ok, but still you start only the Equinox bundle. You should configure the four console bundles I mention in a previous comment also to start along with the Equinox bundle. This is the cause of the error. It seems Equinox should update its front page at http://www.eclipse.org/equinox/documents/quickstart-framework.php which still says: "... Once you have the Equinox framework JAR, use the following command line: java -jar org.eclipse.osgi_3.2.0.jar -console " This is no help for users of 3.8+ I totally agree with Stephan Herrmann, the documentation is very irritating on this. I am new to OSGI and equinox and I ran into the exact problem yesterday and it took me a while to figure out that I need more plugins than just the org.eclipse.osgi_*. It would be good to update the documentation for 3.8+ here: http://eclipse.org/equinox/documents/quickstart-framework.php Same problem here. Tried following the documentation, got no output from the console. Tried Java 1.7 in case it was a Java 1.8 problem, still got no output. The fact that the documentation is wrong is bad enough, but the download pages actually encourage users to download just the framework as org.eclipse.osgi_3.9.1.v20140110-1610.jar -- see http://download.eclipse.org/equinox/drops/R-KeplerSR2-201402211700/index.php Looks like the minimal fix would be to make the "Getting started" page give the correct incantation: java -Dosgi.console.enable.builtin=true -jar org.eclipse.osgi_3.9.1.v20140110-1610.jar -console (In reply to mathew from comment #10) > java -Dosgi.console.enable.builtin=true -jar > org.eclipse.osgi_3.9.1.v20140110-1610.jar -console @mathew, java -Dosgi.console.enable.builtin=true -jar org.eclipse.osgi_3.10.0.v20140305-1523.jar -console does not help, below are the logs !SESSION 2014-04-08 20:10:25.734 ----------------------------------------------- eclipse.buildId=unknown java.version=1.7.0_51 java.vendor=Oracle Corporation BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_IN Command-line arguments: -console !ENTRY org.eclipse.osgi 4 0 2014-04-08 20:10:26.601 !MESSAGE Could not find bundle: unknown !STACK 0 org.osgi.framework.BundleException: Could not find bundle: unknown at org.eclipse.core.runtime.internal.adaptor.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:58) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:329) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:228) at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:205) !ENTRY org.eclipse.osgi 4 0 2014-04-08 20:10:26.625 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:77) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:378) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:232) at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:205) I confirm the finding of the last commenter that -Dosgi.console.enable.builtin=true does *not* work. Looks like backward compatability has been broken for a while now, but no-one really cares. _shrugs_ As of February 2016 the issue described is still present. Someone approaching eclipse equinox and wanting to learn still gets mislead by inaccurate instructions provided at this link: http://www.eclipse.org/equinox/documents/quickstart-framework.php. I'm unable to run equinox console from command line. The remaining option is to run from Eclipse PDE (not command line) Answer to stackover question http://stackoverflow.com/questions/25733843/how-to-start-osgi-console/35922571#35922571 suggests a solution Workaround, tested with an install of Eclipse 2018-12 (Eclipse IDE for RCP and RAP Developers):
Go to the plugin directory
# Unix, bash:
java -Dosgi.bundles=\
$(ls -1 org.apache.felix.gogo.shell_*.jar)@start,\
$(ls -1 org.apache.felix.gogo.command_*.jar)@start,\
$(ls -1 org.apache.felix.gogo.runtime_*.jar)@start,\
$(ls -1 org.eclipse.equinox.console_*.jar)@start\
-jar $(ls -1 org.eclipse.osgi_*.jar) -console
# Windows, powershell (works in console mode only):
java ('-Dosgi.bundles='+((`
"$(ls org.apache.felix.gogo.shell_*.jar | select -ExpandProperty Name)`@start",`
"$(ls org.apache.felix.gogo.command_*.jar | select -ExpandProperty Name)`@start",`
"$(ls org.apache.felix.gogo.runtime_*.jar | select -ExpandProperty Name)`@start",`
"$(ls org.eclipse.equinox.console_*.jar | select -ExpandProperty Name)`@start"`
) -join ',')) '-jar' "$(ls org.eclipse.osgi_*.jar | select -ExpandProperty Name)" '-console'
# Windows, powershell (works with ISE as well):
Start-Process 'java' -ArgumentList `
(('-Dosgi.bundles=',`
"$(ls org.apache.felix.gogo.shell_*.jar | select -ExpandProperty Name)`@start,",`
"$(ls org.apache.felix.gogo.command_*.jar | select -ExpandProperty Name)`@start,",`
"$(ls org.apache.felix.gogo.runtime_*.jar | select -ExpandProperty Name)`@start,",`
"$(ls org.eclipse.equinox.console_*.jar | select -ExpandProperty Name)`@start",`
" -jar $(ls org.eclipse.osgi_*.jar | select -ExpandProperty Name) -console"
) -join '')
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. (In reply to Paul Verest from comment #14) > Answer to stackover question > http://stackoverflow.com/questions/25733843/how-to-start-osgi-console/ > 35922571#35922571 suggests a solution Perhaps, for a minimal solution, http://www.eclipse.org/equinox/documents/quickstart-framework.php should link to the solution on SO? But then adopting that change should be close to trivial for anybody with commit rights on Equinox, isn't it? Still serving the broken documentation with no further comments sends a bad message to the community, IMHO. |