Unable to start Keycloak Quarkus Server in Development Mode

189 views
Skip to first unread message

Nicholas Jose

unread,
Oct 7, 2024, 6:52:30 AM10/7/24
to Keycloak Dev
Hi,

Since rebasing my repository to version 25.0.6 a few days ago I have been unable to start Quarkus in development mode. When I run

./mvnw -o -f quarkus/server/pom.xml compile quarkus:dev -Dquarkus.args="start-dev"
I get:

2024-10-07 23:46:40,489 WARN [io.quarkus.deployment.steps.RegisterForReflectionBuildStep] (build-15) Failed to load Class oracle.jdbc.xa.OracleXADataSource: java.lang.ClassNotFoundException: oracle.jdbc.xa.OracleXADataSource
2024-10-07 23:46:40,493 WARN [io.quarkus.deployment.steps.RegisterForReflectionBuildStep] (build-15) Failed to load Class oracle.jdbc.datasource.impl.OracleDataSource: java.lang.ClassNotFoundException: oracle.jdbc.datasource.impl.OracleDataSource
2024-10-07 23:46:46,949 WARN [io.quarkus.deployment.steps.ClassTransformingBuildStep] (build-58) Could not remove configured resources from the following artifacts as they were not found in the model: {com.oracle.database.jdbc:ojdbc11::jar=[oracle/nativeimage/CharacterSetFeature.class]}
ERROR: Unexpected error when starting the server in (development) mode
ERROR: Failed to start quarkus
ERROR: oracle/sql/CharacterSet

I have followed the instructions at
https://github.com/keycloak/keycloak/blob/main/docs/building.md

When I run java -jar quarkus/server/target/lib/quarkus-run.jar start-dev I get ERROR: Unexpected error when starting the server in (development) mode
ERROR: Failed to start quarkus
ERROR: oracle/sql/CharacterSet
ERROR: oracle.sql.CharacterSet

java -version returns 

openjdk version "23" 2024-09-17
OpenJDK Runtime Environment (build 23+37-2369)
OpenJDK 64-Bit Server VM (build 23+37-2369, mixed mode, sharing)

I assume it is something simple that I am missing, any help would be appreciated. 

Thanks, 
Nicholas

Steven Lewis

unread,
Oct 7, 2024, 10:22:47 PM10/7/24
to Keycloak Dev
Are you trying to use Oracle JDBC driver? Or, were you, before you upgraded?

See https://www.keycloak.org/server/db. It's missing a jar that is not included.

Nicholas Jose

unread,
Oct 8, 2024, 3:38:27 AM10/8/24
to Keycloak Dev
Hi Steven,

Thank you for the reply. No, I have never attempted to use the Oracle JDBC driver. I have only used the H2 database during development and Postgres for running outside of development. I am unsure why it is attempting to use it now. I have checked the application.properties file in quarkus/server/src/main/resources/ and can't see any properties related to databases. only have 

quarkus.package.output-name=keycloak
quarkus.package.jar.type=mutable-jar
quarkus.package.output-directory=lib
quarkus.package.jar.user-providers-directory=../providers
quarkus.package.main-class=keycloak  

In addition, I don't have any environment variables that I believe would impact the database driver. 

I've tried synchronising my fork of the repo such that as of right now it is in sync with keuycloak/keycloak and building again with a fresh clone and I am now receiving compilation errors 

 Compilation failure
/C:/Work/code/keycloak2/model/infinispan/src/main/java/org/keycloak/marshalling/KeycloakModelSchema.java:[218,40] cannot find symbol
  symbol:   class KeycloakModelSchemaImpl
  location: interface org.keycloak.marshalling.KeycloakModelSchema

It seems that  KeycloakModelSchemaImpl is referenced on line 218 of the file mentioned in the error but I am unable to find the import statement. 

I am confused.

Nicholas 
Reply all
Reply to author
Forward
0 new messages