Skip to content

Instantly share code, notes, and snippets.

View jfdenise's full-sized avatar

Jean-François Denise jfdenise

  • redhat
  • France, Grenoble
View GitHub Profile
@jfdenise
jfdenise / gist:ae5310a1e712847c67de8cf7faf2e968
Created August 4, 2022 16:56
Hibernate 6, post bigbang, postgresql Issue
MacBook-Pro-de-Jean-Francois:test-app-postgres-ee10 jfdenise$ POSTGRESQL_DATABASE=jfdenise POSTGRESQL_PASSWORD=demo POSTGRESQL_USER=jfdenise JAVA_HOME=/Users/jfdenise/jdk-11.0.2.jdk/Contents/Home/ ./target/server/bin/standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /Users/jfdenise/wildfly-s2i/test/test-app-postgres-ee10/target/server
JAVA: /Users/jfdenise/jdk-11.0.2.jdk/Contents/Home//bin/java
JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true --add-exports=java.desktop/sun.awt=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.ldap=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.url.ldap=ALL-UNNAMED --add-exports=java.naming/com.sun.jndi.url.ldaps=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.
<subsystem xmlns="urn:jboss:domain:messaging-activemq:14.0">
<server name="default">
<security elytron-domain="ApplicationDomain"/>
<statistics enabled="${wildfly.messaging-activemq.statistics-enabled:${wildfly.statistics-enabled:false}}"/>
<security-setting name="#">
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
</security-setting>
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
Size when provisioning WildFly standalone.xml with all content: 270MB
Size when provisioning WildFly trimmed standalone.xml only: 162MB
Only in std-27-Beta1-all/bin: client 29MB
Only in std-27-Beta1-all/: docs 25MB
Diff in modules : 55MB in addition when provisioning all modules.
Only in std-27-Beta1-all/modules/system/layers/base/com: carrotsearch
The list of modules that are not provisioned when wildfly standalone default configs are provisioned.
We have 3 categories:
* `No extension provisioned`: no extension that needs it has been provisioned.
* `Not provisioned, legacy`: Legacy, old, un-used modules.
* `Not provisioned but could be needed`: Do we want them when trimming default configs?
No extension provisioned:
Only in wf27-full-ha-all/modules/system/layers/base/com/fasterxml/jackson: dataformat [used by openapi]
21:47:22,500 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
21:47:22,501 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0054: Admin console is not enabled
21:47:24,795 INFO [stdout] (default task-1) Hibernate: select t1_0.id,t1_0.title from tasks t1_0
21:47:29,307 INFO [jakarta.enterprise.resource.webcontainer.faces.context] (default task-1) java.lang.NullPointerException: java.lang.NullPointerException
at jakarta.faces.api//jakarta.faces.validator.BeanValidator.validate(BeanValidator.java:319)
at jakarta.faces.api//jakarta.faces.component.UIInput.validateValue(UIInput.java:1019)
at jakarta.faces.api//jakarta.faces.component.UIInput.validate(UIInput.java:825)
at jakarta.faces.api//jakarta.faces.component.UIInput.executeValidate(UIInput.java:1093)
at jakarta.faces.api//jakarta.faces.component.UIInput.processValidators(UIInput.java:586)
at com.sun.jsf-impl@4.0.0.SP01//com.sun.faces.context.PartialViewContextImpl$Ph
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.wildfly.core.jar.boot.Main.runBootableJar(Main.java:203)
at org.wildfly.core.jar.boot.Main.main(Main.java:154)
Caused by: java.lang.IllegalArgumentException: Failed to load class "org.jboss.as.logging.logmanager.Log4jAppenderHandler" for handler "log4j-file"
at org.jboss.logmanager@2.1.18.Final//org.jboss.logmanager.config.AbstractPropertyConfiguration.<init>(AbstractPropertyConfiguration.java:77)
at org.jboss.logmanager@2.1.18.Final//org.jboss.logmanager.config.HandlerConfigurationImpl.<init>(HandlerConfigurationImpl.java:51)
[standalone@localhost:9990 /] /subsystem=jgroups/stack=tcp
/ :
[standalone@localhost:9990 /] /subsystem=jgroups/stack=tcp:re
read-attribute read-attribute-group-names read-children-resources read-operation-description read-resource remove
read-attribute-group read-children-names read-children-types read-operation-names read-resource-description remove-protocol
[standalone@localhost:9990 /] /subsystem=jgroups/stack=tcp:remove
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0367: Cannot remove capability 'org.wildfly.clustering.jgroups.channel-factory.tcp' as it is required by other capabilities:
capability 'org.wildfly.clustering.jgroups.channel-source.ee' requires it for attribute 'stack' at address '/subsystem=jgroups/channel=ee'",
10:19:52,346 INFO [stdout] (default task-1) Hibernate: select t1_0.id,t1_0.title from tasks t1_0
10:19:54,879 INFO [stdout] (default task-2) Hibernate: insert into tasks (id, title) values (default, ?)
10:19:54,887 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) SQL Error: 23505, SQLState: 23505
10:19:54,887 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-2) Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.TASKS(ID) ( /* key:1 */ CAST(1 AS BIGINT), 'This is the task-1')"; SQL statement:
insert into tasks (id, title) values (default, ?) [23505-210]
10:19:54,917 ERROR [org.jboss.as.ejb3.invocation] (default task-2) WFLYEJB0034: Jakarta Enterprise Beans Invocation failed on component TaskController for method public org.wildfly.plugins.demo.jsf.Task org.wildfly.plugins.demo.jsf.TaskController.add(java.lang.String): jakarta.ejb.EJBException: jakarta.persistence.PersistenceException: Converting `org.hibernate.exception.ConstraintViolationException` to
[jdenise@jdenise latest]$ ./kubectl logs -f keycloak-server-cloud-test-6994d4985-65kmn
Updating the configuration and installing your custom providers, if any. Please wait.
2023-01-10 15:36:49,549 DEBUG [org.keycloak.provider.ProviderManager] (build-62) Provider loaders [org.keycloak.provider.DefaultProviderLoaderFactory@7ad46a69, org.keycloak.provider.FileSystemProviderLoaderFactory@6c9ceb0f]
2023-01-10 15:36:50,942 DEBUG [org.keycloak.quarkus.deployment.KeycloakProcessor] (build-62) SPI datastore provider map disabled
2023-01-10 15:36:51,044 DEBUG [org.keycloak.quarkus.deployment.KeycloakProcessor] (build-62) SPI publicKeyStorage provider map disabled
2023-01-10 15:36:51,549 DEBUG [org.keycloak.quarkus.deployment.KeycloakProcessor] (build-62) SPI credential provider keycloak-recovery-authn-codes disabled
2023-01-10 15:36:52,663 DEBUG [org.keycloak.quarkus.deployment.KeycloakProcessor] (build-62) SPI login-protocol provider docker-v2 disabled
2023-01-10 15:36:55,059 DEBUG [org.keycloak.quarkus.deployment.Key
[jdenise@jdenise latest]$ oc logs -f wildfly-cloud-tests-oidc-auto-registration-546f476475-kbnwv
Using openshift launcher.
2023-01-10 16:00:04 Launching WildFly Server
INFO Access log is disabled, ignoring configuration.
INFO Clustering feature is not enabled, no jgroups subsystem present in server configuration.
INFO Configuring OIDC subsystem for provider keycloak
INFO Obtained auth token from http://192.168.49.2:30075/realms/WildFly
INFO Registered OIDC client for module root in http://192.168.49.2:30075/realms/WildFly on "http://192.168.49.2:30074/*"
INFO Server started in admin mode, CLI script executed during server boot.
INFO Running wildfly/wildfly-runtime image, version 1.0.0-jdk17