What are the exact xbean jars in your classpath ?
Also do you use the spring ClassPathXmlApplicationContext or
the xbean one ?
On 12/4/06, Paul Austin <[EMAIL PROTECTED]> wrote:
Hi,
When I try and execute the following code using Xbean 2.7 + spring
2.0/2.0.1
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"test/com/revolsys/core/ui/html/config/web-config.xml");
I get the following exception, which is caused by the method
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.setValidationMode(I)V
not being available in spring 2.0.
java.lang.IllegalStateException: Could not find valid implementation for: 2.0
at
org.apache.xbean.spring.context.impl.XBeanHelper.createBeanDefinitionReader(XBeanHelper.java:48)
at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.loadBeanDefinitions(ClassPathXmlApplicationContext.java:170)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
at
org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
at
test.com.revolsys.core.ui.html.config.WebConfigTest.testLoadConfig(WebConfigTest.java:25)
...
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at
org.apache.xbean.spring.context.impl.XBeanHelper.createBeanDefinitionReader(XBeanHelper.java:46)
... 24 more
Caused by: java.lang.NoSuchMethodError:
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.setValidationMode(I)V
at
org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.<init>(XBeanXmlBeanDefinitionReader.java:58)
... 29 more
I saw there was an issue with spring 2.0 but I thought this had been
fixed in xbean release 2.7
any ideas?
Paul
--
Cheers,
Guillaume Nodet