Uploaded image for project: 'PicketLink'
  1. PicketLink
  2. PLINK-616

JDBCTokenRegistry issue with Postgres

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • PLINK_2.7.0.CR1
    • SAML
    • None
    • Hide

      1) Create database with the following table:
      CREATE TABLE TOKEN_REGISTRY (TOKEN_ID bytea, TOKEN bytea, CREATED_DATE timestamp);
      (also tried text instead of bytea)

      2) Setup JPA token registry in IDP quickstart and used employee quickstart
      3) Setup picketlink-sts datasource
      4) Try to login to employee quickstart (through IDP)

      Show
      1) Create database with the following table: CREATE TABLE TOKEN_REGISTRY (TOKEN_ID bytea, TOKEN bytea, CREATED_DATE timestamp); (also tried text instead of bytea) 2) Setup JPA token registry in IDP quickstart and used employee quickstart 3) Setup picketlink-sts datasource 4) Try to login to employee quickstart (through IDP)

      Getting the following error when trying to use the JDBCTokenRegistry with Posgres
      Caused by: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
      at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:453)
      at com.sun.proxy.$Proxy11.executeUpdate(Unknown Source)
      at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)
      at org.picketlink.identity.federation.core.sts.registry.JDBCTokenRegistry.addToken(JDBCTokenRegistry.java:74) [picketlink-federation-2.5.3.SP10-redhat-1.jar:2.5.3.SP10-redhat-1]
      ... 18 more

      Because Wildfly/EAP removed the module dependencies needed for JPABasedTokenRegistry, getting this to work is important.

            psilva@redhat.com Pedro Igor Craveiro
            rhn-support-cdolphy Chris Dolphy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: