Back Forum Reply New

org.apache.commons.logging.LogConfigurationExcepti on

mons.logging.LogConfigurationExcepti  on: java.lang.NullPointerException (Caused by java.lang.NullPointerException) (Caused by org.apache.commons.logging.LogConfigurationExcepti  on: java.lang.NullPointerException (Caused by java.lang.NullPointerException))
at org.apache.commons.logging.impl.LogFactoryImpl.new  Instance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.get  Instance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.get  Instance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFa  ctory.java:351)
at org..beans.factory.support.Abstract  BeanFactory.lt;initgt;(AbstractBeanFactory.java:99)
at org..beans.factory.support.Abstract  AutowireCapableBeanFactory.lt;initgt;(AbstractAutowire  CapableBeanFactory.java:97)
at org..beans.factory.support.Abstract  AutowireCapableBeanFactory.lt;initgt;(AbstractAutowire  CapableBeanFactory.java:106)
at org..beans.factory.support.DefaultL  istableBeanFactory.lt;initgt;(DefaultListableBeanFacto  ry.java:87)
at org..beans.factory.xml.XmlBeanFacto  ry.lt;initgt;(XmlBeanFactory.java:67)
at org..beans.factory.xml.XmlBeanFacto  ry.lt;initgt;(XmlBeanFactory.java:56)
at com.springinaction.chapter01.hello.HelloApp.main(H  elloApp.java:23)
Caused by: org.apache.commons.logging.LogConfigurationExcepti  on: java.lang.NullPointerException (Caused by java.lang.NullPointerException)
at org.apache.commons.logging.impl.LogFactoryImpl.get  LogConstructor(LogFactoryImpl.java:397)
at org.apache.commons.logging.impl.LogFactoryImpl.new  Instance(LogFactoryImpl.java:529)
... 10 more
Caused by: java.lang.NullPointerException
at org.apache.commons.logging.impl.LogFactoryImpl.get  LogConstructor(LogFactoryImpl.java:374)
... 11 more
Exception in thread quot;mainquot;

I could finally solve the problem by copying spring.jar and commons-logging.jar directly in a 'lib' directory under my Project directory ...

Then I declared those jar files in my project classpath instead of doing an external jar files import.

And now it works ... I think that it comes from the fact that I have no build.xml file for building my project with ant. I rely on eclipse for that, and I guess that eclipse requires jar files directly in the project directory !

Hope that might help ohers !

It definitely does - I think you can also specify a library directory when you have multiprojects through a VARIABLE inside Eclipse but you have to do that not just inside the build path but also in the Run configuration. Otherwise the libraries are found for building but not for running.

Hi Costin,

Further to my first quot;work aroundquot; exposed here above, I kept investigating and finally found out that adding 2 CLASSPATH variables in Eclipse (SPRING_HOME and SPRING_HOME_LIB) under Preferences gt; Java gt;  'Classpath variables', enables to have quot;Add External JARsquot; make the apps RUN correctly without adding those JARs to a Lib directory within the project hierarchy ...

But I am sure this is a BASIC function of ECLIPSE that everyone knows already !!!  Just in case a new comer find it usefull ...
¥
Back Forum Reply New