2015年9月17日 星期四

tomcat 改 content.xml 之後壞掉


Cannot create JDBC driver of class '' for connect URL 'null'



As answered above, one solution is to move the entries to $CATALINA_BASE/conf/context.xml
In particular, "Copy the Context.xml file to tomcat/conf/Catalina/localhost folder and renaming it to <web_app_name>.xml"
The underlying cause could be due to a problem with file permissions: "The user under which tomcat was running did not have permission to write to these folders. So we changed the group ownership of tomcat and /etc/tomcat folder to the same group to which the tomcat user belonged and magically everything started working as before."
This solution seems 'cleaner' to me because you can then have your entire web app including database connection properties wrapped up in a .war file.











ref
http://stackoverflow.com/questions/7274722/cannot-create-jdbc-driver-of-class-for-connect-url-null