Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 07:11 Go to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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 16:42 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 546
Registered: November 2009
Senior Member
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 17:02 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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 17:59 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 546
Registered: November 2009
Senior Member
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 18:01]

Report message to a moderator

Re: Capturing OSGI startup issues in RCP [message #1802757 is a reply to message #1802731] Fri, 15 February 2019 08:59 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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 09:00 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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 17:09 Go to previous messageGo to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 546
Registered: November 2009
Senior Member
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] Mon, 18 February 2019 04:14 Go to previous message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 87
Registered: July 2009
Member
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: Mon Aug 10 08:56:23 GMT 2020

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

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

Back to the top