Announcement Announcement Module
Collapse
No announcement yet.
jpetstore mysql connection problem (Unknown database) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • jpetstore mysql connection problem (Unknown database)

    I'm trying to get the jpetstore example to work with mysql. I've created a database called jpetstore with the given schema and data. It's working fine. But when running jpetstore I get unknown database errors:

    I added mysql-connector-java-5.1.7-bin to my project lib file.

    I've edited jdbc.properties to:

    # Properties file with JDBC-related settings.

    jdbc.driverClassName=com.mysql.jdbc.Driver
    jdbc.url=jdbc:mysql://localhost:3306/jpetstore"
    jdbc.username=root
    jdbc.password=123456

    I get following error:

    type Exception report

    message

    description The server encountered an internal error () that prevented it from fulfilling this request.

    exception

    org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransa ctionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown database 'jpetstore"')
    ...

    root cause

    org.springframework.transaction.CannotCreateTransa ctionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown database 'jpetstore"')

    . . .
    root cause

    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown database 'jpetstore"')

    . . .

    root cause

    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorEx ception: Unknown database 'jpetstore"'
    sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
Working...
X