Thanks for the example, I found the error. I used "my-bundle" as
persistent-id. It seems that "-" are not allowed.
Thanks for your quick help!
Regards,
Laci
Am 26.01.2016 um 17:16 schrieb Jean-Baptiste Onofré:
Can you share your blueprint.xml ?
It should work (an example is there:
https://github.com/apache/karaf/blob/karaf-2.x/management/server/src/main/resources/OSGI-INF/blueprint/karaf-management.xml)
Regards
JB
On 01/26/2016 05:06 PM, Laci Gaspar wrote:
Hi JB, that was fast!
refreshing doesn't help.
After installing the bundle is in Failure state, then I do refresh and I
get a stacktrace:
...
Caused by: java.net.UnknownHostException: ${serverName}
I'm using karaf 2.3.3... sorry
Regards,
Laci
Am 26.01.2016 um 17:00 schrieb Jean-Baptiste Onofré:
Hi Laci,
can you try to refresh the blueprint bundle once the cfg file is
there ?
Regards
JB
On 01/26/2016 04:59 PM, Laci Gaspar wrote:
Hi
Im trying to use the property-placeholder in my blueprint.xml
configuration:
<cm:property-placeholder persistent-id="mybundle"
update-strategy="reload">
<cm:default-properties>
<cm:property name="serverName" value="jupiter" />
</cm:default-properties>
</cm:property-placeholder>
<bean id="dataSource"
class="org.postgresql.ds.PGSimpleDataSource" >
<property name="serverName" value="${serverName}"/>
...
In ${karaf.home}/etc/mybundle.cfg I have:
serverName=localhost
The property serverName is not reading the value in the cfg file,
it is
always the default value "jupiter".
What am I missing?
thanks,
Laci