当我使用wildfly启动项目时出现问题

时间:2019-08-07 09:46:11

标签: java web-services wildfly

当我尝试使用WildFly启动项目时,出现此错误消息:

11:25:02,066 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."vip.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."vip.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "vip.war"
    at org.jboss.as.server@8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
    at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
    at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
    at org.jboss.msc@1.4.5.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
    at org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
    at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: local-tx-datasource
    at org.jboss.as.connector@16.0.0.Final//org.jboss.as.connector.deployers.ds.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:105)
    at org.jboss.as.server@8.0.0.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
    ... 8 more
Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource
    at org.jboss.ironjacamar.impl@1.4.12.Final//org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:194)
    at org.jboss.ironjacamar.impl@1.4.12.Final//org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:120)
    at org.jboss.ironjacamar.impl@1.4.12.Final//org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:79)
    at org.jboss.as.connector@16.0.0.Final//org.jboss.as.connector.deployers.ds.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:90)
    ... 9 more

11:25:02,144 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "vip.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"vip.war\".PARSE" => "WFLYSRV0153: Failed to process phase PARSE of deployment \"vip.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: local-tx-datasource
    Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource"}}
11:25:02,207 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 43) WFLYSRV0010: Deployed "vip.war" (runtime-name : "vip.war")
11:25:02,207 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.unit."vip.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "vip.war"

11:25:02,285 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
11:25:02,285 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
11:25:02,285 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
11:25:02,285 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) started (with errors) in 13658ms - Started 316 of 543 services (1 services failed or missing dependencies, 325 services are lazy, passive or on-demand)

也许问题是因为某个地方缺少元素? 有人可以向我解释我该如何解决?

2 个答案:

答案 0 :(得分:0)

在我的文件oracle-ds.xml中,我有:

 <?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>oracleDS</jndi-name> 
    <connection-url>jdbc:oracle:thin:@*****.com:1626:IMAGE</connection-url>
    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
    <user-name>***</user-name>
    <password>******</password>
    <connection-property name="char.encoding">UTF-8</connection-property>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
    <metadata>
         <type-mapping>Oracle9i</type-mapping>
    </metadata>
    <min-pool-size>10</min-pool-size>
    <max-pool-size>100</max-pool-size>
    <use-java-context>false</use-java-context>
  </local-tx-datasource>
</datasources>

<!-- 
<connection-url>jdbc:oracle:thin:@*********:IMAGE</connection-url>
<connection-url>jdbc:oracle:thin:@*****.com:1626:IMAGE</connection-url>
<connection-url>jdbc:oracle:thin:@localhost:1626:IMAGE</connection-url>
 --> 

也许这里缺少一行?

答案 1 :(得分:0)

所有配置错误。您需要重新设计数据源配置。因为您的配置可以使用JBoss 6而不是Wildfly 16。

This tutorial将帮助您创建数据源。 this page展示了如何将数据源从JBoss6迁移到Wildfly或JBoss AS 7。