[Red Hat JIRA] (WFLY-14301) jandex exception when using @DataSourceDefinition and Pg driver
by hantsy bai (Jira)
hantsy bai created WFLY-14301:
---------------------------------
Summary: jandex exception when using @DataSourceDefinition and Pg driver
Key: WFLY-14301
URL: https://issues.redhat.com/browse/WFLY-14301
Project: WildFly
Issue Type: Bug
Components: EE
Affects Versions: 22.0.0.Final
Reporter: hantsy bai
Assignee: Brian Stansberry
I used `@DataSourceDeifnition` and included a postgres driver in the project dependencies, and it works well in Payara, but I encountered the deployment issue when running it on WildFly.
The original description is posted on Stackoverflow.
[https://stackoverflow.com/questions/65746765/datasourcedefinition-usage-o...]
The full exception when deploying to WildFly.
{code:java}
14:01:20,667 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "cargo-tracker.war" (runtime-name: "cargo-tracker.war")
14:01:22,027 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0003: Could not index class org/postgresql/jdbc/PgConnection$1.class at /D:/appsvr/wildfly-22.0.0.Final/bin/content/cargo-tracker.war/WEB-INF/lib/postgresql-42.2.18.jar: java.lang.IllegalStateException: Required class information is missing
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.rebuildNestedType(Indexer.java:932)
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.resolveTypePath(Indexer.java:792)
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.resolveTypeAnnotation(Indexer.java:711)
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.resolveTypeAnnotations(Indexer.java:619)
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.index(Indexer.java:1613)
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)14:01:22,090 WARN [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0003: Could not index class org/postgresql/util/LruCache.class at /D:/appsvr/wildfly-22.0.0.Final/bin/content/cargo-tracker.war/WEB-INF/lib/postgresql-42.2.18.jar: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.updateTypeTarget(Indexer.java:847)
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.updateTypeTargets(Indexer.java:630)
at org.jboss.jandex@2.1.4.Final//org.jboss.jandex.Indexer.index(Indexer.java:1614)
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)14:01:22,593 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."cargo-tracker.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cargo-tracker.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "cargo-tracker.war"
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:189)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.jboss.msc.service.ServiceNotFoundException: service jboss.ejb.default-resource-adapter-name-service not found
at org.jboss.msc@1.4.12.Final//org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:663)
at org.jboss.as.ejb3@22.0.0.Final//org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFactory.java:257)
at org.jboss.as.ejb3@22.0.0.Final//org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:156)
at org.jboss.as.ejb3@22.0.0.Final//org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:83)
at org.jboss.as.ejb3@22.0.0.Final//org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:150)
at org.jboss.as.ejb3@22.0.0.Final//org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.deploy(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:82)
at org.jboss.as.server@14.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:182)
... 8 more14:01:22,593 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "cargo-tracker.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"cargo-tracker.war\".PARSE" => "WFLYSRV0153: Failed to process phase PARSE of deployment \"cargo-tracker.war\"
Caused by: org.jboss.msc.service.ServiceNotFoundException: service jboss.ejb.default-resource-adapter-name-service not found"}}
14:01:22,593 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "cargo-tracker.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"cargo-tracker.war\".PARSE" => "WFLYSRV0153: Failed to process phase PARSE of deployment \"cargo-tracker.war\"
Caused by: org.jboss.msc.service.ServiceNotFoundException: service jboss.ejb.default-resource-adapter-name-service not found"}}
14:01:22,718 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0028: Stopped deployment cargo-tracker.war (runtime-name: cargo-tracker.war) in 118ms
{code}
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14287) NoClassDefFoundError: Failed to link org/bouncycastle/openpgp/PGPEncryptedDataList: org/bouncycastle/util/Iterable
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-14287?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFLY-14287:
-----------------------------------------
[~rady66] The org.bouncycastle.bcpg module is private and is only provided for our own specific internal use. This is reflected in its module.xml; it's what the 'jboss.api" property with value "private" means. If a deployments adds a dependency on it we should be logging a WARN. We don't add dependencies to modules unless our own uses need them, or if the module is available for end user use (i.e. no jboss.api=private) or we add it as a dependency to deployments.
We don't add dependencies otherwise because doing so 1) increases our server footprint 2) increases the possibility that we will be affected by CVEs and 3) makes it more possible that people who build on WildFly will depend on internal details and then be negatively affected when we change those details.
We recommend that users package not use the modules we mark private but instead package the relevant libraries in their application.
> NoClassDefFoundError: Failed to link org/bouncycastle/openpgp/PGPEncryptedDataList: org/bouncycastle/util/Iterable
> ------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-14287
> URL: https://issues.redhat.com/browse/WFLY-14287
> Project: WildFly
> Issue Type: Bug
> Affects Versions: 21.0.1.Final
> Reporter: Radoslav Ivanov
> Assignee: Sudeshna Sur
> Priority: Major
>
> Could you please add missing dependencies in Bouncycastle modules?
> Problem (we got):
> {code:java}
> Caused by: java.lang.NoClassDefFoundError: Failed to link org/bouncycastle/openpgp/PGPEncryptedDataList (Module "org.bouncycastle.bcpg" version 1.66.00.0 from local module loader @1d1f7216 (finder: local module finder @423e4cbb (roots: /data/avoka/transact/manager/server/modules,/data/avoka/transact/manager/server/modules/system/layers/base))): org/bouncycastle/util/Iterable
> {code}
>
> Solution (adding dependency from bcpg to bcprov modules solves the issue):
> {code:java}
> modules\system\layers\base\org\bouncycastle\bcpg\main\module.xml{code}
> {code:java}
> <dependencies>
> <module name="org.bouncycastle.bcprov" export="true" services="export"/>
> </dependencies>
> {code}
>
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14298) Using fault-tolerance in Wildfly 22 causes WELD-001408
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-14298?page=com.atlassian.jira.plugi... ]
Brian Stansberry reassigned WFLY-14298:
---------------------------------------
Component/s: MP Fault Tolerance
MP Metrics
(was: EE)
Assignee: Jason Lee (was: Brian Stansberry)
> Using fault-tolerance in Wildfly 22 causes WELD-001408
> ------------------------------------------------------
>
> Key: WFLY-14298
> URL: https://issues.redhat.com/browse/WFLY-14298
> Project: WildFly
> Issue Type: Bug
> Components: MP Fault Tolerance, MP Metrics
> Affects Versions: 22.0.0.Final
> Reporter: sdfsd fsdfsdf
> Assignee: Jason Lee
> Priority: Major
>
> In wildfly 21, I used to put these lines into the standalone-full-ha.xml:
> <extension module="org.wildfly.extension.microprofile.fault-tolerance-smallrye"/>
> ...
> <subsystem xmlns="urn:wildfly:microprofile-fault-tolerance-smallrye:1.0"/>
> If I put those lines into the standalone-full-ha.xml of Wildfly 22 I get the following error when deploying an appliction that uses fault-tolerance:
> WELD-001408: Unsatisfied dependencies for type MetricRegistry with qualifiers @Default
> @Inject io.smallrye.faulttolerance.metrics.MetricsCollectorFactory.registry
>
> I already have these lines in the standalone:
> <extension module="org.wildfly.extension.metrics"/>
> <extension module="org.wildfly.extension.health"/>
>
> Is there something else I need to add in the standalone in order to keep using fault-tolerance in Wildfly 22?
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14189) The RunAs annotation doesn't work in EJBs with Elytron
by Alessandro Moscatelli (Jira)
[ https://issues.redhat.com/browse/WFLY-14189?page=com.atlassian.jira.plugi... ]
Alessandro Moscatelli commented on WFLY-14189:
----------------------------------------------
<default-security-domain value="other"/>
<application-security-domains>
<application-security-domain name="other" enable-jacc="true" security-domain="ApplicationDomain"/>
</application-security-domains>
> The RunAs annotation doesn't work in EJBs with Elytron
> ------------------------------------------------------
>
> Key: WFLY-14189
> URL: https://issues.redhat.com/browse/WFLY-14189
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Security
> Affects Versions: 21.0.0.Final
> Reporter: Alessandro Moscatelli
> Assignee: Diana Vilkolakova
> Priority: Major
> Labels: ejb, elytron, regression, runas, security, startup
> Attachments: standalone-full-ha.new.xml, test.zip
>
>
> Role is not correctly assigned when using @RunAs annotation and Elytron Security Domain. Everything works correctly with legacy picketbox Security Domain.
> Wildfly is configured to use default "other" application-security-domain, also using default security domain ApplicationDomain.
> This exception is rised when deploying the application.
> Caused by: javax.ejb.EJBAccessException: WFLYEJB0364: Invocation on method: public abstract void org.visiontech.test.TestInterface.test() of bean: Test2 is not allowedCaused by: javax.ejb.EJBAccessException: WFLYEJB0364: Invocation on method: public abstract void org.visiontech.test.TestInterface.test() of bean: Test2 is not allowed at org.jboss.as.ejb3@21.0.0.Final//org.jboss.as.ejb3.security.JaccInterceptor.hasPermission(JaccInterceptor.java:120)
> Test/Sample project: [^test.zip]
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFLY-14189) The RunAs annotation doesn't work in EJBs with Elytron
by Alessandro Moscatelli (Jira)
[ https://issues.redhat.com/browse/WFLY-14189?page=com.atlassian.jira.plugi... ]
Alessandro Moscatelli commented on WFLY-14189:
----------------------------------------------
[~dvilkola] with PicketBox I used jboss-app.xml also. But that seemed ok to me since every other security feature also requires it while using PicketBox. Without jboss-app.xml HttpAuthenticationMechanism isn't triggered, for example.
With Elytron, everything works without jboss-app.xml but RunAs doesn't. That looked like something somebody forgot to update to me.
Also, I followed a couple of tutorials (without mention of RunAs annotation) for Elytron with examples without jboss-app.xml or jboss-web.xml so I imagined Elytron was designed to work without it.
If this is the intended behavior that's ok to me, even if I am not a big fan of configuration files. I'd rather have RunAs to stick with the default security domain like the rest of features. Even more since I specified the application security domain in both EJB sub system and undertow subsystems.
Thank you
> The RunAs annotation doesn't work in EJBs with Elytron
> ------------------------------------------------------
>
> Key: WFLY-14189
> URL: https://issues.redhat.com/browse/WFLY-14189
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Security
> Affects Versions: 21.0.0.Final
> Reporter: Alessandro Moscatelli
> Assignee: Diana Vilkolakova
> Priority: Major
> Labels: ejb, elytron, regression, runas, security, startup
> Attachments: standalone-full-ha.new.xml, test.zip
>
>
> Role is not correctly assigned when using @RunAs annotation and Elytron Security Domain. Everything works correctly with legacy picketbox Security Domain.
> Wildfly is configured to use default "other" application-security-domain, also using default security domain ApplicationDomain.
> This exception is rised when deploying the application.
> Caused by: javax.ejb.EJBAccessException: WFLYEJB0364: Invocation on method: public abstract void org.visiontech.test.TestInterface.test() of bean: Test2 is not allowedCaused by: javax.ejb.EJBAccessException: WFLYEJB0364: Invocation on method: public abstract void org.visiontech.test.TestInterface.test() of bean: Test2 is not allowed at org.jboss.as.ejb3@21.0.0.Final//org.jboss.as.ejb3.security.JaccInterceptor.hasPermission(JaccInterceptor.java:120)
> Test/Sample project: [^test.zip]
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months
[Red Hat JIRA] (WFCORE-4516) Allow server-identities expression resolution to support Base64 encoded system properties.
by Ilia Vassilev (Jira)
[ https://issues.redhat.com/browse/WFCORE-4516?page=com.atlassian.jira.plug... ]
Ilia Vassilev reassigned WFCORE-4516:
-------------------------------------
Assignee: Ilia Vassilev
> Allow server-identities expression resolution to support Base64 encoded system properties.
> ------------------------------------------------------------------------------------------
>
> Key: WFCORE-4516
> URL: https://issues.redhat.com/browse/WFCORE-4516
> Project: WildFly Core
> Issue Type: Feature Request
> Components: Management, Security
> Reporter: Indrajit Ingawale
> Assignee: Ilia Vassilev
> Priority: Major
>
> The expression for secret value under server-identities in test-security-realm does not work , even though it shows "expressions-allowed" to true like below .
> ----------------------------
> [standalone@localhost:9990 /] /core-service=management/security-realm=test-security-realm/server-identity=secret:read-resource-description()
> {
> "outcome" => "success",
> .
> .
> "attributes" =>
> {. . . . . }
> ,
> "value" =>
> { "type" => STRING, "description" => "The secret / password - Base64 Encoded.", "expressions-allowed" => true, "required" => true, "nillable" => true, "alternatives" => ["credential-reference"], "min-length" => 1L, "max-length" => 2147483647L, "access-type" => "read-write", "storage" => "configuration", "restart-required" => "no-services" }
> },
> "operations" => undefined,
> "notifications" => undefined,
> "children" => {}
> }
> }
> ----------------------------
--
This message was sent by Atlassian Jira
(v8.13.1#813001)
5 years, 3 months