Skip to content

Instantly share code, notes, and snippets.

@scottmarlow
scottmarlow / gist:d21103118ae3e86c25db76261b3a49ff
Last active May 3, 2022
With nightly GlassFish 7 build with mojarra 4.0.0-M7-RELEASE included, getting ViewHandlingStrategyNotFoundException from getViewDeclarationLanguage
View gist:d21103118ae3e86c25db76261b3a49ff
[2022-05-03T12:21:43.003+0000] [glassfish 7.0] [WARNING] [] [jakarta.enterprise.web] [tid: _ThreadID=30 _ThreadName=http-listener-1(3)] [timeMillis: 1651580503003] [levelValue: 900] [[
StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
com.sun.faces.application.view.ViewHandlingStrategyNotFoundException
at java.base/java.util.Optional.orElseThrow(Optional.java:408)
at com.sun.faces.application.view.ViewHandlingStrategyManager.getStrategy(ViewHandlingStrategyManager.java:57)
at com.sun.faces.application.view.ViewDeclarationLanguageFactoryImpl.getViewDeclarationLanguage(ViewDeclarationLanguageFactoryImpl.java:45)
at com.sun.faces.application.view.MultiViewHandler.getViewDeclarationLanguage(MultiViewHandler.java:407)
at jakarta.faces.application.ViewHandlerWrapper.getViewDeclarationLanguage(ViewHandlerWrapper.java:335)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:179)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:72)
@scottmarlow
scottmarlow / gist:44da049ce865bc90972a4c60258081c3
Last active May 2, 2022
Still seeing some ViewHandlingStrategyNotFoundException exceptions when running Faces tests with Jakarta EE 10 Platform TCK against latest GlassFish with https://github.com/eclipse-ee4j/mojarra/releases/tag/4.0.0-M6-RELEASE
View gist:44da049ce865bc90972a4c60258081c3
Next test will be to run with https://github.com/eclipse-ee4j/mojarra/releases/tag/4.0.0-M7-RELEASE
FAILED........com/sun/ts/tests/ejb30/lite/lookup/annotated/Client.java#clientPostConstructRecords_from_ejblitejsf
FAILED........com/sun/ts/tests/ejb30/lite/lookup/annotated/Client.java#ejb2PostConstructRecords_from_ejblitejsf
FAILED........com/sun/ts/tests/ejb30/lite/lookup/annotated/Client.java#ejbPostConstructRecords_from_ejblitejsf
[2022-05-02T14:54:13.952-0400] [glassfish 7.0] [WARNING] [] [jakarta.enterprise.web] [tid: _ThreadID=41 _ThreadName=http-listener-1(2)] [timeMillis: 1651517653952] [levelValue: 900] [[
StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
com.sun.faces.application.view.ViewHandlingStrategyNotFoundException
at java.base/java.util.Optional.orElseThrow(Optional.java:408)
View gist:aac78e87fe6eff812d7938fb20925aff
[runcts] OUT => [wsgen] Exception in thread "main" java.lang.NoClassDefFoundError: jakarta/activation/DataSource
[runcts] OUT => [wsgen] at org.glassfish.jaxb.runtime.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:463)
[runcts] OUT => [wsgen] at org.glassfish.jaxb.runtime.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:31)
[runcts] OUT => [wsgen] at org.glassfish.jaxb.runtime.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:97)
[runcts] OUT => [wsgen] at org.glassfish.jaxb.runtime.v2.model.impl.ModelBuilder.<init>(ModelBuilder.java:120)
[runcts] OUT => [wsgen] at org.glassfish.jaxb.runtime.v2.model.impl.RuntimeModelBuilder.<init>(RuntimeModelBuilder.java:61)
[runcts] OUT => [wsgen] at org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:405)
[runcts] OUT => [wsgen] at org.glassfish.jaxb.runtime.v2.runtime.JAXBContextImpl.<ini
View gist:cafb1c9b63b4f56b6ddbfb5d6369b41b
[runcts] OUT => build:
[runcts] OUT =>
[runcts] OUT => -postcompile:
[runcts] OUT =>
[runcts] OUT => pre.package:
[runcts] OUT =>
[runcts] OUT => package.ejb.jar:
[runcts] OUT => [preservejar] Building jar: /root/jakartaeetck/dist/com/sun/ts/tests/ejb30/common/helloejbjar/ejb3_common_helloejbjar_standalone_component_ejb.jar
[runcts] OUT => [echo] Copying sun runtime file to dist
[runcts] OUT => [copy] Copying 1 file to /root/jakartaeetck/dist/com/sun/ts/tests/ejb30/common/helloejbjar
View gist:392fe36b5398677d47806ccb669191eb
[2022-04-24T09:19:48.985+0000] [glassfish 7.0] [WARNING] [] [jakarta.enterprise.web] [tid: _ThreadID=30 _ThreadName=http-listener-1(3)] [timeMillis: 1650791988985] [levelValue: 900] [[
StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
com.sun.faces.application.view.ViewHandlingStrategyNotFoundException
at java.base/java.util.Optional.orElseThrow(Optional.java:408)
at com.sun.faces.application.view.ViewHandlingStrategyManager.getStrategy(ViewHandlingStrategyManager.java:57)
at com.sun.faces.application.view.ViewDeclarationLanguageFactoryImpl.getViewDeclarationLanguage(ViewDeclarationLanguageFactoryImpl.java:45)
at com.sun.faces.application.view.MultiViewHandler.getViewDeclarationLanguage(MultiViewHandler.java:407)
at jakarta.faces.application.ViewHandlerWrapper.getViewDeclarationLanguage(ViewHandlerWrapper.java:335)
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:179)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:72)
@scottmarlow
scottmarlow / gist:cc287c646faee509b5dc56c916045ea6
Last active Mar 30, 2022
IllegalArgumentException occurred while calling setter for property [com.sun.ts.tests.jpa.common.schema30.Order.creditCard (expected type = com.sun.ts.tests.jpa.common.schema30.CreditCard)]; target = [Order[id: 1, totalPrice: 0.0, lineitem.id[], custId: null, custName: null, cc: null, type: null]], property value = [LineItem[id: 29, quantity: 0,…
View gist:cc287c646faee509b5dc56c916045ea6
Failing test:
jpa/core/criteriaapi/CriteriaBuilder/Client.java\#abs_from_pmservlet test source
jpa/core/criteriaapi/CriteriaBuilder/Client.java\#abs_from_stateless3 test source
Source Link https://github.com/eclipse-ee4j/jakartaee-tck/blob/master/src/com/sun/ts/tests/jpa/core/criteriaapi/CriteriaBuilder/Client.java#L5240
Question: Why would the below exception be thrown for application code that works
correctly when the entire test is done under a single container manager JTA transaction
but gets the failure when under application controlled user transaction?
@scottmarlow
scottmarlow / gist:b7eb4148b3c05eaee697b0dd6da4c6b9
Created Mar 29, 2022
EE 10 Platform TCK test failure "Caused by: ERROR 22005: An attempt was made to get a data value of type 'BOOLEAN' from a data value of type 'SMALLINT'."
View gist:b7eb4148b3c05eaee697b0dd6da4c6b9
\u001b[0m\u001b[0m15:25:12,104 INFO [org.hibernate.Version] (ServerService Thread Pool -- 9) HHH000412: Hibernate ORM core version 6.0.0-SNAPSHOT
\u001b[0m\u001b[0m15:25:12,596 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 9) HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
\u001b[0m\u001b[0m15:25:12,622 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 18) HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
\u001b[0m\u001b[0m15:25:12,659 INFO [org.hibernate.orm.beans] (ServerService Thread Pool -- 10) HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
\u001b[0m\u001b[33m15:25:12,667 WARN [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 10) HHH90000021: Encountered deprecated setting [jakarta.persistence.sharedCache.mode], use [jakarta.persi
View gist:ce323a00cce96d2163ce3cdc06db105d
2022-03-21 15:08:56,264 INFO [org.jboss.as.server] (management-handler-thread - 4) WFLYSRV0010: Deployed "hibernate4native_test.ear" (runtime-name : "hibernate4native_test.ear")
2022-03-21 15:08:56,414 INFO [org.hibernate.orm.beans] (pool-9-thread-13) HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
2022-03-21 15:08:56,457 WARN [org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator] (pool-9-thread-13) HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections
2022-03-21 15:08:56,457 WARN [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator] (pool-9-thread-13) HHH000342: Could not obtain connection to query metadata: java.lang.UnsupportedOperationException: The application must supply JDBC connections
at org.hibernate@6.0.0-SNAPSHOT//org.hibernate.engine.jdbc.connections.internal.UserSuppliedConnectionProviderImpl.getConnection(UserSuppliedConnec
@scottmarlow
scottmarlow / gist:74c44524e78a66febdeddf8d0cdb267f
Created Mar 21, 2022
Do Hibernate 6.0 (Java SE) applications deployed on WildFly need to supply 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect'?
View gist:74c44524e78a66febdeddf8d0cdb267f
Running the WildFly org.jboss.as.test.integration.hibernate.Hibernate4NativeAPIProviderTestCase test with
recent local ORM 6 (main branch) build is getting the below deployment failure.
The test code link is
https://github.com/wildfly/wildfly/blob/main/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/hibernate/Hibernate4NativeAPIProviderTestCase.java#L54
The linked Hibernate4NativeAPIProviderTestCase does not set any of the following (if we did the test might pass):
javax.persistence.jdbc.url
hibernate.connection.url
hibernate.dialect
View gist:d799bd82c5cd1df47784652880ca0bc2
Test failure from:
mvn install -Dts.ee9 -Dtest=org.jboss.as.test.integration.jpa.hibernate.envers.implementvalidityauditstrategytest.ImplementValidityAuditStrategyTestCase
Test Link:
https://github.com/wildfly/wildfly/blob/main/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/hibernate/envers/implementvalidityauditstrategytest/ImplementValidityAuditStrategyTestCase.java
server.log output:
2022-03-17 14:53:15,215 INFO [org.hibernate.envers.boot] (ServerService Thread Pool -- 78) HHH90005601: Envers-generated HBM mapping...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>