java - 使用 -ds.xml 配置无法从 jboss as 6 迁移到 jboss eap 7.1

标签 java jboss

第一次提问。 请帮我解决这个问题。

我已完成从 AS6 到 EAP7.1 的迁移。但是,-ds.xml 仍然有问题

10:26:01,286 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "mySource.war")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"mySource.war\".FIRST_MODULE_USE" => "WFLYSRV0153: Failed to process phase FIRST_MODULE_USE of deployment \"mySource.war\"
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYJCA0064: Exception deploying datasource java:jboss/datasources/jt400
    Caused by: java.lang.IllegalArgumentException: Empty name segment is not allowed for jdbc-driver"}}

上图是我尝试在 JBoss EAP 7.x 上调试源代码时的问题日志。 下面是我的 jt400.xml 文件内容之一。

<datasource connectable="false" enabled="true" jndi-name="java:jboss/datasources/jt400" jta="true" pool-name="jt400" spy="false" use-ccm="true" use-java-context="true">
    <connection-url>jdbc:as400://127.0.0.1</connection-url>
    <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
    <datasource-class/>
    <driver/>
    <transaction-isolation>TRANSACTION_NONE</transaction-isolation>
    <pool>
      <min-pool-size>0</min-pool-size>
      <initial-pool-size>0</initial-pool-size>
      <max-pool-size>30</max-pool-size>
      <prefill>false</prefill>
      <use-strict-min>false</use-strict-min>
      <flush-strategy>FailingConnectionOnly</flush-strategy>
    </pool>
    <security>
      <user-name>sa</user-name>
      <password>sa</password>
    </security>
    <validation>
      <check-valid-connection-sql>SELECT * FROM SYSIBM.SYSDUMMY1</check-valid-connection-sql>
      <use-fast-fail>false</use-fast-fail>
    </validation>
    <timeout>
      <blocking-timeout-millis>5000</blocking-timeout-millis>
      <idle-timeout-minutes>15</idle-timeout-minutes>
      <xa-resource-timeout>0</xa-resource-timeout>
    </timeout>
    <statement>
      <track-statements>false</track-statements>
    </statement>
  </datasource>

最后,我将驱动程序文件(jt400.jar)复制到standalone/lib路径中。

我不知道如何解决这个问题... 请任何人帮助我...这对我来说非常头疼哈哈...

谢谢!

最佳答案

我认为您的问题是这条线驱动程序。不能为空,需要定义驱动程序。举例来说:

  <driver>mysql</driver>

在定义驱动程序本身之后,在本例中:

 <drivers>                    
    <driver name="mysql" module="com.mysql">
       <driver-class>com.mysql.cj.jdbc.Driver</driver-class>
       <xa-datasource-class>com.mysql.cj.jdbc.MysqlXADataSource</xa-datasource-class>
     </driver>
 </drivers>

如果您添加该区域,您将解决错误消息。

关于java - 使用 -ds.xml 配置无法从 jboss as 6 迁移到 jboss eap 7.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59605825/

相关文章:

Java SWT 日期时间 : Determine day of Week

java - 如何在 arquillian 服务部署中添加库?

java - "Source not found"消息在 Eclipse 中与 JBoss 在 Debug模式下 - 断点在我的代码中

java - 在 spring 集成中将多个有效负载嵌入到 "Message"对象中的最佳方法是什么?

java - 检查文件是否可以作为 BufferedImage 读取

java - 从Java中的谷歌地图API解析Json数组

java - 使用元组作为键的 Hashmap

JBoss EAP 6.4 : NoClassDefFoundError on class sun. 安全.jca.GetInstance

json - 字符集编码 Tomcat Windows/JBoss Linux

java - Jboss-CLI 无法从远程连接