0

I'm getting following errror tomcat 7.0.53 with maven. I used factory="org.apache.commons.dbcp.BasicDataSourceFactory" in Resource tag in server.xml, but don't know why it is picking up the tomcat dbcp.

Why so?

I did some searching in internet and tried different options like adding tomcat-dbcp in maven, adding to the class path etc.. but nothing seems to work.

Where it went wrong ?

WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.BasicDataSourceFactory] Apr 07, 2014 11:39:57 AM org.apache.catalina.mbeans.GlobalResourcesLifecycleListener createMBeans

SEVERE: Exception processing Global JNDI Resources javax.naming.NamingException: Could not load resource factory class

Hitesh
  • 3,092
  • 8
  • 33
  • 50
Curious
  • 889
  • 1
  • 9
  • 21
  • Where do you want to start your tomcat from? (Eclipse, Maven, Integrated Test) – Markus Apr 07 '14 at 06:26
  • From debug of eclipse I had set the parameters in eclipse.-Dcatalina.home="/home/bhadram/stsws/ui/tomcat-7.0.53" -Djava.endorsed.dirs="/home/../ui/tomcat-7.0.53/endorsed" -Dcatalina.base="/home/../ui/tomcat-7.0.53" -Djava.io.tmpdir="/home/../ui/tomcat-7.0.53/temp" -Dfile.encoding=UTF-8 -Xmx1024M -XX:MaxPermSize=200M – Curious Apr 07 '14 at 06:28

1 Answers1

1

I think it is a duplication of this post here: https://stackoverflow.com/a/15880777/2191131

If this does not work, can you try this? Link


Your comment was really helpful because it unveiled the OS :)

Keep me posted on your progress.

Community
  • 1
  • 1
Markus
  • 755
  • 6
  • 23
  • The post in Ubuntu solves the problem.Chaging to org.apache.tomcat.jdbc.pool.DataSourceFactory solves the problem. – Curious Apr 07 '14 at 07:07