Failed to start jboss.deployment.unit.“war”.POST_MODULE
menorah84 Feb 4, 2015 6:17 AM
|
I created a Maven Project using the RESTful Web Service from Database in NetBeans by following this tutorial: http://jaxenter.com/from-database-to-restful-web-service-to-html5-in-10-minutes-105524.html and http://jaxenter.com/from-database-to-restful-web-service-to-html5-in-five-minutes-107078.html When I tried to run this in Glassfish 4.1 as a packaged war file, my RESTful Web Service works fine. However, I want to use JBoss EAP 6.1 instead of Glassfish, however it ran into many problems. Here's the message from JBoss when I run
|
My pom.xml (some parts of it Auto-generated by NetBeans) is:
@<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mhc</groupId>
<artifactId>mhc-maven-jboss</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>mhc-maven-jboss</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.5.Final</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>unknown-jars-temp-repo</id>
<name>A temporary repository created by NetBeans for libraries and jars it could not identify. Please replace the dependencies in this repository with correct ones and delete this repository.</name>
<url>file:${project.basedir}/lib</url>
</repository>
</repositories>
</project>
My persistence.xml is (which is almost the same with the one I created using Glassfish server):
@<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="mhcDS" transaction-type="JTA">
<jta-data-source>java:jboss/datasources/mhcDS</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties/>
</persistence-unit>
</persistence>
And my JBoss' standalone.xml datasource:
@<datasource jndi-name="java:jboss/datasources/mhcDS" pool-name="mhcDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://127.0.0.1:3306/mhcdb</connection-url>
<connection-property name="useUnicode">
true
</connection-property>
<connection-property name="characterEncoding">
utf8
</connection-property>
<connection-property name="autoReconnect">
true
</connection-property>
<driver>mysql-jdbc</driver>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>25</max-pool-size>
</pool>
<security>
<user-name>root</user-name>
<password>password</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
<check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
</validation>
<timeout>
<idle-timeout-minutes>1</idle-timeout-minutes>
</timeout>
<statement>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
</statement>
</datasource>
Could someone explain how to resolve this?