[keycloak-user] Interesting MySQL error creating a Keycloak project on Openshift

Murat Doner muratfair at gmail.com
Wed Feb 27 10:27:59 EST 2019


Hello,

I just want to create a Keycloak app on Openshift which is using MySQL.

1- I have created an Openshift project.
2- I created a MySQL instance (as I am not sure if this template
automatically create one) with these credentials:
 user: keycloak
 password: password
 db : keycloak

3- Then I have copy this: Openshift-template:

https://github.com/jboss-dockerfiles/keycloak/blob/master/openshift-examples/keycloak-https.json

But I just changed Keycloak image: "image": "jboss/keycloak:4.8.1.Final"
(as keycloak-openshift image deprecated.)

And I am getting this error:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
Cannot load connection class because of underlying exception:
'java.lang.NumberFormatException: For input string: "tcp:"'.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.Util.getInstance(Util.java:408)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:861)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:338)
    at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:321)
    ... 55 more
Caused by: java.lang.NumberFormatException: For input string: "tcp:"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
    at java.lang.Integer.parseInt(Integer.java:580)
    at java.lang.Integer.parseInt(Integer.java:615)
    at com.mysql.jdbc.NonRegisteringDriver.port(NonRegisteringDriver.java:825)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
    ... 56 more



(Note: S.o.f link:
https://stackoverflow.com/questions/54907901/interesting-mysql-error-creating-a-keycloak-project-on-openshift
)


More information about the keycloak-user mailing list