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)