org.postgresql.util.PSQLException: No value specified for parameter 1.

Pentaho BI Platform Tracking | Galen Spikes | 2 years ago
  1. 0

    https://pentaho.zendesk.com/agent/#/tickets/48227 Migrating from 4.8.2 to 5.1.0, when attempting to export the 4.8.2 data. The 4.8.2 security is via CAS and tied into a user's database that their internal web app uses, ultimately tied to LDAP. The user can successfully start the BA Server and log into PUC. They are using the 5.1 migrator, which fails when it tries to get the users. This is where it breaks in the migrator.log: {noformat} 2014-08-13 14:19:56,525 INFO [org.pentaho.platform.migration.utils.SOutObserver] [PROGRESS]: Getting List of Users 2014-08-13 14:19:56,574 ERROR [org.pentaho.platform.migration.commandline.CommandLineProcessor] org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [ SELECT ldapid AS username FROM roles JOIN company_user_role ON company_user_role.role_id = roles.id JOIN company_user ON company_user_role.company_id = company_user.company_id AND company_user_role.user_id = company_user.user_id JOIN users ON company_user.user_id = users.id WHERE (roles.name = ? AND users.is_active = true) UNION SELECT ldapid AS username FROM company JOIN company_user on company.id = company_user.company_id JOIN users ON company_user.user_id = users.id WHERE (company.id = substring(? from position('|' IN ?)+1)::integer AND users.is_active = true) ]; No value specified for parameter 1.; nested exception is org.postgresql.util.PSQLException: No value specified for parameter 1. org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [ SELECT ldapid AS username FROM roles JOIN company_user_role ON company_user_role.role_id = roles.id JOIN company_user ON company_user_role.company_id = company_user.company_id AND company_user_role.user_id = company_user.user_id JOIN users ON company_user.user_id = users.id WHERE (roles.name = ? AND users.is_active = true) UNION SELECT ldapid AS username FROM company JOIN company_user on company.id = company_user.company_id JOIN users ON company_user.user_id = users.id WHERE (company.id = substring(? from position('|' IN ?)+1)::integer AND users.is_active = true) ]; No value specified for parameter 1.; nested exception is org.postgresql.util.PSQLException: No value specified for parameter 1. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:698) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:112) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:122) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:137) at org.pentaho.platform.plugin.services.security.userrole.jdbc.JdbcUserRoleListService.getAllUsernames(JdbcUserRoleListService.java:146) at org.pentaho.platform.engine.security.userrole.UserDetailsRoleListService.getAllUsers(UserDetailsRoleListService.java:71) at org.pentaho.migration.v48.agents.MigrationAgentUserSettings.loadUsers(MigrationAgentUserSettings.java:143) at org.pentaho.migration.v48.agents.MigrationAgentUserSettings.contributeToBundle(MigrationAgentUserSettings.java:72) at org.pentaho.platform.migration.PlatformMigrator.generateMigrationBundle(PlatformMigrator.java:82) at org.pentaho.platform.migration.BaseMigrationApplication.run(BaseMigrationApplication.java:120) at org.pentaho.platform.migration.commandline.CommandLineProcessor.beginMigrationProcess(CommandLineProcessor.java:273) at org.pentaho.platform.migration.commandline.CommandLineProcessor.main(CommandLineProcessor.java:104) Caused by: org.postgresql.util.PSQLException: No value specified for parameter 1. at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:176) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:244) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271) at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591) ... 14 more 2014-08-13 14:19:56,578 ERROR [org.pentaho.platform.migration.commandline.CommandLineProcessor] Processing failed. 2014-08-13 14:19:57,089 INFO [com.hazelcast.nio.Connection] [192.168.200.31]:5701 [cdc] Connection [Address[192.168.201.171]:5701] lost. Reason: java.io.EOFException[null] {noformat}

    Pentaho BI Platform Tracking | 2 years ago | Galen Spikes
    org.postgresql.util.PSQLException: No value specified for parameter 1.
  2. 0

    https://pentaho.zendesk.com/agent/#/tickets/48227 Migrating from 4.8.2 to 5.1.0, when attempting to export the 4.8.2 data. The 4.8.2 security is via CAS and tied into a user's database that their internal web app uses, ultimately tied to LDAP. The user can successfully start the BA Server and log into PUC. They are using the 5.1 migrator, which fails when it tries to get the users. This is where it breaks in the migrator.log: {noformat} 2014-08-13 14:19:56,525 INFO [org.pentaho.platform.migration.utils.SOutObserver] [PROGRESS]: Getting List of Users 2014-08-13 14:19:56,574 ERROR [org.pentaho.platform.migration.commandline.CommandLineProcessor] org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [ SELECT ldapid AS username FROM roles JOIN company_user_role ON company_user_role.role_id = roles.id JOIN company_user ON company_user_role.company_id = company_user.company_id AND company_user_role.user_id = company_user.user_id JOIN users ON company_user.user_id = users.id WHERE (roles.name = ? AND users.is_active = true) UNION SELECT ldapid AS username FROM company JOIN company_user on company.id = company_user.company_id JOIN users ON company_user.user_id = users.id WHERE (company.id = substring(? from position('|' IN ?)+1)::integer AND users.is_active = true) ]; No value specified for parameter 1.; nested exception is org.postgresql.util.PSQLException: No value specified for parameter 1. org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [ SELECT ldapid AS username FROM roles JOIN company_user_role ON company_user_role.role_id = roles.id JOIN company_user ON company_user_role.company_id = company_user.company_id AND company_user_role.user_id = company_user.user_id JOIN users ON company_user.user_id = users.id WHERE (roles.name = ? AND users.is_active = true) UNION SELECT ldapid AS username FROM company JOIN company_user on company.id = company_user.company_id JOIN users ON company_user.user_id = users.id WHERE (company.id = substring(? from position('|' IN ?)+1)::integer AND users.is_active = true) ]; No value specified for parameter 1.; nested exception is org.postgresql.util.PSQLException: No value specified for parameter 1. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:100) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:698) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:112) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:122) at org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:137) at org.pentaho.platform.plugin.services.security.userrole.jdbc.JdbcUserRoleListService.getAllUsernames(JdbcUserRoleListService.java:146) at org.pentaho.platform.engine.security.userrole.UserDetailsRoleListService.getAllUsers(UserDetailsRoleListService.java:71) at org.pentaho.migration.v48.agents.MigrationAgentUserSettings.loadUsers(MigrationAgentUserSettings.java:143) at org.pentaho.migration.v48.agents.MigrationAgentUserSettings.contributeToBundle(MigrationAgentUserSettings.java:72) at org.pentaho.platform.migration.PlatformMigrator.generateMigrationBundle(PlatformMigrator.java:82) at org.pentaho.platform.migration.BaseMigrationApplication.run(BaseMigrationApplication.java:120) at org.pentaho.platform.migration.commandline.CommandLineProcessor.beginMigrationProcess(CommandLineProcessor.java:273) at org.pentaho.platform.migration.commandline.CommandLineProcessor.main(CommandLineProcessor.java:104) Caused by: org.postgresql.util.PSQLException: No value specified for parameter 1. at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:176) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:244) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271) at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591) ... 14 more 2014-08-13 14:19:56,578 ERROR [org.pentaho.platform.migration.commandline.CommandLineProcessor] Processing failed. 2014-08-13 14:19:57,089 INFO [com.hazelcast.nio.Connection] [192.168.200.31]:5701 [cdc] Connection [Address[192.168.201.171]:5701] lost. Reason: java.io.EOFException[null] {noformat}

    Pentaho BI Platform Tracking | 2 years ago | Galen Spikes
    org.postgresql.util.PSQLException: No value specified for parameter 1.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    JPQL find from element collection

    Stack Overflow | 2 years ago | ZZ 5
    org.springframework.dao.DataIntegrityViolationException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not extract ResultSet
  5. 0

    How to cope with 'org.postgresql.util.PSQLException: No value specified for parameter 1'?

    Stack Overflow | 5 years ago | user569825
    org.postgresql.util.PSQLException: No value specified for parameter 1.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.postgresql.util.PSQLException

    No value specified for parameter 1.

    at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet()
  2. PostgreSQL JDBC Driver
    AbstractJdbc2Statement.executeQuery
    1. org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:176)
    2. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:244)
    3. org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:510)
    4. org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:386)
    5. org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271)
    5 frames
  3. Spring Framework
    SqlQuery.execute
    1. org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)
    2. org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
    3. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)
    4. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:666)
    5. org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:698)
    6. org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:112)
    7. org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:122)
    8. org.springframework.jdbc.object.SqlQuery.execute(SqlQuery.java:137)
    8 frames
  4. org.pentaho.platform
    UserDetailsRoleListService.getAllUsers
    1. org.pentaho.platform.plugin.services.security.userrole.jdbc.JdbcUserRoleListService.getAllUsernames(JdbcUserRoleListService.java:146)
    2. org.pentaho.platform.engine.security.userrole.UserDetailsRoleListService.getAllUsers(UserDetailsRoleListService.java:71)
    2 frames
  5. org.pentaho.migration
    MigrationAgentUserSettings.contributeToBundle
    1. org.pentaho.migration.v48.agents.MigrationAgentUserSettings.loadUsers(MigrationAgentUserSettings.java:143)
    2. org.pentaho.migration.v48.agents.MigrationAgentUserSettings.contributeToBundle(MigrationAgentUserSettings.java:72)
    2 frames
  6. org.pentaho.platform
    CommandLineProcessor.main
    1. org.pentaho.platform.migration.PlatformMigrator.generateMigrationBundle(PlatformMigrator.java:82)
    2. org.pentaho.platform.migration.BaseMigrationApplication.run(BaseMigrationApplication.java:120)
    3. org.pentaho.platform.migration.commandline.CommandLineProcessor.beginMigrationProcess(CommandLineProcessor.java:273)
    4. org.pentaho.platform.migration.commandline.CommandLineProcessor.main(CommandLineProcessor.java:104)
    4 frames