Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Frameworks
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Other Application Frameworks
Spring :Unexpected exception parsing XML document from class path resource
Abiodun Adisa
Ranch Hand
Posts: 495
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am using Spring 2 and running the following code to obtain the factory
BeanFactory factory=new XmlBeanFactory(new ClassPathResource("applicationContext.xml")); ITest iTest=(ITest) factory.getBean("text");
and i am getting the error below
20:10:23,312 INFO [STDOUT] 20:10:23,312 INFO [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [applicationContext.xml] 20:10:36,406 INFO [STDOUT] 20:10:36,406 ERROR [SeamPhaseListener] uncaught exception javax.el.ELException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.IllegalArgumentException: Class [org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler] does not implement the NamespaceHandler interface at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333) at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:342) at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58) at org.jboss.el.parser.AstValue.invoke(AstValue.java:96) at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173) at org.jboss.seam.navigation.Pages.callAction(Pages.java:643) at org.jboss.seam.navigation.Pages.preRender(Pages.java:296) at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:560) at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:471) at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:144)
Please any suggestion would be appreciated
Mark Spritzler
ranger
Posts: 17347
11
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Well it appears that it is having problems reading in the applicationContext.xml and creating the BeanDefinition classes based on your xml.
Please post your applicationContext.xml
Also, any particular reason you are using the BeanFactory implementation class instead of an ApplicationContext implementation class?
Mark
Perfect World Programming, LLC
-
iOS Apps
How to Ask Questions the Smart Way FAQ
Abiodun Adisa
Ranch Hand
Posts: 495
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks folks i switched to ApplicationContext and now everything is working
ServletContext sc=super.getServletContext(); ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(sc);
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
spring inside eclipse
Why cannot ApplicationContext find an existing file?
Simple Spring Junit -
JMS implementation using JNDI in spring application
Seam: Misterious ClassCastExceptions during EJB use
More...