Tim and Thomas,

I have passed comments on to Vaadin https://github.com/vaadin/flow/issues/4853

Thanks for your generous input, sooner or later we will have an easy path to using Vaadin, up til now it has been a horror journey.
Flow seems to be a natural technolgy for OSGi purposes as it virtually 
eliminates the gwt hassles.

EnRoute (maven) is also a more natural path for Vaadin apps as it makes inclusion of addons a breeze, whereas in a bnd workspace, addons (for me) have been difficult

Paul


On 16/01/2019 11:28 pm, Thomas Driessen wrote:
Hi Tim,

thanks for the feedback and opening the issue :)

Thomas

------ Originalnachricht ------
Von: "Tim Ward" <tim.w...@paremus.com <mailto:tim.w...@paremus.com>>
An: "Thomas Driessen" <thomas.driessen...@gmail.com 
<mailto:thomas.driessen...@gmail.com>>
Cc: "Paul F Fraser" <pa...@a2zliving.com <mailto:pa...@a2zliving.com>>; "OSGi Developer Mail List" <osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>>
Gesendet: 16.01.2019 12:51:24
Betreff: Re: [osgi-dev] Vaadin flow works in bnd workspace, fails in enRoute 
project

Hi Thomas,

I'm not sure if this can be done in a better way.

The resource registration could definitely be changed to use the Http Service Whiteboard relatively easily. The effective result is that Vaadin would offer a service advertising the resources at the correct locations with the relevant mappings provided by a ServletContextHelper (much like the current “Delegate” does). Overall it may be the case that Vaadin wishes to migrate away from this model as it does seem to mirror the resource registration model from the Http Service Whiteboard.

The only other place that would need to change is in the tests <https://github.com/vaadin/flow/blob/031d9fe8b7fe951658e0369f2a382a67198e3bef/flow-tests/test-root-context/src/main/java/com/vaadin/flow/osgi/Activator.java> and that seems to be a relatively simple swap to register the servlets as services rather than using a service tracker.

Regarding the packaging bug of felix.jetty: Is there an older version of the bundle where this bug is not included, because I remember successfully using felix.jetty for Vaadin once?

The requirement from Vaadin is “effective active” and so won’t prevent the bundles from resolving in an OSGi framework (i.e. this would probably work fine at runtime). The requirement is almost certainly generated automatically by bnd because there is a DS component injected with the service.

Is there a bug repot filed for this bug? Otherwise we should do that.

https://issues.apache.org/jira/browse/FELIX-6029


Tim

On 16 Jan 2019, at 11:34, Thomas Driessen <thomas.driessen...@gmail.com <mailto:thomas.driessen...@gmail.com>> wrote:

Hi Tim, hi Paul,

I think they had some trouble with resources in Vaadin in OSGi (Vaadin makes some specific assumptions oabout the file layout I think) and therefore implemented their own ResourceTracker (https://github.com/vaadin/flow/blob/master/flow-osgi/src/main/java/com/vaadin/flow/osgi/support/VaadinResourceTrackerComponent.java). I'm not sure if this can be done in a better way.

Regarding the packaging bug of felix.jetty: Is there an older version of the bundle where this bug is not included, because I remember successfully using felix.jetty for Vaadin once?
Is there a bug repot filed for this bug? Otherwise we should do that.

Kind regards,
Thomas


------ Originalnachricht ------
Von: "Tim Ward via osgi-dev" <osgi-dev@mail.osgi.org 
<mailto:osgi-dev@mail.osgi.org>>
An: "Paul F Fraser" <pa...@a2zliving.com <mailto:pa...@a2zliving.com>>; "OSGi Developer Mail List" <osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>>
Gesendet: 16.01.2019 12:20:46
Betreff: Re: [osgi-dev] Vaadin flow works in bnd workspace, fails in enRoute 
project

Hi Paul,

The error you’re seeing is a resolution failure because the "com.vaadin.flow.osgi version=1.2.3” bundle has a requirement in the “osgi.service” namespace for the service with interface “org.osgi.service.http.HttpService”. This basically says that the Vaadin flow bundle is trying to use the HttpService in some way, and therefore the exported application needs to include a bundle which provides the HttpService.

Now in fact the Felix Http Jetty implementation used in OSGi enRoute *does* provide this service, however it is missing the metadata from the manifest saying that it provides this service. This is a packaging bug in the Felix Jetty bundle, and is why the resolve fails.

There is a further question, which is why on earth the Vaadin Flow bundle is using the HttpService? It would be better and easier for them to use the Http Whiteboard than to use the old HttpService to provide content…

Best Regards,

Tim

On 16 Jan 2019, at 04:45, Paul F Fraser via osgi-dev <osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>> wrote:

Hi,

Following the process below I have sucessfully managed to run a vaadin flow 
bundle in OSGi.

 1. Create vaadin flow bundle in enroute maven
    project.https://github.com/QNENet/enRouteQNEFlow-0.0.1
 2. Use flow bundle in bnd workspace and export as jar, which of course 
contains all necessary
    dependencies.
 3. java -jar flow.jar  works at
    
localhost:8080https://s3-ap-southeast-2.amazonaws.com/qnenet/vaadinFlow/flow.jar
 4. create application from enRoute archetype
 5. Add all dependencies as used in exported bnd workspace flow.jar
 6. enRoute app fails.

[ERROR] Failed to execute goal biz.aQute.bnd:bnd-export-maven-plugin:4.1.0:export (default) on project flow-app: Unable to resolve <<INITIAL>>: missing requirement osgi.identity;filter:='(osgi.identity=com.vaadin.flow.osgi)' [caused by: Unable to resolve com.vaadin.flow.osgi version=1.2.3: missing requirement osgi.service;filter:='(objectClass=org.osgi.service.http.HttpService)';effective:='active'] -> [Help 1]

Any assistance to solve this last (?) hurdle to having an OSGi work environment for vaadin flow development would be most appreciated.

Thanks

Paul Fraser




_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>
https://mail.osgi.org/mailman/listinfo/osgi-dev


_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to