Bom dia…
Tenho o seguinte ambiente de desenvolvimento :
Eclipse Luna SR2 sobre jre1.8.0_151
Usando a biblioteca javax.servlet-api-3.0.1.jar
Fazendo uns testes aqui com o WildFly 8.2.1.Final e quando tento adicionar ao server minha aplicação obtenho o seguinte erro :
08:09:49,565 INFO [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
08:09:49,725 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
08:09:49,780 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: WildFly 8.2.1.Final “Tweek” starting
08:09:50,742 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found Sisprot.war in deployment directory. To trigger deployment create a file called Sisprot.war.dodeploy
08:09:50,754 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
08:09:50,769 INFO [org.xnio] (MSC service thread 1-6) XNIO version 3.3.0.Final
08:09:50,773 INFO [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.3.0.Final
08:09:50,806 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool – 32) JBAS010280: Activating Infinispan subsystem.
08:09:50,816 INFO [org.jboss.as.security] (ServerService Thread Pool – 45) JBAS013171: Activating Security Subsystem
08:09:50,820 INFO [org.wildfly.extension.io] (ServerService Thread Pool – 31) WFLYIO001: Worker ‘default’ has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
08:09:50,830 INFO [org.jboss.as.security] (MSC service thread 1-1) JBAS013170: Current PicketBox version=4.0.21.Final
08:09:50,830 WARN [org.jboss.as.txn] (ServerService Thread Pool – 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
08:09:50,841 INFO [org.jboss.as.naming] (ServerService Thread Pool – 40) JBAS011800: Activating Naming Subsystem
08:09:50,845 INFO [org.jboss.as.jsf] (ServerService Thread Pool – 38) JBAS012615: Activated the following JSF Implementations: [main]
08:09:50,865 INFO [org.jboss.as.webservices] (ServerService Thread Pool – 48) JBAS015537: Activating WebServices Extension
08:09:50,865 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool – 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
08:09:50,865 INFO [org.jboss.as.connector.logging] (MSC service thread 1-8) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.9.Final)
08:09:50,875 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 47) JBAS017502: Undertow 1.1.8.Final starting
08:09:50,885 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) JBAS010417: Started Driver service with driver-name = h2
08:09:50,885 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) JBAS017502: Undertow 1.1.8.Final starting
08:09:50,987 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
08:09:50,987 INFO [org.jboss.as.mail.extension] (MSC service thread 1-8) JBAS015400: Bound mail session [java:jboss/mail/Default]
08:09:51,008 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 47) JBAS017527: Creating file handler for path C:\Users\pc\Desktop\wildfly-8.2.1.Final/welcome-content
08:09:51,234 INFO [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 4.0.7.Final
08:09:51,234 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017525: Started server default-server.
08:09:51,234 INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017531: Host default-host starting
08:09:51,309 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) JBAS017519: Undertow HTTP listener default listening on localhost/127.0.0.1:8080
08:09:51,354 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-6) JBAS015012: Started FileSystemDeploymentService for directory C:\Users\pc\Desktop\wildfly-8.2.1.Final\standalone\deployments
08:09:51,354 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
08:09:51,527 INFO [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.3.2.Final
08:09:51,807 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
08:09:51,817 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
08:09:51,817 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.2.1.Final “Tweek” started in 2464ms - Started 184 of 234 services (82 services are lazy, passive or on-demand)
08:10:11,430 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of “Sisprot.war” (runtime-name: “Sisprot.war”)
08:10:15,864 WARN [org.jboss.as.ee] (MSC service thread 1-1) JBAS011006: Not installing optional component br.com.sms.sisprot.servlets due to an exception (enable DEBUG log level to see the cause)
08:10:15,895 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
08:10:15,895 WARN [org.jboss.weld.deployer] (MSC service thread 1-1) JBAS016012: Deployment deployment “Sisprot.war” contains CDI annotations but no bean archive was found (no beans.xml or class with bean defining annotations).
08:10:15,932 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010417: Started Driver service with driver-name = Sisprot.war_com.mysql.jdbc.Driver_5_1
08:10:15,973 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./Sisprot.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./Sisprot.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: br.com.sms.sisprot.servlets from [Module “deployment.Sisprot.war:main” from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:933)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:256)
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(Unknown Source) [rt.jar:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_151]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_151]
Caused by: java.lang.ClassNotFoundException: br.com.sms.sisprot.servlets from [Module “deployment.Sisprot.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.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:651)
… 6 more
08:10:15,979 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014613: Operation (“deploy”) failed - address: ([(“deployment” => “Sisprot.war”)]) - failure description: {“JBAS014671: Failed services” => {“jboss.undertow.deployment.default-server.default-host./Sisprot.UndertowDeploymentInfoService” => “org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./Sisprot.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: br.com.sms.sisprot.servlets from [Module “deployment.Sisprot.war:main” from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: br.com.sms.sisprot.servlets from [Module “deployment.Sisprot.war:main” from Service Module Loader]”}}
08:10:17,080 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed “Sisprot.war” (runtime-name : “Sisprot.war”)
08:10:17,080 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./Sisprot.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./Sisprot.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: br.com.sms.sisprot.servlets from [Module “deployment.Sisprot.war:main” from Service Module Loader]
O .xml de minha aplicação é :
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-
app_3_0.xsd" version="3.0">
<welcome-file-list>
<welcome-file>login.html</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>ConectarBanco</servlet-name>
<servlet-class>br.com.sms.sisprot.servlets</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ConectarBanco</servlet-name>
<url-pattern>/ConectarBanco</url-pattern>
</servlet-mapping>
<filter>
<filter-name>Filtros</filter-name>
<filter-class>br.com.sms.sisprot.controlador.Filtros</filter-class>
</filter>
<filter-mapping>
<filter-name>Filtros</filter-name>
<url-pattern>/ServletControlador1</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>ServletControlador1</servlet-name>
<servlet-class>br.com.sms.sisprot.servlets</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletControlador1</servlet-name>
<url-pattern>/ServletControlador1</url-pattern>
</servlet-mapping>
</web-app>
Obs. : Estava rodando anteriormente no JBoss AS 7.1 em jdk1.7.0…atualizei o java em minha máquina.
Como posso resolver isso ?