Wiki

Clone wiki

BibSonomy / development / MemoryLeak

NOTE: Might be deprecated since most of the links refer to Tomcat 5.5 related issues

General URLs:

Bugs in libraries

To do

Adapt Tomcat

  • copy xercesImpl-2.9.1.jar to common/lib
  • copy mysql-connector-java-5.0.8.jar to common/lib
    • mysql-connector-java-5.0.8.jar and mysql-connector-java-5.1.7.jar are not compatible - 5.1.7 does not contain ResultSet any more!
    • the mysql-driver has to reside in common/lib (not in WEB-INF/lib), otherwise the DBCP cannot load the class

hence common/lib should look like this:

commons-el.jar
commons-logging-1.1.1.jar
jasper-compiler.jar
jasper-compiler-jdt.jar
jasper-runtime.jar
jsp-api.jar
log4j-1.2.14.jar
mysql-connector-java-5.0.8.jar
naming-factory-dbcp.jar
naming-factory.jar
naming-resources.jar
servlet-api.jar
xercesImpl-2.9.1.jar
  • delete commons-dbcp-1.2.2.jar and commons-pool-1.3.jar from server/lib
  • create bibsonomy-util-jar from the project root/bibsonomy-util and copy it to server/lib. It should then look like this
bibsonomy-util-2.0.1.jar
catalina-ant.jar
catalina-ant-jmx.jar
catalina-cluster.jar
catalina.jar
catalina-optional.jar
catalina-storeconfig.jar
commons-modeler-2.0.1.jar
servlets-cgi.renametojar
servlets-default.jar
servlets-invoker.jar
servlets-ssi.renametojar
servlets-webdav.jar
tomcat-ajp.jar
tomcat-apr.jar
tomcat-coyote.jar
tomcat-http.jar
tomcat-jkstatus-ant.jar
tomcat-util.jar
  • change the factory-class in conf/context.xml in the resource definitions from
org.apache.commons.dbcp.BasicDataSourceFactory

to

org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory

and inser the following listener

<!-- rja, 2009-01-29; cleans up the MySQL cancellation timers. See source for more info -->
<Listener className="org.bibsonomy.util.tomcat.listener.CleanupListener"
  dbUrl="jdbc:mysql://gromit/bibsonomy?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;mysqlEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;enableQueryTimeouts=false"
  dbUser="bibsonomy"
  dbPass="***" <!-- no changes to this line... "***" means keep the pass as it was -->
/>

Updated