• S
    Susan

    hi mlohbihler
    I don't want to convert derby to postgreSQL,because I want to use postgreSQL directly,I modify the code about database,now I run the program and find the following log(the tables in postgreSQL have been created Automatically):
    org.springframework.dao.InvalidDataAccessApiUsageException: The getKey method should only be used when a single key is returned. The current key entry contains multiple keys: [{id=1, username=admin, password=0DPiKuNIrrVmD8IUCuw1hQxNqZc=, email=admin@yourMangoDomain.com, phone=, admin=Y, disabled=N, lastlogin=null, selectedwatchlist=null, homeurl=null, receivealarmemails=0, receiveownauditevents=N}]
    at org.springframework.jdbc.support.GeneratedKeyHolder.getKey(GeneratedKeyHolder.java:65)
    at com.serotonin.db.DaoUtils.doInsert(DaoUtils.java:151)
    at com.serotonin.mango.db.dao.UserDao.insertUser(UserDao.java:134)
    at com.serotonin.mango.db.dao.UserDao.access$000(UserDao.java:38)
    at com.serotonin.mango.db.dao.UserDao$2.doInTransactionWithoutResult(UserDao.java:122)
    at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
    at com.serotonin.mango.db.dao.UserDao.saveUser(UserDao.java:118)
    at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:138)
    at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:248)
    at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:85)
    best wishes
    Susan

    posted in User help read more
  • S
    Susan

    hi mlohbihler
    I don't want to convert derby to postgreSQL,because I want to use postgreSQL directly,I modify the code about database,now I run the program and find the following log(the tables in postgreSQL have been created Automatically):
    org.springframework.dao.InvalidDataAccessApiUsageException: The getKey method should only be used when a single key is returned. The current key entry contains multiple keys: [{id=1, username=admin, password=0DPiKuNIrrVmD8IUCuw1hQxNqZc=, email=admin@yourMangoDomain.com, phone=, admin=Y, disabled=N, lastlogin=null, selectedwatchlist=null, homeurl=null, receivealarmemails=0, receiveownauditevents=N}]
    at org.springframework.jdbc.support.GeneratedKeyHolder.getKey(GeneratedKeyHolder.java:65)
    at com.serotonin.db.DaoUtils.doInsert(DaoUtils.java:151)
    at com.serotonin.mango.db.dao.UserDao.insertUser(UserDao.java:134)
    at com.serotonin.mango.db.dao.UserDao.access$000(UserDao.java:38)
    at com.serotonin.mango.db.dao.UserDao$2.doInTransactionWithoutResult(UserDao.java:122)
    at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)
    at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
    at com.serotonin.mango.db.dao.UserDao.saveUser(UserDao.java:118)
    at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:138)
    at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:248)
    at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:85)
    best wishes
    Susan

    posted in User help read more