Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Capturing OSGI startup issues in RCP (Capturing OSGI startup issues in RCP )
Capturing OSGI startup issues in RCP [message #1802692] Thu, 14 February 2019 02:11 Go to next message
Eclipse UserFriend
Hello,

Is there any hook to capture OSGI startup issues before starting the Eclipse RCP appilcation, Can we add any hook to inform the user with custom messages.Advance thanks for your support.



For example start up errors:

case 1:
]$ java.lang.IllegalArgumentException: Buffer size <= 0
at java.io.BufferedInputStream.<init>(BufferedInputStream.java:201)
at org.eclipse.osgi.framework.internal.reliablefile.ReliableFile.getInputStream(ReliableFile.java:272)
at org.eclipse.osgi.framework.internal.reliablefile.ReliableFileInputStream.<init>(ReliableFileInputStream.java:92)
at org.eclipse.osgi.framework.internal.reliablefile.ReliableFileInputStream.<init>(ReliableFileInputStream.java:66)
at org.eclipse.osgi.storagemanager.StorageManager.updateTable(StorageManager.java:487)
at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:708)
at org.eclipse.osgi.storage.Storage.getChildStorageManager(Storage.java:1792)
at org.eclipse.osgi.storage.Storage.getInfoInputStream(Storage.java:1809)
at org.eclipse.osgi.storage.Storage.<init>(Storage.java:129)
at org.eclipse.osgi.storage.Storage.createStorage(Storage.java:88)
at org.eclipse.osgi.internal.framework.EquinoxContainer.<init>(EquinoxContainer.java:66)

case 2:
java.io.IOException: Unable to initialize osgi.frameworkClassPath
at org.eclipse.equinox.launcher.Main.addBaseJars(Main.java:936)
at org.eclipse.equinox.launcher.Main.getDevPath(Main.java:822)
at org.eclipse.equinox.launcher.Main.getBootPath(Main.java:1020)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:570)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Re: Capturing OSGI startup issues in RCP [message #1802724 is a reply to message #1802692] Thu, 14 February 2019 11:42 Go to previous messageGo to next message
Eclipse UserFriend
Have you checked error logs? These errors mean something is wrong with starting Eclipse and error logs might help.
Re: Capturing OSGI startup issues in RCP [message #1802727 is a reply to message #1802724] Thu, 14 February 2019 12:02 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alex Kravets,

Thanks for your reply.

I am talking about capturing those errors from Custom code & inform the user in controlled way.

As we can have hook configurators,those can be contributed through OSGI fragment.
In Similar line can we add any hook to capture those errors from Custom code.

Thanks,
Raghava Rao
Re: Capturing OSGI startup issues in RCP [message #1802731 is a reply to message #1802727] Thu, 14 February 2019 12:59 Go to previous messageGo to next message
Eclipse UserFriend
You can use org.eclipse.ui.startup extension point to execute your custom code during Eclipse starting phase: https://wiki.eclipse.org/FAQ_Can_I_activate_my_plug-in_when_the_workbench_starts%3F and https://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fui%2FIStartup.html talk more about this.

You can also control your startup plugin's loading time by manipulating configuration section of your product - since you said you are working with RCP, it may be product based:

Quote:

<plugin id="com.iwaysoftware.eclipse.startup" autoStart="true" startLevel="5" />
<plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="3" />
<plugin id="org.eclipse.equinox.common" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="2" />
<plugin id="org.eclipse.equinox.p2.reconciler.dropins" autoStart="true" startLevel="4" />
<plugin id="org.eclipse.equinox.simpleconfigurator" autoStart="true" startLevel="1" />
<plugin id="org.eclipse.update.configurator" autoStart="true" startLevel="3" />


Here we are loading our com.iwaysoftware.eclipse.startup last, but the startLevel can be changed to meet your needs.

HTH,
Alex

[Updated on: Thu, 14 February 2019 13:01] by Moderator

Re: Capturing OSGI startup issues in RCP [message #1802757 is a reply to message #1802731] Fri, 15 February 2019 03:59 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alex,

Thanks for your detailed reply.

As Suggested,We have provision to do some process After starting the Workbench with the help of org.eclipse.ui.startup -->earlyStartup().

But We wanted to Customize the messages for exceptions thrown from org.eclipse.osgi.internal.framework.EquinoxContainer. RCP appilcation will not be called by that time.(Workbench will not be created )

We could able to filter some of the bundles with hook configurators,those can be contributed through org.eclipse.osgi fragment.

Similarly Can you please suggest on those lines.

Hope I could able to communicate the requirement.


Thanks,
Raghava Rao
Re: Capturing OSGI startup issues in RCP [message #1802758 is a reply to message #1802731] Fri, 15 February 2019 04:00 Go to previous messageGo to next message
Eclipse UserFriend
Hello Alex,

Thanks for your detailed reply.

As Suggested,We have provision to do some process After starting the Workbench with the help of org.eclipse.ui.startup -->earlyStartup().

But We wanted to Customize the messages for exceptions thrown from org.eclipse.osgi.internal.framework.EquinoxContainer. RCP appilcation will not be called by that time.(Workbench will not be created )

We could able to filter some of the bundles with hook configurators,those can be contributed through org.eclipse.osgi fragment.

Similarly Can you please suggest on those lines.

Hope I could able to communicate the requirement.


Thanks,
Raghava Rao
Re: Capturing OSGI startup issues in RCP [message #1802783 is a reply to message #1802758] Fri, 15 February 2019 12:09 Go to previous messageGo to next message
Eclipse UserFriend
Sure you can try using fragments to alter the messages.
Re: Capturing OSGI startup issues in RCP [message #1802839 is a reply to message #1802783] Sun, 17 February 2019 23:14 Go to previous message
Eclipse UserFriend
Hello Alex,

Can you please suggest on this, How to take control of OSGI equinox startup code with fragment.

Thanks,
Raghava Rao
Previous Topic:Uninstalling plugin during update
Next Topic:Content assist: Disable "No Default Proposals"-Message
Goto Forum:
  


Current Time: Sun May 11 14:55:09 EDT 2025

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

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

Back to the top