ctron / kura-addons

Addons for Eclipse Kura™
Apache License 2.0
6 stars 4 forks source link

Compatibility with Kura 5.0 #6

Closed pintify closed 3 years ago

pintify commented 3 years ago

I'm starting to test the camel addons in Kura 5.0 (still release candidate) and I've found that the bundles fail to be initiated with this error:

2021-09-23T11:44:16,008 [qtp19652137-1759] ERROR o.e.k.w.s.GwtDeviceServiceImpl - Failed to start bundle 190
org.osgi.framework.BundleException: Could not resolve module: org.apache.camel.camel-gson [190]
  Unresolved requirement: Import-Package: org.apache.camel; version="[2.21.0,2.22.0)"

    at org.eclipse.osgi.container.Module.start(Module.java:463)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:439)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:458)
    at org.eclipse.kura.web.server.GwtDeviceServiceImpl.startBundle(GwtDeviceServiceImpl.java:241)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)
    at org.eclipse.kura.web.server.OsgiRemoteServiceServlet.processCall(OsgiRemoteServiceServlet.java:208)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

I've achieved the package to work perfectly only changing the version of all Camel dependencies to [2.21.0,2.26.0) as current version is 2.25.3. I guess there is a better approach, particularly from source.

Would it be possible to perform such change to have it published on Maven?

Thks!

ctron commented 3 years ago

Indeed I think ticking up the version in the maven build for the camel plugin should be fine. If you want to submit a PR, I can build and release it.

pintify commented 3 years ago

You mean changing

<camel-version>2.21.2</camel-version>

to:

<camel-version>2.25.3</camel-version>

in main pom.xml??

But then the bundle won't be backwards compatible with Kura 4, will it?

ctron commented 3 years ago

Yea, I guess it is that easy :)

But then the bundle won't be backwards compatible with Kura 4, will it?

True. Still the older version would still be available.

An alternative could be to duplicate the addon, for Kura 5.

ctron commented 3 years ago

I think we can close this, thanks to your PR :grinning:

pintify commented 3 years ago

Oh, sorry, I thought you would close it. Yeah, everything is working fine, thks!