As mentioned in the error, there's another instance of Derby running.
To solve this, find the running instance and kill it.
ps -ef | grep spark-shell
kill -9 processID
Replace processID with the ID of the spark shell process. This should solve the problem.