Solution:
The syntax is not correct for executing a database query, function, procedure, or package. Make corrections to your query.
Like -
CallableStatement call = con.prepareCall("{call docnumber_generation(?,?,?,?,?,?,?,?)}");
// Here inside string 'call' is important to call the procedure