I'm trying to deploy a Spring application in a Wildfly container, but when start container the application don't start correctly.
I tried some tutorials that only write the SpringBootApplication main class extending SpringBootServletInitializer and added spring-boot-starter-web dependency removing tomcat and adding javax.servlet-api works fine, but when I put this settings to my project it's don't work
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
</parent>
<groupId>br.com.site</groupId>
<artifactId>oAuth2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>oAuth2</name>
<properties>
<maven.compiler.plugin.version>3.8.1</maven.compiler.plugin.version>
<javax.activation.version>1.1.1</javax.activation.version>
<maven.war.plugin.version>3.2.3</maven.war.plugin.version>
<jaxb.api.version>2.3.0</jaxb.api.version>
<java.version>11</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>rt</artifactId>
<version>${jaxb.api.version}</version>
<exclusions>
<exclusion>
<artifactId>jaxb-api</artifactId>
<groupId>javax.xml.bind</groupId>
</exclusion>
<exclusion>
<artifactId>stax-ex</artifactId>
<groupId>org.jvnet.staxex</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.api.version}</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax.activation.version}</version>
</dependency>
<build>
<finalName>${project.name}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven.war.plugin.version}</version>
<configuration>
<warName>${project.name}</warName>
<archive>
<manifestEntries>
<Dependencies>jdk.unsupported</Dependencies>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.version}</release>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
</configuration>
</plugin>
</plugins>
</build>
</project>
SpringBootApplication
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
#SpringBootApplication(exclude = {ErrorMvcAutoConfiguration.class})
public class OAuth2Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(OAuth2Application.class, args);
}
#Override
protected SpringApplicationBuilder configure(final SpringApplicationBuilder application) {
return application.sources(OAuth2Application.class);
}
}
Dockerfile
FROM jboss/base-jdk:11
# Set the WILDFLY_VERSION env variable
ENV WILDFLY_VERSION 17.0.1.Final
ENV WILDFLY_SHA1 eaef7a87062837c215e54511c4ada8951f0bd8d5
ENV JBOSS_HOME /opt/jboss/wildfly
USER root
RUN cd $HOME \
&& curl -O https://download.jboss.org/wildfly/$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz \
&& sha1sum wildfly-$WILDFLY_VERSION.tar.gz | grep $WILDFLY_SHA1 \
&& tar xf wildfly-$WILDFLY_VERSION.tar.gz \
&& mv $HOME/wildfly-$WILDFLY_VERSION $JBOSS_HOME \
&& rm wildfly-$WILDFLY_VERSION.tar.gz \
&& chown -R jboss:0 ${JBOSS_HOME} \
&& chmod -R g+rw ${JBOSS_HOME}
ENV LAUNCH_JBOSS_IN_BACKGROUND true
USER jboss
EXPOSE 8080
ADD oAuth2.war /opt/jboss/wildfly/standalone/deployments/
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
Wildfly Logs
12:47:02,979 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of "oAuth2.war" (runtime-name: "oAuth2.war")
12:47:03,148 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
12:47:03,267 INFO [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBossWS 5.3.0.Final (Apache CXF 3.3.2)
12:47:08,139 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry jaxb-core.jar in /content/oAuth2.war/WEB-INF/lib/jaxb-impl-2.3.0.jar does not point to a valid jar for a Class-Path reference.
12:47:08,149 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0059: Class Path entry jaxb-api.jar in /content/oAuth2.war/WEB-INF/lib/jaxb-core-2.3.0.jar does not point to a valid jar for a Class-Path reference.
12:47:09,479 WARN [org.jboss.as.ee] (MSC service thread 1-2) WFLYEE0007: Not installing optional component org.springframework.http.server.reactive.ServletServerHttpResponse$ResponseAsyncListener due to an exception (enable DEBUG log level to see the cause)
12:47:09,502 WARN [org.jboss.as.ee] (MSC service thread 1-2) WFLYEE0007: Not installing optional component org.springframework.http.server.reactive.ServletHttpHandlerAdapter$HandlerResultAsyncListener due to an exception (enable DEBUG log level to see the cause)
12:47:09,532 WARN [org.jboss.as.ee] (MSC service thread 1-2) WFLYEE0007: Not installing optional component org.springframework.http.server.ServletServerHttpAsyncRequestControl due to an exception (enable DEBUG log level to see the cause)
12:47:09,534 WARN [org.jboss.as.ee] (MSC service thread 1-2) WFLYEE0007: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause)
12:47:09,539 WARN [org.jboss.as.ee] (MSC service thread 1-2) WFLYEE0007: Not installing optional component org.springframework.http.server.reactive.ServletServerHttpRequest$RequestAsyncListener due to an exception (enable DEBUG log level to see the cause)
12:47:09,801 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-4) ISPN000128: Infinispan version: Infinispan 'Infinity Minus ONE +2' 9.4.14.Final
12:47:09,844 WARN [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0013: Deployment oAuth2.war contains CDI annotations but no bean archive was found (no beans.xml or class with bean defining annotations was present).
12:47:10,395 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 76) WFLYCLINF0002: Started client-mappings cache from ejb container
12:47:10,606 INFO [io.undertow.servlet] (ServerService Thread Pool -- 83) 2 Spring WebApplicationInitializers detected on classpath
Handler java.util.logging.ConsoleHandler is not defined
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.sun.xml.bind.v2.runtime.reflect.opt.Injector (vfs:/content/oAuth2.war/WEB-INF/lib/jaxb-impl-2.3.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of com.sun.xml.bind.v2.runtime.reflect.opt.Injector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
I found the error. Removing this dependency the application works fine
<dependency>
<groupId>de.svenkubiak</groupId>
<artifactId>embedded-mongodb</artifactId>
<version>5.0.2</version>
<scope>compile</scope>
</dependency>
Related
We have this application live in production with weblogic 10.3.4 ,JSF( Mojara 2.1.7) and primefaces 4.0. While migration with some configuration and code changes i was able deploy EAR on JBoss EAP 6.4 and then i found this issue of web resources getting failed in the browser console (mainly js and css resouces added by primefaces).Hence the page loads partially with below errors.
**Name** **Status** **Type**
homePage.xhtml 200 document
primefaces.css.xhtml?ln=primefaces&v=4.0 (failed) stylesheet
jquery.js.xhtml?ln=primefaces&v=4.0 (failed) script
jquery-plugins.js.xhtml?ln=primefaces&v=4.0 (failed)net::ERR_INCOMPLETE_CHUNKED_ENCODING script
utx.css (failed) stylesheet
primefaces.css (failed) stylesheet
theme.css (failed) stylesheet
adminBlue.css (failed) stylesheet
homePage.xhtml:350 Uncaught ReferenceError: PrimeFaces is not defined
at homePage.xhtml:350
homePage.xhtml:356 Uncaught TypeError: $ is not a function
at homePage.xhtml:356
jquery-plugins.js.xhtml?ln=primefaces&v=4.0:11 Uncaught ReferenceError: jQuery is not defined
at jquery-plugins.js.xhtml?ln=primefaces&v=4.0:11
Libraries are bundled in WEB-INF\lib of each wars. Only the libraries which are provided by jboss as modules i have kept as scope "provided" in POMs for them. Primefaces-4.0.jar as well is bundled in WEB-INF\lib of each of the wars. JSF in use is of JBOSS EAP 6.4 implemented jsf module mojara-2.1.28.
EAR Structure :
|--/META-INF/application.xml
|--/META-INF/jboss-deployment-structure.xml
|--/war1.war
|--/WEB-INF/lib
|--/WEB-INF/faces-config.xml
|--/WEB-INF/jboss-web.xml
|--/WEB-INF/web.xml
|--/war2.war
|--/WEB-INF/lib
|--/WEB-INF/faces-config.xml
|--/WEB-INF/jboss-web.xml
|--/WEB-INF/web.xml
Jboss-deployment-structure.xml
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<ear-subdeployments-isolated>true</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="com.oracle.ojdbc" />
</dependencies>
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.jboss.log4j" />
<module name="org.jboss.logging" />
</exclusions>
</deployment>
<sub-deployment name="war1.war">
<dependencies>
<module name="com.oracle.ojdbc" />
</dependencies>
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.jboss.log4j" />
<module name="org.jboss.logging" />
</exclusions>
</sub-deployment>
<sub-deployment name="war2.war">
<dependencies>
<module name="com.oracle.ojdbc" />
</dependencies>
<exclusions>
<module name="org.apache.log4j" />
<module name="org.slf4j" />
<module name="org.jboss.log4j" />
<module name="org.jboss.logging" />
</exclusions>
</sub-deployment>
</jboss-deployment-structure>
POM :
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>war1_groupID</groupId>
<artifactId>war1_ID</artifactId>
<packaging>war1</packaging>
<version>1.0 </version>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.2 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1 </version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1 </version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0 </version> <scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.3.1 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.7 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.7 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.0 </version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.0 </version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.7 </version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2 </version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>1.5.8 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>1.4.2 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0 </version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.0 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.3 </version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.5.0 </version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2 </version>
<executions>
<execution>
<id>default-war</id>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>APP-INF/lib/</classpathPrefix>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<archive>
<manifestEntries>
<Specification-Title>FRM</Specification-Title>
<Specification-Version>Redesign</Specification-Version>
<Implementation-Version>${release.number}</Implementation-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
Namespaces on xhtml :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
Logs prints JBOSS implemented Mojarra -2.1.28:
10:41:42,972 INFO [org.jboss.as] (MSC service thread 1-7) JBAS015899: JBoss EAP 6.4.15.GA (AS 7.5.15.Final-redhat-3) starting
10:41:43,048 INFO [org.xnio] (MSC service thread 1-5) XNIO Version 3.0.16.GA-redhat-1
10:41:43,054 INFO [org.xnio.nio] (MSC service thread 1-5) XNIO NIO Implementation Version 3.0.16.GA-redhat-1
10:41:43,071 INFO [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 3.3.9.Final-redhat-1
10:42:00,484 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 36) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
10:42:00,501 INFO [org.jboss.as.security] (ServerService Thread Pool -- 38) JBAS013371: Activating Security Subsystem
10:42:00,506 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 43) JBAS011800: Activating Naming Subsystem
10:42:00,536 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 55) JBAS010280: Activating Infinispan subsystem.
10:42:00,521 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
10:42:00,548 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 34) JBAS015537: Activating WebServices Extension
10:42:00,573 INFO [org.jboss.as.jacorb] (ServerService Thread Pool -- 54) JBAS016300: Activating JacORB Subsystem
10:42:00,583 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 59) JBAS016200: Activating ConfigAdmin Subsystem
10:42:00,570 INFO [org.jboss.as.security] (MSC service thread 1-4) JBAS013370: Current PicketBox version=4.1.5.Final-redhat-1
10:42:00,594 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 47) JBAS012615: Activated the following JSF Implementations: [main, 1.2]
10:42:00,742 INFO [org.jboss.as.connector.logging] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.38.Final-redhat-3)
10:42:00,742 INFO [org.jboss.as.naming] (MSC service thread 1-3) JBAS011802: Starting Naming Service
10:42:00,744 INFO [org.jboss.as.mail.extension] (MSC service thread 1-6) JBAS015400: Bound mail session [java:jboss/mail/Default]
10:42:00,764 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
10:42:00,869 INFO [org.jboss.jaxr] (MSC service thread 1-6) JBAS014000: Started JAXR subsystem, binding JAXR connection factory into JNDI as: java:jboss/jaxr/ConnectionFactory
10:42:01,181 INFO [org.apache.catalina.core] (MSC service thread 1-8) JBWEB001065: The native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
10:42:01,308 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) JBWEB003001: Coyote HTTP/1.1 initializing on : http-10.40.32.154:8080
10:42:01,344 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-3) JBWEB003000: Coyote HTTP/1.1 starting on: http-10.40.32.154:8080
10:42:01,378 INFO [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.6.Final-redhat-1
10:42:01,367 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221000: live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messagingjournal,bindingsDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messagingbindings,largeMessagesDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messaginglargemessages,pagingDirectory=/app/jboss-eap-6.4/domain/servers/Server_1/data/messagingpaging)
10:42:01,381 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221006: Waiting to obtain live lock
10:42:01,410 INFO [org.jboss.as.jacorb] (MSC service thread 1-7) JBAS016330: CORBA ORB Service started
10:42:01,423 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221013: Using NIO Journal
10:42:01,479 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221034: Waiting to obtain live lock
10:42:01,479 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221035: Live Server Obtained live lock
10:42:01,759 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221020: Started Netty Acceptor version 3.6.10.Final-266dbdf 10.40.32.154:5445 for CORE protocol
10:42:01,765 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221020: Started Netty Acceptor version 3.6.10.Final-266dbdf 10.40.32.154:5455 for CORE protocol
10:42:01,768 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221007: Server is now live
10:42:01,768 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ221001: HornetQ Server version 2.3.25.SP18 (2.3.25.SP18, 123) [a90888a3-643e-11ea-a637-39e0628d872d]
10:42:01,793 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 63) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
10:42:01,802 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 64) HQ221003: trying to deploy queue jms.queue.DLQ
10:42:01,813 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 64) JBAS011601: Bound messaging object to jndi name java:/jms/queue/DLQ
10:42:01,814 INFO [org.hornetq.core.server] (ServerService Thread Pool -- 62) HQ221003: trying to deploy queue jms.queue.ExpiryQueue
10:42:01,815 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 62) JBAS011601: Bound messaging object to jndi name java:/jms/queue/ExpiryQueue
10:42:01,816 INFO [org.jboss.as.messaging] (ServerService Thread Pool -- 61) JBAS011601: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
10:42:18,219 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-1) JBAS010406: Registered connection factory java:/JmsXA
10:42:18,258 INFO [org.hornetq.ra] (MSC service thread 1-1) HornetQ resource adaptor started
10:42:18,259 INFO [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-1) IJ020002: Deployed: file://RaActivatorhornetq-ra
10:42:18,261 INFO [org.jboss.as.connector.deployment] (MSC service thread 1-1) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
10:42:35,425 INFO [org.jboss.as.jacorb] (MSC service thread 1-7) JBAS016328: CORBA Naming Service started
10:43:08,463 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010403: Deploying JDBC-compliant driver class com.sap.db.jdbc.Driver (version 1.0)
10:43:08,469 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.0)
10:43:08,473 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.0)
10:43:08,477 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 42.1)
10:43:08,480 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 58) JBAS010404: Deploying non-JDBC-compliant driver class com.edb.Driver (version 9.2)
10:43:08,526 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:/JDBCDataSource1]
10:43:08,528 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) JBAS010400: Bound data source [java:/JDBCDataSource2]
10:43:08,527 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on 10.40.32.154:4447
10:43:08,530 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "EAR.ear" (runtime-name: "EAR.ear")
10:43:09,129 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015973: Starting subdeployment (runtime-name: "War1.war")
10:43:09,130 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015973: Starting subdeployment (runtime-name: "War2.war")
10:43:09,425 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015852: Could not index class javax/mail/internet/MimeUtility$1NullInputStream.class at /content/EAR.ear/War1.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242]
at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242]
at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242]
10:43:09,437 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015852: Could not index class weblogic/utils/classloaders/ClasspathClassFinder$ZipFileWrapper.class at /content/EAR.ear/War1.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242]
at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242]
at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242]
10:43:09,456 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015852: Could not index class javax/mail/internet/MimeUtility$1NullInputStream.class at /content/EAR.ear/War2.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242]
at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242]
at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242]
10:43:09,465 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015852: Could not index class weblogic/utils/classloaders/ClasspathClassFinder$ZipFileWrapper.class at /content/EAR.ear/War2.war/WEB-INF/lib/webserviceclient-10.3.4.jar: java.io.EOFException
at java.io.DataInputStream.readFully(DataInputStream.java:197) [rt.jar:1.8.0_242]
at java.io.DataInputStream.readFully(DataInputStream.java:169) [rt.jar:1.8.0_242]
at org.jboss.jandex.Indexer.verifyMagic(Indexer.java:441) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.jandex.Indexer.index(Indexer.java:697) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.15.Final-redhat-3.jar:7.5.15.Final-redhat-3]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_242]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_242]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_242]
10:43:10,977 INFO [org.jboss.web] (ServerService Thread Pool -- 71) JBAS018210: Register web context: /context1
10:43:10,977 INFO [org.jboss.web] (ServerService Thread Pool -- 72) JBAS018210: Register web context: /context2
10:43:11,001 INFO [org.apache.catalina.core] (ServerService Thread Pool -- 72) JBWEB001093: The listener com.sun.faces.config.ConfigureListener is already configured for this context, the duplicate definition has been ignored
10:43:11,005 INFO [org.apache.catalina.core] (ServerService Thread Pool -- 71) JBWEB001093: The listener com.sun.faces.config.ConfigureListener is already configured for this context, the duplicate definition has been ignored
10:43:28,235 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 72) **Initializing Mojarra 2.1.28.SP11** for context '/context1'
10:43:28,241 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 71) **Initializing Mojarra 2.1.28.SP11** for context '/context2'
10:43:28,759 INFO [org.hibernate.validator.internal.util.Version] (ServerService Thread Pool -- 71) HV000001: Hibernate Validator 4.3.3.Final-redhat-1
10:43:29,360 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 71) **Running on PrimeFaces 4.0**
10:43:29,360 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 72) Running on PrimeFaces 4.0
10:44:04,563 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015859: Deployed "EAR.ear" (runtime-name : "EAR.ear")
10:44:04,584 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.4.15.GA (AS 7.5.15.Final-redhat-3) started in 142266ms - Started 508 of 545
Hope the details suffice. Thanks
I'm developing a Spring boot application.
I'm building a war file for JBoss
My war is building correctly , I'm using *-war.original as deployment for JBoss
the deployment seems fine
But when I make call to controller, it's throwing a 404
With embedded sever it's working fine
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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>com.my.service</groupId>
<artifactId>my-api</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.1.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Swagger UI Depedency -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>
<!-- Oracle JDBC driver -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<properties>
<java.version>1.8</java.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- <version>2.0.1.RELEASE</version> -->
<!-- https://stackoverflow.com/questions/43641664/why-spring-boot-generate-jar-or-war-file-with-original-extention -->
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<phase>package</phase>
<!-- https://stackoverflow.com/questions/30325549/only-generate-one-war-during-package -->
</execution>
</executions>
</plugin>
<!-- This configuration helps to generate war file without web.xml, spring
boot projects -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
SpringBootServletInitializer
#SpringBootApplication
public class ServletInitializer extends SpringBootServletInitializer{
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MyApiApplication.class);
}
#Override
public void onStartup(ServletContext servletContext) throws ServletException{
super.onStartup(servletContext);
}
}
Deployment log
12:01:09,605 INFO [stdout] (ServerService Thread Pool -- 162) ::
Spring Boot :: (v2.0.1.RELEASE)
2018-04-24 12:01:09,605 [ServerService Thread Pool -- 162] INFO (AbstractLoggingWriter.java:71) - :: Spring Boot ::
(v2.0.1.RELEASE)
12:01:09,605 INFO [stdout] (ServerService Thread Pool -- 162)
2018-04-24 12:01:09,605 [ServerService Thread Pool -- 162] INFO (AbstractLoggingWriter.java:71) -
12:01:09,669 INFO [com.aerlingus.dei.subscriber.api.ServletInitializer] (ServerService
Thread Pool -- 162) Starting ServletInitializer on USER with PID 10692
(started by ADMIN in C:\pathto\jboss-eap-7.1\bin)
2018-04-24 12:01:09,669 [ServerService Thread Pool -- 162] INFO (JBossLog.java:134) - Starting ServletInitializer on CND7064JRN with
PID 10692 (started by ADMIN in C:\pathto\jboss-eap-7.1\bin)
2018-04-24 12:01:09,669 [ServerService Thread Pool -- 162] DEBUG (JBossLog.java:134) - Running with Spring Boot v2.0.1.RELEASE, Spring
v5.0.5.RELEASE
12:01:09,670 INFO [com.aerlingus.dei.subscriber.api.ServletInitializer] (ServerService
Thread Pool -- 162) The following profiles are active: uat
2018-04-24 12:01:09,670 [ServerService Thread Pool -- 162] INFO (JBossLog.java:134) - The following profiles are active: uat
12:01:09,686 INFO [org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext]
(ServerService Thread Pool -- 162) Refreshing
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#5023cb50:
startup date [Tue Apr 24 12:01:09 BST 2018]; root of context hierarchy
2018-04-24 12:01:09,686 [ServerService Thread Pool -- 162] INFO (JBossLog.java:134) - Refreshing
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#5023cb50:
startup date [Tue Apr 24 12:01:09 BST 2018]; root of context hierarchy
12:01:09,805 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]
(ServerService Thread Pool -- 162) JSR-330 'javax.inject.Inject'
annotation found and supported for autowiring
2018-04-24 12:01:09,805 [ServerService Thread Pool -- 162] INFO (JBossLog.java:134) - JSR-330 'javax.inject.Inject' annotation found
and supported for autowiring
12:01:09,816 INFO [io.undertow.servlet] (ServerService Thread Pool -- 162) Initializing Spring embedded WebApplicationContext
2018-04-24 12:01:09,816 [ServerService Thread Pool -- 162] INFO (ServletContextImpl.java:360) - Initializing Spring embedded
WebApplicationContext
12:01:09,816 INFO [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 162) Root WebApplicationContext:
initialization completed in 130 ms
2018-04-24 12:01:09,816 [ServerService Thread Pool -- 162] INFO (JBossLog.java:134) - Root WebApplicationContext: initialization
completed in 130 ms
12:01:09,987 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean]
(ServerService Thread Pool -- 162) Mapping filter: 'errorPageFilter'
to: [/*]
2018-04-24 12:01:09,987 [ServerService Thread Pool -- 162] INFO (JBossLog.java:134) - Mapping filter: 'errorPageFilter' to: [/*]
12:01:10,015 INFO [com.aerlingus.dei.subscriber.api.ServletInitializer] (ServerService
Thread Pool -- 162) Started ServletInitializer in 0.683 seconds (JVM
running for 4712.635)
2018-04-24 12:01:10,015 [ServerService Thread Pool -- 162] INFO (JBossLog.java:134) - Started ServletInitializer in 0.683 seconds (JVM
running for 4712.635)
12:01:10,021 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService
Thread Pool -- 162) Initializing Mojarra 2.2.13.SP3 for context
'/my-api'
2018-04-24 12:01:10,021 [ServerService Thread Pool -- 162] INFO (ConfigureListener.java:213) - Initializing Mojarra 2.2.13.SP3 for
context '/my-api'
12:01:11,566 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 162) WFLYUT0021: Registered web context: '/my-api' for
server 'default-server'
2018-04-24 12:01:11,566 [ServerService Thread Pool -- 162] INFO (Host.java:220) - WFLYUT0021: Registered web context: '/my-api' for
server 'default-server'
12:01:11,583 INFO [org.jboss.as.server] (External Management Request Threads -- 3) WFLYSRV0010: Deployed "my-api.war" (runtime-name
: "my-api.war")
2018-04-24 12:01:11,583 [External Management Request Threads -- 3] INFO (DeploymentHandlerUtil.java:171) - WFLYSRV0010: Deployed
"my-api.war" (runtime-name : "my-api.war")
WEB-INF/jboss-web.xml
<jboss-web>
<context-root>my-api</context-root>
</jboss-web>
similar to this
Getting "404 - Not found" error with Wildfly and springboot
Finally figured out what was wrong in I did, I have an Application class with main method without #SpringBootApplication along with SpringBootServletInitializer , So Jboss was not picking up the mapping correctly
The resolution was to make SpringBootServletInitializer class with main method. So I change ServletInitializermentioned in question
#SpringBootApplication
public class ServletInitializer extends SpringBootServletInitializer{
public static void main(String[] args) {
SpringApplication.run(ServletInitializer.class, args);
}
#Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(ServletInitializer.class);
}
#Override
public void onStartup(ServletContext servletContext) throws ServletException{
super.onStartup(servletContext);
}
}
After that I was able to hit endpoint,
Why I didn't do this earlier ??
I generated the project using
SPRING INITIALIZR with war packaging, When SPRING INITIALIZR generate project Application and SpringBootServletInitializer classes was there.
Among both classes Appliaction class has the main method and #SpringBootApplication annotation
While writing Integration test initially it was not working , Then I change #SpringBootApplication annotation to SpringBootServletInitializer and write a main method in SpringBootServletInitializer test start working. But I kept the main method back in Appliaction class that was the root cause of this issue.
Since Spring Initializer, generate the classes I was in assumption , all classes generated are required to build war .So I kept the Application class the way it's generated without #SpringBootApplication annotation while generating war file. I think Jboss got confused which main method it should run. And eventually throwing a 404 exception while hitting end point
I have a project where I use Spring boot to build a stand alone jar. It uses jersey to serve up the back end, and I have it configured to also host an angular/js front end in the resources folder.
The solution I would like is that this can be standalone in the jar file, and run by itself. But also have a configuration where we build it as a war file, and run it alongside another war inside of Wildfly.
I can get it to compile a war, but as soon as I try to start it up, it appears I get issues with Tomcat. Has anyone tried running an environment like this?
Here is the exception logs.
11:14:22,316 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC000001: Failed to start service jboss.deployment.unit."testApp-0.0.1-SNAPSHOT.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."testApp-0.0.1-SNAPSHOT.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "testApp-0.0.1-SNAPSHOT.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.2.1.Final-patch9.jar:8.2.1.Final-patch9]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_101]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_101]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:207)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:128)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.2.1.Final-patch9.jar:8.2.1.Final-patch9]
... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:199)
... 7 more
Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more from [Module "deployment.testApp-0.0.1-SNAPSHOT.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:191)
... 7 more
11:14:22,321 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "testApp-0.0.1-SNAPSHOT.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"testApp-0.0.1-SNAPSHOT.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"testApp-0.0.1-SNAPSHOT.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"testApp-0.0.1-SNAPSHOT.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more from [Module \"deployment.testApp-0.0.1-SNAPSHOT.war:main\" from Service Module Loader]"}}
11:14:22,323 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "testApp-0.0.1-SNAPSHOT.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"testApp-0.0.1-SNAPSHOT.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"testApp-0.0.1-SNAPSHOT.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"testApp-0.0.1-SNAPSHOT.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more from [Module \"deployment.testApp-0.0.1-SNAPSHOT.war:main\" from Service Module Loader]"}}
11:14:22,344 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-7) HV000001: Hibernate Validator 5.1.3.Final
11:14:25,469 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment testApp-0.0.1-SNAPSHOT.war (runtime-name: testApp-0.0.1-SNAPSHOT.war) in 3146ms
11:14:25,470 INFO [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."testApp-0.0.1-SNAPSHOT.war".INSTALL
[2018-03-09 11:14:25,528] Artifact testApp:war: Error during artifact deployment. See server log for details.
[2018-03-09 11:14:25,528] Artifact testApp:war: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"testApp-0.0.1-SNAPSHOT.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"testApp-0.0.1-SNAPSHOT.war\".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment \"testApp-0.0.1-SNAPSHOT.war\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS017327: Deployment error processing SCI for jar: tomcat-embed-websocket-8.5.28.jar
Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more from [Module \"deployment.testApp-0.0.1-SNAPSHOT.war:main\" from Service Module Loader]"}}
Here is my current pom file
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.dematic.wms</groupId>
<artifactId>app-workflow</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>app-workflow</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.7.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring.version>5.0.4.RELEASE</spring.version>
<!--<hsqldb.version>2.4.0</hsqldb.version>-->
<dbh2.version>1.4.195</dbh2.version>
<!--<derby.version>10.11.1.1</derby.version>-->
<wildfly.version>9.0.2.Final</wildfly.version>
<cargo.container.id>wildfly9x</cargo.container.id>
<cargo.container.url>http://download.jboss.org/wildfly/${wildfly.version}/wildfly-${wildfly.version}.zip
</cargo.container.url>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<artifactId>tomcat-embed-el</artifactId>
<groupId>org.apache.tomcat.embed</groupId>
</exclusion>
<exclusion>
<groupId>tomcat-embed-core</groupId>
<artifactId>org.apache.tomcat.embed</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat-embed-websocket</groupId>
<artifactId>org.apache.tomcat.embed</artifactId>
</exclusion>
<exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.26</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<packagingExcludes>WEB-INF/lib/tomcat-*.jar</packagingExcludes>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jdk8</id>
<activation>
<jdk>1.8</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>reserve-network-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<portNames>
<portName>appserver.port</portName>
<portName>appserver.ajp.port</portName>
<portName>appserver.transaction.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<configuration>
<properties>
<cargo.servlet.port>${appserver.port}</cargo.servlet.port>
<cargo.jboss.ajp.port>${appserver.ajp.port}</cargo.jboss.ajp.port>
<cargo.jboss.transaction.statusManager.port>
${appserver.transaction.port}
</cargo.jboss.transaction.statusManager.port>
<cargo.jboss.configuration>standalone-full</cargo.jboss.configuration>
</properties>
</configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<port>${appserver.port}</port>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
My war application is not deployed into WildFly 10.1.
Here's the log:
16:43:08,875 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "apontatouch.war" (runtime-name: "apontatouch.war")
16:43:09,315 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
16:43:09,932 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-1) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.4.Final
16:43:10,144 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,169 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 58) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,177 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,179 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 60) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,185 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 61) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,186 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 61) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
16:43:10,653 INFO [org.jboss.as.protocol] (management task-10) WFLYPRT0057: cancelled task by interrupting thread Thread[management-handler-thread - 1,5,management-handler-thread]
16:43:10,688 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
16:43:11,051 INFO [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6)
16:43:18,215 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003: Processing weld deployment apontatouch.war
16:43:18,432 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-1) HV000001: Hibernate Validator 5.2.4.Final
16:43:18,933 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0004: Deploying JDBC-compliant driver class com.microsoft.sqlserver.jdbc.SQLServerDriver (version 4.0)
16:43:18,996 INFO [org.jboss.weld.Version] (MSC service thread 1-4) WELD-000900: 2.3.5 (Final)
16:43:19,068 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = apontatouch.war_com.microsoft.sqlserver.jdbc.SQLServerDriver_4_0
16:43:20,438 INFO [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 4) WELD-001125: Illegal bean type interface java.util.Map<java.lang.Class<?>,class java.lang.Object> ignored on [EnhancedAnnotatedTypeImpl] public #Named #ApplicationScoped class br.com.caelum.vraptor.view.LinkToHandler
16:43:20,544 INFO [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 4) WELD-001125: Illegal bean type com.google.common.collect.ForwardingMap<java.lang.Class<?>, java.lang.Object> ignored on [EnhancedAnnotatedTypeImpl] public #Named #ApplicationScoped class br.com.caelum.vraptor.view.LinkToHandler
16:43:21,762 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "apontatouch.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.server.default-server.aponta"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.undertow.deployment.default-server.aponta./.UndertowDeploymentInfoService is missing [jboss.undertow.server.default-server.aponta]",
"jboss.undertow.deployment.default-server.aponta./ is missing [jboss.undertow.server.default-server.aponta]"
]
}
16:43:21,805 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "apontatouch.war" (runtime-name : "apontatouch.war")
16:43:21,847 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.undertow.server.default-server.aponta (missing) dependents: [service jboss.undertow.deployment.default-server.aponta./, service jboss.undertow.deployment.default-server.aponta./.UndertowDeploymentInfoService]
16:43:22,087 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
16:43:22,088 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
16:43:22,088 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 23335ms - Started 807 of 1059 services (3 services failed or missing dependencies, 404 services are lazy, passive or on-demand)
16:43:22,156 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0019: Stopped Driver service with driver-name = apontatouch.war_com.microsoft.sqlserver.jdbc.SQLServerDriver_4_0
16:43:23,793 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0028: Stopped deployment apontatouch.war (runtime-name: apontatouch.war) in 1661ms
16:43:23,889 WARN [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0357: Notification of type deployment-undeployed is not described for the resource at the address []
16:43:23,919 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0002: Content removed from location C:\Users\luis.infoture\Desktop\wildfly-10.1.0.Final\wildfly-10.1.0.Final\standalone\data\content\0f\38194460d90047fd70e65c404eef0bf7418570\content
16:43:23,920 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "apontatouch.war" (runtime-name: "apontatouch.war")
16:43:23,937 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
Here's my pom.xml:
<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>br.com.schmersal.svm</groupId>
<artifactId>apontatouch</artifactId>
<version>2.0</version>
<packaging>war</packaging>
<description>SVM Apontatouch para Android</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<weld.version>2.1.2.Final</weld.version>
</properties>
<dependencies>
<!-- VRaptor -->
<dependency>
<groupId>br.com.caelum</groupId>
<artifactId>vraptor</artifactId>
<version>4.2.0-RC5</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.paranamer</groupId>
<artifactId>paranamer</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>br.com.caelum.vraptor</groupId>
<artifactId>vraptor-jodatime</artifactId>
<version>4.1.0-RC3</version>
</dependency>
<!-- fim VRaptor -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time-hibernate</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.jadira.usertype</groupId>
<artifactId>usertype.core</artifactId>
<version>3.0.0.CR1</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-cdi</artifactId>
<version>5.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<!-- hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.10.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>4.3.10.Final</version>
</dependency>
<!-- fim hibernate -->
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
What's the problem, and how can I fix it?
Do you need default host at all? or only the virtual on?
you should be fine by doing something like this:
<server name="default-server" default-host="aponta">
<http-listener name="default" socket-binding="http"/>
<host name="aponta" alias="localhost" default-web-module="apontatouch.war">
<location name="/" handler="welcome-content" />
</host>
</server>
or if you need default-host, then you just need to add host different allias.
maybe aponta.local, and then add in your hosts file on your machine entry
127.0.0.1 aponta.local (or what ever you decide to call your custom local domain)
on linux this file is located in /etc/hosts
on windows in c:\windows\system32\drivers\etc\hosts
I can run my app and there's no problem at all but when i'm adding
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-solr</artifactId>
<version>1.1.0.RELEASE</version>
</dependency>
to my pom file it throws:
15:59:18,172 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-3) Context initialization failed: java.lang.IllegalStateException: Cannot load configuration class: eu.combc.webuzu.configuration.SecurityConfig
any idea what's going on?
check with this :
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
<version>4.10.1</version>
</dependency>