Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] Starting bundles automatically using plans

> Hmmm. Something's gone wrong it seems. Please paste the event log messages or, equivalently the console and we'll take a look.

I used a fresh installation to reproduce the STARTING scenario. Same result...the logs capture the following steps

step 1 - install Virgo Kernel and put bundles and plans into repository/usr
step 2 - start Virgo Kernel
step 3 - restart after enabling the OSGi console
step 4 - manually start HttpService
step 5 - shutdown

> You may like to look for exceptions in serviceability/logs/log.log too in case of some serious failure.

Looks fine to me.

> grep Exception log.log
[2010-10-28 15:19:13.618] region-dm-2                  .a.d.i.BlueprintEventPostingOsgiBundleApplicationContextListener  Failed to send event to topic 'org/osgi/service/blueprint/container/DESTROYED'. Exception message: 'The EventAdmin is stopped'. This may be expected during shutdown. Turn on debug logging for more details. 
[2010-10-28 15:24:44.208] region-dm-2                  .a.d.i.BlueprintEventPostingOsgiBundleApplicationContextListener  Failed to send event to topic 'org/osgi/service/blueprint/container/DESTROYED'. Exception message: 'The EventAdmin is stopped'. This may be expected during shutdown. Turn on debug logging for more details. 

Attachment: serviceability-1.zip
Description: Zip archive



-----

But....things change when i tried the following workaround: A bundle starting all available bundles in the OSGi container (http://equinoxosgi.org/): org.equinoxosgi.core.autostart

step 6 - add autostart bundle to repository/usr
step 7 - add autostart bundle to plan in pickup directory

After a lot of Exceptions during redeployment: (@see 2nd serviceability.zip) everything seems to be in place now:

> grep Exception log.log | wc -l
      19

Attachment: serviceability-2.zip
Description: Zip archive


[2010-10-28 15:59:32.491] start-signalling-7           <DE0005I> Started plan 'vigo-equinox-extensions' version '3.6.1'. 
[2010-10-28 15:59:32.491] start-signalling-6           <DE0005I> Started bundle 'org.eclipse.rap.ui.views' version '1.3.1.20100915-2301'. 
[2010-10-28 15:59:32.507] start-signalling-7           <DE0005I> Started bundle 'org.equinoxosgi.core.autostart' version '1.0.0'. 
[2010-10-28 15:59:32.507] start-signalling-6           <DE0005I> Started plan 'virgo-rap-extensions' version '1.3.1'. 
[2010-10-28 15:59:32.507] start-signalling-8           <DE0005I> Started bundle 'org.eclipse.rap.demo' version '1.3.1.20100915-2301'. 
[2010-10-28 15:59:32.515] start-signalling-7           <DE0005I> Started plan 'virgo-rap-demo' version '1.3.1'. 

osgi> vsh plan list

Name                                         Version                       State
org.eclipse.virgo.kernel.userregion.springdm 2.1.0                        ACTIVE
vigo-equinox-extensions                      3.6.1                        ACTIVE
virgo-rap-demo                               1.3.1                        ACTIVE
virgo-rap-extensions                         1.3.1                        ACTIVE

And the RAP demo is directly available via browser: http://localhost:10081/rap?startup=layout


Regards,
  Florian

> 
> Regards,
> Glyn
> 
> On 28 Oct 2010, at 13:33, Florian Waibel wrote:
> 
> Reading https://bugs.eclipse.org/bugs/show_bug.cgi?id=324445 I see you are deploying by dropping the plan into pickup. This should start the plan after installing it. What is the state of the plan as shown by:
> 
> osgi> plan list
> 
> 
> osgi> vsh plan list
> 
> Name                                         Version                       State
> org.eclipse.virgo.kernel.userregion.springdm 2.1.0                        ACTIVE
> vigo-equinox-extensions                      3.6.1                      STARTING
> virgo-rap-demo                               1.3.1                      STARTING
> virgo-rap-extensions                         1.3.1                      STARTING
> 
> STARTING ?!
> 
> That's what i did so far:
> 
> Add the required bundles and the two plans vi[r]go-*-extensions  :-) into the ${SERVER_HOME}/repository/usr  -
> then a third plan containing these three artifacts:
> 
> <artifact type="plan" name="vigo-equinox-extensions" version="[3.6.1, 4.0.0)" />
> <artifact type="plan" name="virgo-rap-extensions" version="[1.3.1, 2.0.0)" />
> <artifact type="bundle" name="org.eclipse.rap.demo" version="[1.3.1, 2.0.0)" />
> 
> into the pickup directory.
> 
> ?
> 
> Perhaps this is an effect of lazy start??
> 
> Regards,
> Glyn
> 
> On 28 Oct 2010, at 13:14, Glyn Normington wrote:
> 
> Hi Florian
> 
> I'm afraid not.
> 
> There is no "vsh deploy" subcommand which would achieve the equivalent result to using the admin console in the Virgo web server. so maybe we should add one. Feel free to log an enhancement bug.
> 
> However, you can start the plan after installing it:
> 
> osgi> vsh plan start <planname> <planversion>
> 
> Better than nothing I guess. Shame we don't have tab completion for the Equinox console (extension) yet.
> 
> Regards,
> Glyn
> 
> On 28 Oct 2010, at 12:42, Florian Waibel wrote:
> 
> Hi,
> 
> today i prepared a plan to run RAP applications on Virgo Kernel. This plan includes
> 
> <artifact type="bundle" name="org.eclipse.equinox.http.jetty" version="[2.0.0, 3.0.0)" />
> 
> providing an OSGi HTTP Service. After the deployment the bundle is lazy...
> 
> osgi> ss
> ...
> 33 <<LAZY>>    org.eclipse.equinox.http.jetty_2.0.0.v20100503
> ...
> 
> osgi> services (objectClass=*HttpService)
> No registered services.
> 
> 
> Starting the HttpService manually works fine. The RAP workbench is now using the HttpService:
> 
> osgi> start 33
> 
> osgi> services (objectClass=*HttpService)
> {org.osgi.service.http.HttpService, org.eclipse.equinox.http.servlet.ExtendedHttpService}={service.description=Equinox Jetty-based Http Service, service.vendor=Eclipse.org, http.port=10081, service.id=74}
> Registered by bundle: org.eclipse.equinox.http.servlet_1.1.0.v20100503 [32]
> Bundles using service:
>  org.eclipse.equinox.http.registry_1.1.0.v20100503 [31]
>  org.eclipse.rap.ui.workbench_1.3.1.20100915-2301 [37]
> 
> 
> Is there a way to start a bundle during deployment? I can't find
> a tag startup="true" or something alike in the documentation.
> 
> Thanks a lot,
> Florian
> 
> <ATT00001..txt>
> 
> _______________________________________________
> virgo-dev mailing list
> virgo-dev@xxxxxxxxxxx<mailto:virgo-dev@xxxxxxxxxxx>
> https://dev.eclipse.org/mailman/listinfo/virgo-dev
> 
> _______________________________________________
> virgo-dev mailing list
> virgo-dev@xxxxxxxxxxx<mailto:virgo-dev@xxxxxxxxxxx>
> https://dev.eclipse.org/mailman/listinfo/virgo-dev
> 
> <ATT00001..txt>
> 
> _______________________________________________
> virgo-dev mailing list
> virgo-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/virgo-dev


Back to the top