• 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

The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guru,

I am newbie to apache camel. I'm now trying to test bean injection in spring using java. I used following code and it gives me error:

ApplicationContext context =
new ClassPathXmlApplicationContext("routes.xml");

The error is about "The constructor ClassPathXmlApplicationContext(String) refers to the missing type BeansException"

Please advise me how to resolve this issue.

Thank you in advance,
Claire
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hopefully routes.xml is a valid Spring context file...

Anyway the error you are seeing sounds like you have missing or corrupt jars on your classpath. Use maven to manage your dependencies and make sure everything Spring requires is there. I think BeansException comes from the spring-beans jar. Also make sure you use the same version for all jars.
reply
    Bookmark Topic Watch Topic
  • New Topic