The matter is that jars are no longer installed in lib directory and that we need to modify two strings where the old path appears. See https://github.com/apache/cassandra/blob/cassandra-1.2.13/bin/cassandra.in.sh. So the old gsub was modifying only one string and not the JAVA_AGENT variable