我正在尝试将名为 的数据源 xml 文件添加oracle-ds.xml
到我的 JBoss 7.1 文件夹中,以便我在该服务器上部署的项目可以使用该数据源。
正如jboss.org上解释的那样,我需要将该文件放在部署文件夹中。
这就是我所做的。但与他们在上面的链接中所说的不同,我在本地 maven 存储库中有我的 Orcale 驱动程序 jar。无论如何,maven 能够构建项目。
现在当我重新启动Jboss时,它似乎oracle-ds.xml
是一个需要部署的项目(jar),而不是一个xml设置文件......
以下是 Jboss 重启期间的一些控制台输出:
15:58:16,666 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "oracle-ds.xml"
15:58:16,728 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."oracle-ds.xml".PARSE: org.jboss.msc.se
rvice.StartException in service jboss.deployment.unit."oracle-ds.xml".PARSE: Failed to process phase PARSE of deployment "oracle-ds.xml"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: local-tx-datasource
at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:85)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource
at org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:183)
at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:119)
at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:82)
at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:80)
... 6 more
为什么会发生这种情况,我应该怎么做才能纠正这种行为?