Wildfly 9.0.1.Final: EAR deployment failed

后端 未结 1 423
天涯浪人
天涯浪人 2021-01-27 15:56

I am trying to deploy my struts based web application on Wildfly 9.0.1.Final.

I am deploying as an .ear file that contains .war/.jar(EJB) files.

But it gives me

相关标签:
1条回答
  • 2021-01-27 16:21

    You have to make sure your datasource is defined. In your standalone-full.xml you need to include the definition, something like:

    <datasource jndi-name="java:datasources/WEBFDMS" pool-name="WEBFDMS" enabled="true" use-java-context="true">
        <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
        <driver>h2</driver>
        <security>
            <user-name>sa</user-name>
            <password>sa</password>
        </security>
    </datasource>
    

    "java:datasources/WEBFDMS" might have to be "java:jboss/datasources/WEBFDMS"

    Of course, this datasource definition will simply create an in-memory datasource. In order to connect to a running database (mysql, oracle, etc) you will have to configure it differently.

    0 讨论(0)
提交回复
热议问题