ashok Priyadarshan
asked on
APACHE DERBY with spring framework is displaying: Could not load JDBC driver class [org.apache.derby.jdbc.ClientDriver]
nested exception is java.lang.IllegalStateExce ption: Could not load JDBC driver class [org.apache.derby.jdbc.Cli entDriver]
I am trying to create a spring application to access a apache derby db.
Here is the full message
org.springframework.beans. factory.Be anCreation Exception:
Error creating bean with name 'homeController': Injection of autowired dependencies failed;
nested exception is org.springframework.beans. factory.Be anCreation Exception: Could not autowire field:
private net.codejava.spring.dao.Co ntactDAO net.codejava.spring.contro ller.HomeC ontroller. contactDAO ;
nested exception is org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'getContactDAO' defined in class path resource [net/codejava/spring/confi g/MvcConfi guration.c lass]:
Instantiation of bean failed; nested exception is org.springframework.beans. factory.Be anDefiniti onStoreExc eption: Factory method [public net.codejava.spring.dao.Co ntactDAO net.codejava.spring.config .MvcConfig uration.ge tContactDA O()] threw exception; nested exception is org.springframework.beans. factory.Be anCreation Exception: Error creating bean with name 'getDataSource' defined in class path resource [net/codejava/spring/confi g/MvcConfi guration.c lass]:
Instantiation of bean failed; nested exception is org.springframework.beans. factory.Be anDefiniti onStoreExc eption: Factory method [public javax.sql.DataSource net.codejava.spring.config .MvcConfig uration.ge tDataSourc e()] threw exception;
nested exception is java.lang.IllegalStateExce ption: Could not load JDBC driver class [org.apache.derby.jdbc.Cli entDriver]
SAME WORKS ON WINDOWS without a flaw.
am I missing some entry in the pom or windows pulling some jdbc that I cannot see....
I am trying to create a spring application to access a apache derby db.
Here is the full message
org.springframework.beans.
Error creating bean with name 'homeController': Injection of autowired dependencies failed;
nested exception is org.springframework.beans.
private net.codejava.spring.dao.Co
nested exception is org.springframework.beans.
Instantiation of bean failed; nested exception is org.springframework.beans.
Instantiation of bean failed; nested exception is org.springframework.beans.
nested exception is java.lang.IllegalStateExce
SAME WORKS ON WINDOWS without a flaw.
am I missing some entry in the pom or windows pulling some jdbc that I cannot see....
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
It looks like the Derby driver isn't in the project's classpath.
Right click on the project --> properties --> Libraries --> Add library --> JavaDB driver
Cheers