Unresolved requirement after building CDO server plugin manually [message #1839401] |
Sat, 20 March 2021 01:42  |
Eclipse User |
|
|
|
I'm getting an error during CDO server startup when I replaced a server plugin from the 4.12 distribution with a manually built version of the plugin that I built from the CDO source tree with eclipse. I've updated org.eclipse.net4j.internal.util.bundle.OM to set a pattern for the PrintTraceHandler.CONSOLE to include a date and timestamp for the log.
I used the plugin development tools in eclipse to export the plugin just like I did for the org.eclipse.net4j.db.oracle plugin but when I replace it in the plugins directory I'm getting the error shown below in the configuration log and CDO server fails to start. This is one of many errors for unresolved plugins in the configuration log file, but the core reason seems to be originate from the org.eclipse.net4j.util plugin that I've built from the CDO source master branch. The version of the plugin from CDO 4.12 is 3.13.0 and the plugin I built from the source tree is 3.14.0, but the range of versions for net4j.util from the message seems to be 3.0 to 4.0 so this should work. Do you have any suggestions for how to fix this?
This is one example of the unresolved requirement for this plugin in the log and there are 51 similar entries:
!ENTRY org.eclipse.emf.cdo 4 0 2021-03-19 22:07:37.112
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.emf.cdo [87]
Unresolved requirement: Require-Bundle: org.eclipse.emf.cdo.common; bundle-version="[4.0.0,5.0.0)"; visibility:="reexport"
-> Bundle-SymbolicName: org.eclipse.emf.cdo.common; bundle-version="4.12.0.v20201125-0935"; singleton:="true"
org.eclipse.emf.cdo.common [88]
Unresolved requirement: Require-Bundle: org.eclipse.net4j.util; bundle-version="[3.0.0,4.0.0)"; visibility:="reexport"
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
|
|
|
|
Re: Unresolved requirement after building CDO server plugin manually [message #1839422 is a reply to message #1839404] |
Sat, 20 March 2021 22:11   |
Eclipse User |
|
|
|
I hadn't even heard of the osgi console. Although I may remember seeing it as one of the options on the eclipse console view menu - like the git console. Is there a link you can refer me to for how to use the osgi console to check the state?
One thing I was going to try monday is switching my CDO git branch to the 4.12 release tag (?) and building it again to see if that works.
|
|
|
Re: Unresolved requirement after building CDO server plugin manually [message #1839466 is a reply to message #1839422] |
Mon, 22 March 2021 09:08   |
Eclipse User |
|
|
|
Warwick Burrows wrote on Sat, 20 March 2021 23:11I hadn't even heard of the osgi console. Although I may remember seeing it as one of the options on the eclipse console view menu - like the git console. Is there a link you can refer me to for how to use the osgi console to check the state?
Unfortunately not. You'll need to find something on the web.
Warwick Burrows wrote on Sat, 20 March 2021 23:11One thing I was going to try monday is switching my CDO git branch to the 4.12 release tag (?) and building it again to see if that works.
4.13 is out, too.
What I don't get is why you're trying to rebuild org.eclipse.net4j.util yourself just to set a tracing pattern. Couldn't you just call PrintTraceHandler.CONSOLE.setPattern()? Or even replace PrintTraceHandler.CONSOLE with your own instance of OMTraceHandler?
OMPlatform.INSTANCE.removeTraceHandler(PrintTraceHandler.CONSOLE);
OMPlatform.INSTANCE.addTraceHandler(new PrintTraceHandler()
{
// ...
});
|
|
|
Re: Unresolved requirement after building CDO server plugin manually [message #1839491 is a reply to message #1839466] |
Mon, 22 March 2021 16:07   |
Eclipse User |
|
|
|
Well I do have the PrintTraceHandler setup that way in my client, but the CDO server also doesn't add timestamps to trace messages. Which is why I changed the trace setup in org.eclipse.net4j.util to add a timestamp to the front of the trace messages. e.g. in OM.java Activator.start(). The TODO note to make this configurable has been there in the source tree since CDO 4.1 :-)
// TODO Make configurable
PrintTraceHandler.CONSOLE.setPattern("{4,date,yyyy-MM-dd HH:mm:ss.SSS z} -- {6} [{0}] {5}"); //$NON-NLS-1$
AbstractPlatform.INSTANCE.addTraceHandler(PrintTraceHandler.CONSOLE);
AbstractPlatform.INSTANCE.addLogHandler(PrintLogHandler.CONSOLE);
|
|
|
|
Re: Unresolved requirement after building CDO server plugin manually [message #1839526 is a reply to message #1839491] |
Tue, 23 March 2021 11:26   |
Eclipse User |
|
|
|
Warwick Burrows wrote on Mon, 22 March 2021 17:07Well I do have the PrintTraceHandler setup that way in my client, but the CDO server also doesn't add timestamps to trace messages. Which is why I changed the trace setup in org.eclipse.net4j.util to add a timestamp to the front of the trace messages. e.g. in OM.java Activator.start(). The TODO note to make this configurable has been there in the source tree since CDO 4.1 :-)
You can contribute a custom IAppExtension with your server. There you can replace the trace handler just like in your client.
|
|
|
Re: Unresolved requirement after building CDO server plugin manually [message #1839527 is a reply to message #1839493] |
Tue, 23 March 2021 11:27   |
Eclipse User |
|
|
|
Warwick Burrows wrote on Mon, 22 March 2021 17:49Problem solved. There must be a plugin that is referencing that exact version of the org.eclipse.net4j.util plugin. When I rebuilt the plugin with the exact version and qualifier of the original plugin then it works.
As I said before, only features refer to exact plugin versions, but anyways... ;-)
|
|
|
Re: Unresolved requirement after building CDO server plugin manually [message #1839569 is a reply to message #1839526] |
Wed, 24 March 2021 03:21  |
Eclipse User |
|
|
|
Quote:
As I said before, only features refer to exact plugin versions, but anyways... ;-)
Sorry I should have checked the features.
Quote:
You can contribute a custom IAppExtension with your server. There you can replace the trace handler just like in your client.
I'll look into that after 4.12 is successfully in production. It will definitely make subsequent CDO server upgrades easier.
|
|
|
Powered by
FUDForum. Page generated in 0.04206 seconds