Mixing Blueprint and Spring namespaces in configuration files [message #990631] |
Thu, 13 December 2012 14:13 |
Sebastian Lorenz Messages: 42 Registered: November 2010 |
Member |
|
|
In the Gemini Reference Documentation (http://www.eclipse.org/gemini/blueprint/documentation/reference/1.0.1.RELEASE/html/blueprint.html) I found the following example configuration:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
<util:constant id="thread-priority" static-field="java.lang.Thread.MIN_PRIORITY"/>
<bean id="exampleThread" class="java.lang.Thread" p:priority-ref="thread-priority">
<constructor-arg>
<bp:bean class="org.example.SomeRunnable"/>
</constructor-arg>
</bean>
<task:executor id="rangeWithBoundedQueue" size="7-42" queue-capacity="#{ T(java.lang.Math).random() * 30.0 }"/>
<bp:reference-list id="cloneableServices" interface="java.lang.Cloneable" />
</beans>
If I try to use this configuration I get an error
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'bp:reference-list'.
For me, mixing Blueprint and Spring namespaces does not work at all. I separated my bundle configuration into two configuration files. One with a Spring namespace and the other with the Blueprint namespace, containing the reference list.
[Updated on: Fri, 14 December 2012 17:06] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03300 seconds