I think you misunderstand how
Java works. You are missing, at the very least, the Apache Commons Logging library, as indicated by the error message. You (presumably) are nit compiling Hibernate. Hibernate has a dependency on commons-logging. The code *you* have written does not, so when you compile *your* code, you don't need it.
But your application depends both on your code, *and* on Hibernate: thus your application has a dependency on commons-logging. This is a "transitive dependency". The error message is quite clear: you are missing commons-logging. You may be missing other dependencies as well.