Abe,
If that listing of your composite is what you are using now, then you should change the schema
location of
http://www.springframework.org/schema/sca
to be:
http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd
ie, your schemaLocation should look something like this:
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/sca
http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"
...the schema is at that location so it should get found.
In the longer run we are getting the namespace changed to an OASIS one, but
it will take a few weeks to achieve that as formal OASIS votes are required.
Best wishes,
Yours, Mike.
Abraham Washington wrote:
hi Mike...I tried running my composite, but no luck. I changed the
composite to be:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sca="http://www.springframework.org/schema/sca"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/sca
http://www.springframework.org/schema/sca/spring-sca.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
......
And that's all I changed. Is there a fix in a branch I'm supposed to
get somewhere ??
Here's the error an how I'm trying to get the bean:
org.soa.services.util.Utils./getApplicationContext/().getBean("dataSource");
* *
*public* *static* org.springframework.context.ApplicationContext
getApplicationContext()
{
org.springframework.context.ApplicationContext applicationContext =
(org.springframework.context.ApplicationContext)
org.springframework.context.access.ContextSingletonBeanFactoryLocator./getInstance/("beanRefFactory.xml").useBeanFactory("beanRefFactory").getFactory();
*return* applicationContext;
}
And the error:
OrganizationServiceImpl.saveoOrganization...
Exception in thread "main" _java.lang.reflect.UndeclaredThrowableException_
at $Proxy19.saveOrganization(Unknown Source)
at
org.soa.services.test.DCRIOrganizationServiceCompositeRunner.main(_OrganizationServiceCompositeRunner.java:62_)
Caused by: _java.lang.reflect.InvocationTargetException_
at sun.reflect.NativeMethodAccessorImpl.invoke0(_Native Method_)
at
sun.reflect.NativeMethodAccessorImpl.invoke(_NativeMethodAccessorImpl.java:39_)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(_DelegatingMethodAccessorImpl.java:25_)
at java.lang.reflect.Method.invoke(_Method.java:585_)
at
org.apache.tuscany.sca.implementation.spring.SpringInvoker.doInvoke(_SpringInvoker.java:100_)
at
org.apache.tuscany.sca.implementation.spring.SpringInvoker.invoke(_SpringInvoker.java:116_)
at
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(_PassByValueInterceptor.java:112_)
at
org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(_SCABindingInvoker.java:61_)
at
org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(_PassByValueInterceptor.java:112_)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(_JDKInvocationHandler.java:287_)
at
org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(_JDKInvocationHandler.java:154_)
... 2 more
Caused by:
_org.springframework.beans.factory.access.BootstrapException_: Unable to
initialize group definition. Group resource name
[classpath*:beanRefFactory.xml], factory key [beanRefFactory]; nested
exception is _org.springframework.beans.factory.BeanCreationException_:
Error creating bean with name 'beanRefFactory' defined in URL
[file:/C:/work/development/Organization-Service-Composite/src/main/resources/beanRefFactory.xml]:
Instantiation of bean failed; nested exception is
_org.springframework.beans.BeanInstantiationException_: Could not
instantiate bean class
[org.springframework.context.support.ClassPathXmlApplicationContext]:
Constructor threw exception; nested exception is
_org.springframework.beans.factory.parsing.BeanDefinitionParsingException_:
Configuration problem: Unable to locate NamespaceHandler for namespace
[http://www.springframework.org/schema/sca]
Offending resource: class path resource [Organization-spring-context.xml]
at
org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(_SingletonBeanFactoryLocator.java:383_)
at org.soa.services.util.Utils.getApplicationContext(_Utils.java:24_)
thx abe
h