Comments (7)
I have the same issue.
When I use the user-storage-jpa as is, without any updates. Create the jar file by mvn clean package
then copy it to the <keycloak_path>/providers
directory, then <keycloak_path>/bin/kc build
, then <keycloak_path>/bin/kc start-dev
i have received the error:
ERROR: Unexpected error when starting the server in (development) mode
ERROR: Failed to start quarkus
ERROR: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
ERROR: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
from keycloak-quickstarts.
We should be looking at that ASAP. We need to review the support for multiple PUs and data sources.
from keycloak-quickstarts.
I have the same issue. When I use the user-storage-jpa as is, without any updates. Create the jar file by
mvn clean package
then copy it to the<keycloak_path>/providers
directory, then<keycloak_path>/bin/kc build
, then<keycloak_path>/bin/kc start-dev
i have received the error:ERROR: Unexpected error when starting the server in (development) mode ERROR: Failed to start quarkus ERROR: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] ERROR: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
I have the same problem
from keycloak-quickstarts.
У меня такая же проблема. Когда я использую user-storage-jpa как есть, без каких-либо обновлений. Создайте файл jar,
mvn clean package
затем скопируйте его в<keycloak_path>/providers
каталог,<keycloak_path>/bin/kc build
затем<keycloak_path>/bin/kc start-dev
я получил сообщение об ошибке:ERROR: Unexpected error when starting the server in (development) mode ERROR: Failed to start quarkus ERROR: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] ERROR: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
I have the same issue. When I use the user-storage-jpa as is, without any updates. Create the jar file by
mvn clean package
then copy it to the<keycloak_path>/providers
directory, then<keycloak_path>/bin/kc build
, then<keycloak_path>/bin/kc start-dev
i have received the error:ERROR: Unexpected error when starting the server in (development) mode ERROR: Failed to start quarkus ERROR: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] ERROR: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
I have the same problem...
from keycloak-quickstarts.
Same problem here as well.
У меня такая же проблема. Когда я использую user-storage-jpa как есть, без каких-либо обновлений. Создайте файл jar,
mvn clean package
затем скопируйте его в<keycloak_path>/providers
каталог,<keycloak_path>/bin/kc build
затем<keycloak_path>/bin/kc start-dev
я получил сообщение об ошибке:ERROR: Unexpected error when starting the server in (development) mode ERROR: Failed to start quarkus ERROR: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] ERROR: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
I have the same issue. When I use the user-storage-jpa as is, without any updates. Create the jar file by
mvn clean package
then copy it to the<keycloak_path>/providers
directory, then<keycloak_path>/bin/kc build
, then<keycloak_path>/bin/kc start-dev
i have received the error:ERROR: Unexpected error when starting the server in (development) mode ERROR: Failed to start quarkus ERROR: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] ERROR: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.
I have the same problem...
Same problem here as well
from keycloak-quickstarts.
Support for multiple PUs is available in Quarkus when using the quarkus-hibernate-orm
extension (See: https://quarkus.io/guides/hibernate-orm). The way to configure it is by using the application.properties
file. For the Quickstart example it is supposed to read something like this:
quarkus.datasource.users.db-kind=postgresql
quarkus.datasource.users.jdbc.url=jdbc:postgresql://localhost/mydb
quarkus.datasource.users.username=myuser
quarkus.datasource.users.password=mypw
quarkus.datasource.users.min-size=2
quarkus.datasource.users.max-size=8
While we don’t have direct access to the application.properties
file, as per https://www.keycloak.org/migration/migrating-to-quarkus we can apply Quarkus level configuration options in conf/quarkus.properties
.
Note that you need to remove the existing persistence.xml
as these settings cannot coexist.
In theory we should be able to simply inject the EntityManager
in EjbExampleUserStorageProvider.java
like this:
public class EjbExampleUserStorageProvider implements UserStorageProvider,
...
@Inject
@PersistenceUnit("users")
protected EntityManager em;
Sadly, adding the above options to quarkus.properties
, does not yield a valid EntityManager.
The alternative would be bringing back our persistence.xml
and add the datasource there:
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="users" transaction-type="RESOURCE_LOCAL">
<properties>
<!-- Connection specific -->
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQL95Dialect"/>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost/mydb"/>
<property name="javax.persistence.jdbc.user" value="myuser"/>
<property name="javax.persistence.jdbc.password" value="mypw"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
<property name="javax.persistence.validation.mode" value="NONE"/>
</properties>
</persistence-unit>
</persistence>
The build step now succeeds, but the same error appears:
ERROR: Unexpected error when starting the server in (development) mode
ERROR: Failed to start quarkus
ERROR: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
ERROR: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
The hibernate.dialect
is probably misleading. It is more likely that Quarkus is not happy with the persistence.xml
.
For reference, I attempted to create a fresh Quarkus application and didn't manage to get it working with a persistence.xml
. The equivalent application.properties
approach DID work as expected.
I'm happy to spend some time to get this working. Any help is highly appreciated!
PS my WiP fork project can be found here: https://github.com/NubiaNetworks/keycloak-quickstarts
from keycloak-quickstarts.
There is now a a more recent issue #303 that also contains a linked PR. Therefore I close this issue as a duplicate.
from keycloak-quickstarts.
Related Issues (20)
- DeploymentConfig resource is being used in openshift template
- Client detail page is not showing details properly
- Keycloak 24.0.1 User Storage SPI is not working
- Account v3 extension more complex React component HOT 3
- NPE in user-storage-jpa when searching by empty string
- `action-token-authenticator` and `action-token-required-action` broken
- ExtendAccountConsoleTest fails on main
- Where is the old authenticator example? HOT 1
- Changes in account extension sample not working
- Failures in `ExtendAdminConsoleTest`
- Kubernetes quick start still uses "proxy" option
- After updating from 24.0.5 to 25.0.0, the admin UI not showing because of CORS check. HOT 1
- Make sure contributors not send PR to the `latest` branch
- Build fails in the extension
- Tests in user-storage-simple quickstart are failing in main branch
- Custom User Storage Provider JPA runtime provided properties HOT 1
- Jboss 8: Required mechanism KEYCLOAK-SAML not available, even though keycloak-saml-adapter is installed
- Action-token quickstarts don't compile with latest Keycloak HOT 1
- Incorrect Keycloak version in the main branch of quickstarts
- K8s Service.type: ClusterIP Does Not Redirect Correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keycloak-quickstarts.