On 8/27/07, Martin Novák <[EMAIL PROTECTED]> wrote:
> Hello, I have a problem running my servicemix unit test. I have a
> servicemix spring configuration file which is something like that:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:sm="http://servicemix.apache.org/config/1.0"
> xmlns:rest="http://www.browsersoft.com/mergence/rest/1.0"
> xmlns:test="urn:test"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://servicemix.apache.org/config/1.0
> http://people.apache.org/repo/m2-incubating-repository/org/apache/servicemix/servicemix-core/3.1-incubating/servicemix-core-3.1-incubating.xsd"
> >
> <sm:container id="jbi" embedded="true" createMBeanServer="false"
> createJmxConnector="false">
> <sm:activationSpecs>
> <sm:activationSpec id="rest">
> <sm:component>
> <bean class="com.browsersoft.mergence.rest.RestEndpoint"></bean>
> </sm:component>
> </sm:activationSpec>
>
> </sm:activationSpecs>
> </sm:container>
> </beans>
>
> It seems to be to be ok, but when I run my test derived from
> SpringTestSupport class, it has a problem:
>
> org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
> Line 46 in XML document from class path resource [rest-test-context.xml]
> is invalid; nested exception is org.xml.sax.SAXParseException:
> cvc-complex-type.2.4.b: The content of element 'sm:activationSpec' is
> not complete. One of
> '{"http://servicemix.apache.org/config/1.0":destinationResolver,
> "http://servicemix.apache.org/config/1.0":interfaceChooser,
> "http://servicemix.apache.org/config/1.0":marshaler,
> "http://servicemix.apache.org/config/1.0":persistent,
> "http://servicemix.apache.org/config/1.0":serviceChooser,
> "http://servicemix.apache.org/config/1.0":subscriptions,
> WC[##other:"http://servicemix.apache.org/config/1.0"]}' is expected.
The error above says it all - the content of the activationSpec
element is incomplete. Try replacing the id attribute on the
activationSpec to componentName. See the basic example that comes with
ServiceMix for an example of a lightweight configuration.
Bruce
--
perl -e 'print unpack("u30","D0G)[EMAIL
PROTECTED]&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/