service lookup fails with plan based deployment [message #985657] |
Thu, 15 November 2012 15:54 |
Erik Vande Velde Messages: 82 Registered: September 2012 |
Member |
|
|
In my application I've got a mysql datasource that's deployed in a separate 'infrastructure bundle', and published as a javax.sql.DataSource service. Then a second 'database bundle' uses the service from the other bundle to do some db related stuff. When I deploy both bundles from eclipse everything goes fine (to be on the safe side I wait a bit before deploying the second bundle, so I'm sure the first one is active by then). Now, in deployment mode, I've put both bundles in separate plans, to be able to wait a bit in between activating both plans. The problem is that, no matter how long I wait, the second plan/bundle doesn't find the DataSource service:
===
[2012-11-15 16:22:35.643] service-monitor-thread-1 <KE0100W> Reference '&dat
aSource' in bundle 'gwf_plan_1b_db-2-com.fugro.gwf.dbmanager' version '1.0.0' is
waiting for service with filter '(objectClass=javax.sql.DataSource)'.
[2012-11-15 16:23:35.648] service-monitor-thread-1 <KE0100W> Reference '&dat
aSource' in bundle 'gwf_plan_1b_db-2-com.fugro.gwf.dbmanager' version '1.0.0' is
waiting for service with filter '(objectClass=javax.sql.DataSource)'.
[2012-11-15 16:24:35.653] service-monitor-thread-1 <KE0100W> Reference '&dat
aSource' in bundle 'gwf_plan_1b_db-2-com.fugro.gwf.dbmanager' version '1.0.0' is
waiting for service with filter '(objectClass=javax.sql.DataSource)'.
[2012-11-15 16:25:35.658] service-monitor-thread-1 <KE0100W> Reference '&dat
aSource' in bundle 'gwf_plan_1b_db-2-com.fugro.gwf.dbmanager' version '1.0.0' is
waiting for service with filter '(objectClass=javax.sql.DataSource)'.
[2012-11-15 16:26:30.449] http-bio-8080-exec-5 <DE0502E> Start of plan '
gwf_plan_1b_db' version '2.0.0' has taken longer than the configured timeout of
'300' seconds.
[2012-11-15 16:26:30.650] ng DM Context Creation Timer <AG0000E> Application con
text creation failure for bundle 'gwf_plan_1b_db-2-com.fugro.gwf.dbmanager' vers
ion '1.0.0'. org.springframework.context.ApplicationContextException: Applicatio
n context initialization for 'gwf_plan_1b_db-2-com.fugro.gwf.dbmanager' has time
d out waiting for (objectClass=javax.sql.DataSource)
===
Still I can see in the console that the other bundle is ready to offer this service:
===
osgi> bundle 151
gwf_plan_1_init-2-com.fugro.gwf.infrastructure.mysql_1.0.0 [151]
Id=151, Status=ACTIVE Data Root=C:\programs\virgo-tomcat-server-3.5.0.for_gwf_deployed\work\org.eclipse.osgi\bundles\151\data
"Registered Services"
{javax.sql.DataSource}={org.eclipse.gemini.blueprint.bean.name=dataSource, org.springframework.osgi.bean.name=dataSource, osgi.service.blueprint.compname=dataSource, Bundle-SymbolicName=gwf_plan_1_init-2-com.fugro.gwf.infrastructure.mysql, Bundle-Version=1.0.0, service.id=267}
===
THE QUESTION: why doesn't plan/bundle 2 just use the available service ?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04096 seconds