Saturday, January 15, 2011

NullPointerException when creating Spring Bean

If the class name of the Bean is missed (for some reason )in the context file,it gives rise to NullPointerException by the factory.The stack trace was like
Caused by: java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:157)
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:730)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:186)

No comments:

Post a Comment