I have an external dependency (ejb-client) installed in local maven repo. Eclipse and manual maven builds see it just fine and compile successfully. It is also listed correctly under Maven dependencies.
When I deploy to WildFly 8.1, the runtime does not recognise the classes and throws exceptions. I never had problems with dependencies like this before. The only difference with this project is that it's a SwitchYard 2.0 project (WildFly 8.1 overlay). I suspect that either WildFly configuration is wrong due to overlay or I am missing some maven build plugins.
I finally solved it using maven shade plugin which compiles the dependency inside but:
1. I never needed it before so I don't like the solution
2. It is not run automatically when deploying from eclipse so I have to do a manual maven build and manual deploy. How do I tell maven to run the shade plugin when deploying? I tried to change phase from package to deploy to no avail.
The external dependency causing trouble is jmsprojekt-main.
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>si.fri.liis.jmsprojektsy</groupId>
<artifactId>vloga-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>si.fri.liis.jmsprojektsy:vloga-service</name>
<properties>
<switchyard.version>2.0.0.Final</switchyard.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-bom</artifactId>
<version>${switchyard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.switchyard.components</groupId>
<artifactId>switchyard-component-bean</artifactId>
</dependency>
<dependency>
<groupId>org.switchyard.components</groupId>
<artifactId>switchyard-component-soap</artifactId>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-api</artifactId>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-transform</artifactId>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-validate</artifactId>
</dependency>
<dependency>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.switchyard.components</groupId>
<artifactId>switchyard-component-test-mixin-cdi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>si.fri.liis.jmsprojekt</groupId>
<artifactId>jmsprojekt-main</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>ejb-client</type>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.switchyard</groupId>
<artifactId>switchyard-plugin</artifactId>
<version>${switchyard.version}</version>
<executions>
<execution>
<goals>
<goal>configure</goal>
</goals>
</execution>
</executions>
<configuration>
<scannerClassNames>
<param>org.switchyard.transform.config.model.TransformSwitchYardScanner</param>
</scannerClassNames>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>si.fri.liis.jmsprojekt:jmsprojekt-main</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
WildFly startup log showing classes from the dependency not being found:
20:06:26,777 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."vloga-service.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."vloga-service.jar".SwitchYardService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_51]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_51]
Caused by: java.lang.NoClassDefFoundError: si/fri/liis/jmsprojekt/data/VlogaData
at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.8.0_51]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) [rt.jar:1.8.0_51]
at java.lang.Class.privateGetPublicMethods(Unknown Source) [rt.jar:1.8.0_51]
at java.lang.Class.getMethods(Unknown Source) [rt.jar:1.8.0_51]
at org.switchyard.transform.internal.TransformerUtil.isTransformer(TransformerUtil.java:223)
at org.switchyard.transform.internal.TransformerUtil.newTransformers(TransformerUtil.java:71)
at org.switchyard.transform.internal.TransformerRegistryLoader.newTransformers(TransformerRegistryLoader.java:231)
at org.switchyard.transform.internal.TransformerRegistryLoader.registerTransformers(TransformerRegistryLoader.java:117)
at org.switchyard.transform.internal.TransformerRegistryLoader.registerTransformers(TransformerRegistryLoader.java:101)
at org.switchyard.deploy.internal.Deployment.registerTransformers(Deployment.java:271)
at org.switchyard.deploy.internal.Deployment.doInit(Deployment.java:117)
at org.switchyard.deploy.internal.AbstractDeployment.init(AbstractDeployment.java:139)
at org.switchyard.as7.extension.deployment.SwitchYardDeployment.start(SwitchYardDeployment.java:155)
at org.switchyard.as7.extension.services.SwitchYardService.start(SwitchYardService.java:77)
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]
... 3 more
Caused by: java.lang.ClassNotFoundException: si.fri.liis.jmsprojekt.data.VlogaData from [Module "deployment.vloga-service.jar: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]
... 19 more
20:06:26,817 ERROR [stderr] (MSC service thread 1-9) Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
20:06:26,899 ERROR [stderr] (MSC service thread 1-9) Compiler warnings:
20:06:26,900 ERROR [stderr] (MSC service thread 1-9) WARNING: 'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
20:06:27,265 INFO [org.switchyard.common.camel.SwitchYardCamelContextImpl] (MSC service thread 1-9) Route: direct:{urn:si.fri.liis.jmsprojektsy:vloga-service:1.0}VlogaServicePortType started and consuming from: Endpoint[direct://%7Burn:si.fri.liis.jmsprojektsy:vloga-service:1.0%7DVlogaServicePortType]
20:06:27,361 INFO [org.switchyard] (MSC service thread 1-9) Addressing [enabled = false, required = false]
20:06:27,361 INFO [org.switchyard] (MSC service thread 1-9) MTOM [enabled = false, threshold = 0]
20:06:27,443 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-9) JBWS024061: Adding service endpoint metadata: id=VlogaService
address=http://localhost:8080/vloga-service/VlogaService
implementor=org.switchyard.component.soap.endpoint.BaseWebService
serviceName={urn:si.fri.liis.jmsprojektsy:vloga-service:1.0}VlogaService
portName={urn:si.fri.liis.jmsprojektsy:vloga-service:1.0}VlogaServicePort
annotationWsdlLocation=null
wsdlLocationOverride=vfs:/C:/Users/cen/Desktop/wildfly-8.1.0.Final-sy/bin/content/vloga-service-0.0.1-SNAPSHOT.jar/VlogaService.wsdl
mtomEnabled=false
20:06:27,982 INFO [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-9) Creating Service {urn:si.fri.liis.jmsprojektsy:vloga-service:1.0}VlogaService from WSDL: vfs:/C:/Users/cen/Desktop/wildfly-8.1.0.Final-sy/bin/content/vloga-service-0.0.1-SNAPSHOT.jar/VlogaService.wsdl
20:06:28,172 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-9) Setting the server's publish address to be http://localhost:8080/vloga-service/VlogaService
20:06:28,261 INFO [org.jboss.ws.cxf.deployment] (MSC service thread 1-9) JBWS024074: WSDL published to: file:/C:/Users/cen/Desktop/wildfly-8.1.0.Final-sy/standalone/data/wsdl/vloga-service.deployment/VlogaService.wsdl
20:06:28,266 INFO [org.jboss.as.webservices] (MSC service thread 1-5) JBAS015539: Starting service jboss.ws.endpoint."vloga-service.deployment".VlogaService
20:06:28,331 INFO [org.wildfly.extension.undertow] (MSC service thread 1-9) JBAS017534: Registered web context: /vloga-service
20:06:28,411 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "vloga-service.jar")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"vloga-service.jar\".SwitchYardService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"vloga-service.jar\".SwitchYardService: Failed to start service
Caused by: java.lang.NoClassDefFoundError: si/fri/liis/jmsprojekt/data/VlogaData
Caused by: java.lang.ClassNotFoundException: si.fri.liis.jmsprojekt.data.VlogaData from [Module \"deployment.vloga-service.jar:main\" from Service Module Loader]"}}
20:06:28,496 INFO [org.jboss.as.server] (ServerService Thread Pool -- 33) JBAS018559: Deployed "vloga-service.jar" (runtime-name : "vloga-service.jar")
20:06:28,497 INFO [org.jboss.as.server] (ServerService Thread Pool -- 33) JBAS018559: Deployed "vloga-service-0.0.1-SNAPSHOT.jar" (runtime-name : "vloga-service-0.0.1-SNAPSHOT.jar")
20:06:28,499 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."vloga-service.jar".SwitchYardService: org.jboss.msc.service.StartException in service jboss.deployment.unit."vloga-service.jar".SwitchYardService: Failed to start service
20:06:28,751 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) JBAS016009: Stopping weld service for deployment vloga-service.jar
20:06:28,803 INFO [org.jboss.as.server.deployment] (MSC service thread 1-11) JBAS015877: Stopped deployment vloga-service.jar (runtime-name: vloga-service.jar) in 67ms
20:06:28,805 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
20:06:28,805 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
20:06:28,806 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 17000ms - Started 287 of 340 services (98 services are lazy, passive or on-demand)
20:06:29,053 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "vloga-service.jar" (runtime-name: "vloga-service.jar")
20:06:29,054 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."vloga-service.jar".SwitchYardService
The solution is to wrap the SwitchYard project into an EAR. Dependencies are resolved correctly then.
Related
Deployed failed to my wildfly server, anyone has any ideas about this error, org-apache/commons/mail/EmailException ?
20:05:10,842 ERROR [org.jboss.msc.service.fail] (MSC service thread
1-2) MSC000001:
Failed to start service
jboss.deployment.unit."test.war".POST_MODULE:
org.jboss.msc.service.StartException
in service jboss.deployment.unit."test.war".POST_MODULE: WFLYSRV0153:
Failed to process phase POST_MODULE of deployment "test.war"
Caused by: java.lang.NoClassDefFoundError:
org/apache/commons/mail/EmailException
Caused by: java.lang.ClassNotFoundException: org.apache.commons.mail.EmailException
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.4</version>
</dependency>
I created spring boot with scala Rest api and it is working with tomcat (default server) with the jar file. Now I want to deploy into Jboss/Wildfly 10.0 and created the war file. During the deployment I am getting the below issue. can some one help on this issue.
POM file:
<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.aexp.prospect</groupId>
<artifactId>atules</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<!--packaging>jar</packaging -->
<name>atules</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath />
<!-- lookup parent from repository -->
</parent>
<!-- properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties -->
<properties>
<start-class>com.aexp.prospect.atules.AtulApplication</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<!-- dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId>
<version>3.8.1</version> <scope>test</scope> </dependency> </dependencies -->
<dependencies>
<!-- Additional for war files -->
<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>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId>
</dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId>
</dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId>
</dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> </dependency> <dependency> <groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId> <version>2.4.0</version> </dependency>
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId>
<version>2.4.0</version> </dependency -->
<!-- dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-library</artifactId>
<version>2.11.8</version> </dependency -->
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.5</version><!--$NO-MVN-MAN-VER$ -->
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.liftweb/lift-json -->
<dependency>
<groupId>net.liftweb</groupId>
<artifactId>lift-json_2.11</artifactId>
<version>2.6.3</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Additional for war files -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
</dependencies>
<build>
<finalName>SpringBootES</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<!-- build> <plugins> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId>
<version>3.1.3</version> <executions> <execution> <goals> <goal>compile</goal>
<goal>testCompile</goal> </goals> </execution> </executions> </plugin> <plugin>
<groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugins> </build -->
</project>
Error Message while deploying:
13:56:38,104 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 2) WFLYDR0001: Content added at location C:\Risk_Mgt\Downloads\wildfly-10.0.0.Final\standalone\data\content\76\46dbc0aa1700b71ef90ada1bc3c326e8d02776\content
13:56:38,109 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0019: Stopped Driver service with driver-name = SpringBootES.war_org.h2.Driver_1_4
13:56:38,119 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 249) WFLYUT0022: Unregistered web context: /SpringBootES
13:56:38,126 INFO [io.undertow.servlet] (ServerService Thread Pool -- 249) Closing Spring root WebApplicationContext
13:56:38,127 INFO [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] (ServerService Thread Pool -- 249) Closing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#42447031: startup date [Wed Mar 21 13:30:53 EDT 2018]; root of context hierarchy
13:56:38,129 INFO [org.springframework.jmx.export.annotation.AnnotationMBeanExporter] (ServerService Thread Pool -- 249) Unregistering JMX-exposed beans on shutdown
13:56:40,019 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment SpringBootES.war (runtime-name: SpringBootES.war) in 1913ms
13:56:40,023 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "SpringBootES.war" (runtime-name: "SpringBootES.war")
13:56:51,926 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)
13:56:51,928 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)
13:56:52,006 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
13:56:52,012 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = SpringBootES.war_org.h2.Driver_1_4
13:56:52,093 INFO [io.undertow.servlet] (ServerService Thread Pool -- 260) 2 Spring WebApplicationInitializers detected on classpath
13:56:53,033 INFO [stdout] (ServerService Thread Pool -- 260)
13:56:53,033 INFO [stdout] (ServerService Thread Pool -- 260) . ____ _ __ _ _
13:56:53,034 INFO [stdout] (ServerService Thread Pool -- 260) /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
13:56:53,034 INFO [stdout] (ServerService Thread Pool -- 260) ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
13:56:53,034 INFO [stdout] (ServerService Thread Pool -- 260) \\/ ___)| |_)| | | | | || (_| | ) ) ) )
13:56:53,034 INFO [stdout] (ServerService Thread Pool -- 260) ' |____| .__|_| |_|_| |_\__, | / / / /
13:56:53,035 INFO [stdout] (ServerService Thread Pool -- 260) =========|_|==============|___/=/_/_/_/
13:56:53,055 INFO [stdout] (ServerService Thread Pool -- 260) :: Spring Boot :: (v1.5.2.RELEASE)
13:56:53,056 INFO [stdout] (ServerService Thread Pool -- 260)
13:56:53,241 INFO [com.aexp.prospect.atules.AtulApplication] (ServerService Thread Pool -- 260) Starting AtulApplication on NYKPC06712N with PID 16880 (started by pveerana in C:\Risk_Mgt\Downloads\wildfly-10.0.0.Final\bin)
13:56:53,241 INFO [com.aexp.prospect.atules.AtulApplication] (ServerService Thread Pool -- 260) No active profile set, falling back to default profiles: default
13:56:53,304 INFO [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] (ServerService Thread Pool -- 260) Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#61eb59d6: startup date [Wed Mar 21 13:56:53 EDT 2018]; root of context hierarchy
13:56:55,604 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (ServerService Thread Pool -- 260) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
13:56:55,877 INFO [io.undertow.servlet] (ServerService Thread Pool -- 260) Initializing Spring embedded WebApplicationContext
13:56:55,878 INFO [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 260) Root WebApplicationContext: initialization completed in 2573 ms
13:56:57,166 INFO [org.springframework.boot.web.servlet.ServletRegistrationBean] (ServerService Thread Pool -- 260) Mapping servlet: 'dispatcherServlet' to [/]
13:56:57,168 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 260) Mapping filter: 'errorPageFilter' to: [/*]
13:56:57,168 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 260) Mapping filter: 'characterEncodingFilter' to: [/*]
13:56:57,168 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 260) Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
13:56:57,168 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 260) Mapping filter: 'httpPutFormContentFilter' to: [/*]
13:56:57,168 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 260) Mapping filter: 'requestContextFilter' to: [/*]
13:56:58,042 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter] (ServerService Thread Pool -- 260) Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#61eb59d6: startup date [Wed Mar 21 13:56:53 EDT 2018]; root of context hierarchy
13:56:58,226 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 260) Mapped "{[/api/eshost/{eshost}/indexName/{indexName}/_basicSearch],methods=[GET]}" onto public java.lang.String com.aexp.prospect.atules.controllers.AtulSearchController.basicSearch(java.lang.String,java.lang.String,java.lang.String,java.lang.String)
13:56:58,235 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 260) Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
13:56:58,235 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 260) Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
13:56:58,306 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 260) Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
13:56:58,306 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 260) Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
13:56:58,503 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 260) Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
13:56:58,924 INFO [org.springframework.jmx.export.annotation.AnnotationMBeanExporter] (ServerService Thread Pool -- 260) Registering beans for JMX exposure on startup
13:56:58,988 INFO [com.aexp.prospect.atules.AtulApplication] (ServerService Thread Pool -- 260) Started AtulApplication in 6.67 seconds (JVM running for 50698.335)
13:56:58,994 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 260) Initializing Mojarra 2.2.12-jbossorg-2 20150729-1131 for context '/SpringBootES'
13:57:03,889 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 260) WFLYUT0021: Registered web context: /SpringBootES
13:57:03,975 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0016: Replaced deployment "SpringBootES.war" with deployment "SpringBootES.war"
13:57:03,976 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.undertow.deployment.default-server.default-host."/atules-0.0.1-SNAPSHOT": org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host."/atules-0.0.1-SNAPSHOT": java.lang.RuntimeException: javax.servlet.ServletException: Failed to instantiate WebApplicationInitializer class
13:57:03,986 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 2) WFLYDR0002: Content removed from location C:\Risk_Mgt\Downloads\wildfly-10.0.0.Final\standalone\data\content\e4\796fce1370fb5d7b11d99012c33f8a30730b2a\content
The issue is with the POM file and I fixed it. Below is the POM file which I used. Especially start-class, spring-boot-maven-plugin and servlet (Initially I developed Application and it should be converted into servlet). These were not there in my initial POM file. Also should exclude the tomcat as this deployment in Jboss/Wildfly 10.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.aexp.xxx</groupId>
<artifactId>xxxes</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>xxxes</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.2.RELEASE</version>
<relativePath />
<!-- lookup parent from repository -->
</parent>
<properties>
<start-class>com.aexp.xxx.xxxes.<Application Class Name></start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<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>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>SpringBootES</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
My eclipse (Kepler) got stuck while starting the deployment by clicking RUN ON SER server (JBOSS 7.0.1 final).
I can successfully deploy the application through manual process (making war and copy the war to deployment directory and start the standalone.sh).
In short,I cannot able to run my application through eclipse but I can do it manually.
Please help.
The error:
19:27:30,111 INFO [org.jboss.as.remoting] (MSC service thread 1-2)
Listening on /127.0.0.1:9999 19:27:30,127 INFO
[org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5)
Starting Coyote HTTP/1.1 on http--127.0.0.1-8080 19:27:30,158 INFO
org.jboss.as.connector] (MSC service thread 1-4) Starting JCA
Subsystem (JBoss IronJacamar 1.0.3.Final) 19:27:30,205 INFO
[org.jboss.as.connector.subsystems.datasources] (MSC service thread
1-2) Bound data source [java:jboss/datasources/ExampleDS] 19:27:30,377
INFO [org.jboss.as.deployment] (MSC service thread 1-5) Started
FileSystemDeploymentService for directory
E:\jboss-as-7.0.1.Final\standalone\deployments 19:27:30,393 INFO
[org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.1.Final "Zap"
started in 1647ms - Started 93 of 148 services (55 services are
passive or on-demand) 19:27:30,393 INFO [org.jboss.as.deployment]
(DeploymentScanner-threads - 1) Found TF_Webservices.war in deployment
directory. To trigger deployment create a file called
TF_Webservices.war.dodeploy 19:27:46,447 WARN [org.jboss.as.protocol]
(pool-2-thread-5) Got error closing channel JBREM00206: Channel is not
open
I solved the problem by defining maven war plugin in my pom .
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>resource2</directory>
</resource>
</webResources>
</configuration>
I'm trying to deploy an ear package into a jboss 7.3 (jboss-eap-6.2) with skinnywars, with no luck so far. The ear conatins multiple spring-boot wars and jars.
For the sake of clarity, i've created one simple ear project with 2 little spring-boot wars and I obtained the same results, skinnywars to false and then it works....
The process:
I've made a fresh installation of jboss-eap-6.2 (which will be running in standalone mode)
I've created a parent pom.xml for the main project with the spring-boot-starter-parent and the dependenciesManagements for the modules (
I've created two simple web1.war and a web2.war spring boot projects with nothing else than an index thymeleaf page on each one of them. (each war deployed to the server runs perfectly fine)
I've created an ear pom.xml with the common dependencies (for the skinny part) and the maven-ear-plugin configuration for skinnywars.
Packaging and installing works ok (the ear project weights about 12Mb,
Copied the .ear file to standalone/deployments and the server doesn't start neither of the spring boot applications...
What am I missing??
The parent 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>org.springframework</groupId>
<artifactId>skinny</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.1.9.RELEASE</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.1.9.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>1.1.9.RELEASE</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>web1</module>
<module>web2</module>
<module>ear</module>
</modules>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
<version>2.3.2</version>
</plugin>
</plugins>
</build>
</project>
The web1.war project 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>
<artifactId>web1</artifactId>
<version>0.1.0</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework</groupId>
<artifactId>skinny</artifactId>
<version>1.0</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<properties>
<start-class>hello.Application</start-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<finalName>web1</finalName>
</build>
</project>
The web2.war project (the same of web1):
<?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>
<artifactId>web2</artifactId>
<version>0.1.0</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework</groupId>
<artifactId>skinny</artifactId>
<version>1.0</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<properties>
<start-class>hello.Application</start-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<finalName>web2</finalName>
</build>
</project>
Finally the ear pom with skinnywars configuration of maven-ear-plugin:
<?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">
<parent>
<artifactId>skinny</artifactId>
<groupId>org.springframework</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<name>ear</name>
<artifactId>ear</artifactId>
<packaging>ear</packaging>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>web1</artifactId>
<version>0.1.0</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>web2</artifactId>
<version>0.1.0</version>
<type>war</type>
</dependency>
<!-- to get skinnywars the ear project has the common dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<skinnyWars>true</skinnyWars>
<defaultJavaBundleDir>lib</defaultJavaBundleDir>
<modules>
<webModule>
<groupId>org.springframework</groupId>
<artifactId>web1</artifactId>
<contextRoot>/web1</contextRoot>
</webModule>
<webModule>
<groupId>org.springframework</groupId>
<artifactId>web2</artifactId>
<contextRoot>/web2</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</project>
As I mentioned before, if I change true to false the ear package runs fine in the application server...
I've tried so many diferent configurations of maven-war-plugin and maven-ear-plugin with no sucess...
Updated: This is the output of the jboss log, it seems that is going to load the context of web1 and web2 but neither of the two spring-boot applications start....
07:59:28,780 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final-redhat-2
07:59:29,054 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-redhat-1
07:59:29,158 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) iniciando
07:59:30,233 INFO [org.xnio] (MSC service thread 1-2) XNIO Version 3.0.7.GA-redhat-1
07:59:30,236 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creando el servicio de administración http utilizando el enlace de socket (management-http)
07:59:30,241 INFO [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.0.7.GA-redhat-1
07:59:30,249 INFO [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 3.2.18.GA-redhat-1
07:59:30,363 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) JBAS010280: Activando el sub-sistema Infinispan.
07:59:30,369 INFO [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013171: Activando el sub-sistema de seguridad
07:59:30,374 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 35) JBAS012605: Se activaron las siguientes implementaciones JSF: [main, 1.2]
07:59:30,387 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 37) JBAS011800: Activando el sub-sistema de nombrado
07:59:30,389 INFO [org.jboss.as.security] (MSC service thread 1-6) JBAS013170: Versión PicketBox actual=4.0.19.SP2-redhat-1
07:59:30,460 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activando WebServices Extension
07:59:30,472 INFO [org.jboss.as.connector.logging] (MSC service thread 1-3) JBAS010408: Iniciando JCA sub-sistema (IronJacamar 1.0.23.Final-redhat-1)
07:59:30,502 INFO [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Iniciando el servicio de nombrado
07:59:30,508 INFO [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Sesión de correo enlazada [java:jboss/mail/Default]
07:59:30,672 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Implementación del controlador que cumple con los requerimientos de JDBC class oracle.jdbc.OracleDriver (versión 12.1)
07:59:30,694 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Implementación del controlador que cumple con los requerimientos de JDBC class org.h2.Driver (versión 1.3)
07:59:31,085 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
07:59:31,100 INFO [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
07:59:31,332 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Fuente de datos enlazados [java:jboss/datasources/ExampleDS]
07:59:31,333 INFO [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.3.Final-redhat-1
07:59:31,359 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Inició FileSystemDeploymentService para el directorio /usr/local/Cellar/jboss/6.2.0/standalone/deployments
07:59:31,371 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Iniciando la implementación de ear-1.0.ear" (runtime-name: "ear-1.0.ear")
07:59:31,371 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Iniciando la implementación de bm-ds.xml" (runtime-name: "bm-ds.xml")
07:59:31,371 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Iniciando la implementación de bddbm-ds.xml" (runtime-name: "bddbm-ds.xml")
07:59:31,371 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Iniciando la implementación de bddjira4-ds.xml" (runtime-name: "bddjira4-ds.xml")
07:59:31,372 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Iniciando la implementación de jira-ds.xml" (runtime-name: "jira-ds.xml")
07:59:31,379 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Escuchando en 127.0.0.1:9999
07:59:31,379 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Escuchando en 127.0.0.1:4447
07:59:31,567 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/bddjiraDS]
07:59:31,567 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/bddbmDS]
07:59:31,568 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/jiraDS]
07:59:31,568 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/ubmDS]
07:59:33,118 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Iniciando la implementación de null" (runtime-name: "web1-0.1.0.war")
07:59:33,118 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Iniciando la implementación de null" (runtime-name: "web2-0.1.0.war")
07:59:33,414 INFO [org.jboss.web] (ServerService Thread Pool -- 51) JBAS018210: Registrar el contexto web: /web2
07:59:33,414 INFO [org.jboss.web] (ServerService Thread Pool -- 48) JBAS018210: Registrar el contexto web: /web1
07:59:33,595 INFO [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "jira-ds.xml" (runtime-name : "jira-ds.xml")
07:59:33,595 INFO [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "ear-1.0.ear" (runtime-name : "ear-1.0.ear")
07:59:33,596 INFO [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "bm-ds.xml" (runtime-name : "bm-ds.xml")
07:59:33,596 INFO [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "bddjira4-ds.xml" (runtime-name : "bddjira4-ds.xml")
07:59:33,596 INFO [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "bddbm-ds.xml" (runtime-name : "bddbm-ds.xml")
07:59:33,605 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Interfaz de administración http escuchando en http://127.0.0.1:9990/management
07:59:33,606 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Consola de administración escuchando en http://127.0.0.1:9990
07:59:33,606 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) inició en 5229ms - Inició 352 de 425 servicios (72 servicios son pasivos o por demanda)
Updated: I pushed the sample code to github -> guilu/spring-boot-ear-skinny-war in order to see if someone gets the project deployed and running in an standalone jboss-eap-6.2 server.
Cannot get how this error come out. No reason no brain sence from te
17:52:58,395 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
17:52:58,604 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
17:52:58,665 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final
"Brontes" starting 17:52:59,554 INFO [org.xnio] XNIO Version 3.0.3.GA
17:52:59,554 INFO [org.jboss.as.server] JBAS015888: Creating http
management service using socket-binding (management-http) 17:52:59,563
INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
17:52:59,570 INFO [org.jboss.remoting] JBoss Remoting version
3.2.3.GA 17:52:59,590 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers 17:52:59,593 INFO
[org.jboss.as.configadmin] (ServerService Thread Pool -- 26)
JBAS016200: Activating ConfigAdmin Subsystem 17:52:59,617 INFO
[org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800:
Activating Naming Subsystem 17:52:59,624 INFO [org.jboss.as.osgi]
(ServerService Thread Pool -- 39) JBAS011940: Activating OSGi
Subsystem 17:52:59,633 INFO [org.jboss.as.clustering.infinispan]
(ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan
subsystem. 17:52:59,655 INFO [org.jboss.as.security] (ServerService
Thread Pool -- 44) JBAS013101: Activating Security Subsystem
17:52:59,667 INFO [org.jboss.as.security] (MSC service thread 1-6)
JBAS013100: Current PicketBox version=4.0.7.Final 17:52:59,719 INFO
[org.jboss.as.naming] (MSC service thread 1-5) JBAS011802: Starting
Naming Service 17:52:59,722 INFO [org.jboss.as.mail.extension] (MSC
service thread 1-5) JBAS015400: Bound mail session
[java:jboss/mail/Default] 17:52:59,725 INFO
[org.jboss.as.webservices] (ServerService Thread Pool -- 48)
JBAS015537: Activating WebServices Extension 17:52:59,782 INFO
[org.jboss.as.connector] (MSC service thread 1-8) JBAS010408: Starting
JCA Subsystem (JBoss IronJacamar 1.0.9.Final) 17:52:59,812 INFO
[org.jboss.as.connector.subsystems.datasources] (ServerService Thread
Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class
org.h2.Driver (version 1.3) 17:52:59,861 INFO
[org.jboss.as.connector.subsystems.datasources] (ServerService Thread
Pool -- 27) JBAS010404: Deploying non-JDBC-compliant driver class
com.mysql.jdbc.Driver (version 5.1) 17:52:59,927 INFO
[org.jboss.ws.common.management.AbstractServerConfig] (MSC service
thread 1-5) JBoss Web Services - Stack CXF Server 4.0.2.GA
17:53:00,363 INFO [org.jboss.as.server.deployment.scanner] (MSC
service thread 1-3) JBAS015012: Started FileSystemDeploymentService
for directory D:\jboss-as-7.1.1.Final\standalone\deployments
17:53:00,363 INFO [org.jboss.as.server.deployment.scanner] (MSC
service thread 1-5) JBAS015012: Started FileSystemDeploymentService
for directory
D:\workspace\eclipse.metadata.plugins\org.jboss.ide.eclipse.as.core\JBoss_7.1_Runtime_Server1402151223281\deploy
17:53:00,393 INFO [org.jboss.as.remoting] (MSC service thread 1-8)
JBAS017100: Listening on localhost/ 127.0.0 .1:4447 17:53:00,393 INFO
[org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening
on / 127 .0. 0.1:10101 17:53:00,413 INFO
[org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5)
Starting Coyote HTTP/1.1 on http-loca lhost-127. 0.0.1-7070
17:53:00,525 INFO [org.jboss.as.connector.subsystems.datasources]
(MSC service thread 1-4) JBAS010400: Bound data source [java:/MySqlDS]
17:53:00,525 INFO [org.jboss.as.connector.subsystems.datasources]
(MSC service thread 1-1) JBAS010400: Bound data source
[java:jboss/datasources/ExampleDS] 17:53:00,554 INFO [org.jboss.as]
(Controller Boot Thread) JBAS015951: Admin console listening on http:
// 127 .0.0.1: 10102 17:53:00,554 INFO [org.jboss.as] (Controller
Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in
2443ms - Started 139 of 215 services (74 services are passive or
on-demand) 17:53:15,376 INFO [org.jboss.as.server.deployment.scanner]
(DeploymentScanner-threads - 1) JBAS015003: Found HelloRest.war in
deployment directory. To trigger deployment create a file called
HelloRest.war.dodeploy 17:53:15,412 INFO
[org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876:
Starting deployment of "HelloRest.war" 17:53:16,843 INFO
[org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002:
Processing weld deployment HelloRest.war 17:53:16,853 ERROR
[org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed
to start service jboss.deployment.unit."HelloRest.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."HelloRest.war".POST_MODULE: Failed to process
phase POST_MODULE of deployment "HelloRest.war" at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119)
[jboss-as-server-7.1.1.Final.jar:7.1.1.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.runWorker(Unknown Source)
[rt.jar:1.7.0_51] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
[rt.jar:1.7.0_51] at java.lang.Thread.run(Unknown Source)
[rt.jar:1.7.0_51] Caused by:
java.lang.StringIndexOutOfBoundsException: String index out of range:
0 at java.lang.String.charAt(Unknown Source) [rt.jar:1.7.0_51] at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:460)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.checkDeclaredApplicationClassAsServlet(JaxrsScanningProcessor.java:288)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.scanWebDeployment(JaxrsScanningProcessor.java:155)
at
org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:104)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
[jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more
17:53:16,868 INFO [org.jboss.as.server] (DeploymentScanner-threads -
2) JBAS015870: Deploy of deployment "HelloRest.war" was rolled back
with failure message {"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"HelloRest.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"HelloRest.war\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"HelloRest.war\""}} 17:53:16,870 INFO
[org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774:
Service status report JBAS014777: Services which failed to start:
service jboss.deployment.unit."HelloRest.war".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."HelloRest.war".POST_MODULE: Failed to process
phase POST_MODULE of deployment "HelloRest.war"
17:53:16,879 ERROR [org.jboss.as.server.deployment.scanner]
(DeploymentScanner-threads - 1) {"JBAS014653: Composite operation
failed and was rolled back. Steps that failed:" => {"Operation step-2"
=> {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"HelloRest.war\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"HelloRest.war\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"HelloRest.war\""}}}} 17:53:16,914
INFO [org.jboss.as.server.deployment] (MSC service thread 1-7)
JBAS015877: Stopped deployment HelloRest.war in 40ms
PERSON JAVA CLASS:
package rest.hello;
public class Person implements Speakable {
#Override
public String getName() {
return "My Name";
}
}
SPEACKABLE Interface:
package rest.hello;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
#Path("/person")
#Produces(MediaType.TEXT_PLAIN)
#Consumes(MediaType.TEXT_PLAIN)
public interface Speakable {
#GET
#Path("/name")
public String getName();
}
POM File
<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.jboss.tools</groupId>
<artifactId>hellorest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>hellorest</name>
<description>hellorest</description>
<build>
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven-central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
<layout>default</layout>
</repository>
<repository>
<id>java.net2</id>
<name>Java.net</name>
<url>https://oss.sonatype.org/content/repositories/java.net2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.1.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.1.GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.2.1.GA</version>
</dependency>
</dependencies>
In your eclipse, click on the project > properties > project facets
uncheck the jax-rs option and try again