sandip sandip - 1 month ago 27
Java Question

java program has not been deployed with Wildfly server

If I start Wildfly and deploy my war file I get following ClassNotFoundException.

Why Wildfy cannot find the exception class?
please help me to solve this

Here is the latest log when app is deployed:

16:30:40,845 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "KonaKart.war" (runtime-name: "KonaKart.war")
16:30:42,172 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015960: Class Path entry jcifs.jar in /home/sandipsolanki/wildfly-8.2.0.Final/standalone/deployments/KonaKart.war/WEB-INF/lib/jtds-1.2.5.jar does not point to a valid jar for a Class-Path reference.
16:30:42,186 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015960: Class Path entry jsr173_1.0_api.jar in /home/sandipsolanki/wildfly-8.2.0.Final/standalone/deployments/KonaKart.war/WEB-INF/lib/jaxb-impl.jar does not point to a valid jar for a Class-Path reference.
16:30:42,186 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015960: Class Path entry jaxb1-impl.jar in /home/sandipsolanki/wildfly-8.2.0.Final/standalone/deployments/KonaKart.war/WEB-INF/lib/jaxb-impl.jar does not point to a valid jar for a Class-Path reference.
16:30:42,652 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010404: Deploying non-JDBC-compliant driver class org.postgresql.Driver (version 9.1)
16:30:42,657 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
16:30:42,701 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010403: Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
16:30:42,702 WARN [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016012: Deployment deployment "KonaKart.war" contains CDI annotations but no bean archive was found (no beans.xml or class with bean defining annotations).
16:30:42,710 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010417: Started Driver service with driver-name = KonaKart.war_oracle.jdbc.OracleDriver_11_2
16:30:42,711 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010417: Started Driver service with driver-name = KonaKart.war_org.postgresql.Driver_9_1
16:30:42,711 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) JBAS010417: Started Driver service with driver-name = KonaKart.war_com.mysql.jdbc.Driver_5_1
16:30:42,782 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./konakart.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./konakart.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher from [Module "deployment.KonaKart.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(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_77]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_77]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_77]
Caused by: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher from [Module "deployment.KonaKart.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

16:30:42,788 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "KonaKart.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./konakart.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./konakart.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher from [Module \"deployment.KonaKart.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher from [Module \"deployment.KonaKart.war:main\" from Service Module Loader]"}}
16:30:42,968 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "KonaKart.war" (runtime-name : "KonaKart.war")
16:30:42,969 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014776: Newly corrected services:

service jboss.undertow.deployment.default-server.default-host./konakart (new available)
service jboss.undertow.deployment.default-server.default-host./konakart.UndertowDeploymentInfoService (new available)
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./konakart.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./konakart.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher from [Module "deployment.KonaKart.war:main" from Service Module Loader]


xml :

<?xml version="1.0" encoding="UTF-8"?>
<!-- KonaKart web.xml file. (c) 2013 DS Data Systems UK Ltd, All rights reserved. -->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
id="WebApp_KonaKart" version="2.4">

<display-name>KonaKart Store-Front Application</display-name>
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>com.konakart.filter.CharacterEncodingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>

<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
<context-param>
<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
<param-value>/WEB-INF/tiles.xml</param-value>
<!-- <param-value>/WEB-INF/tiles-m.xml</param-value> -->
</context-param>

<!-- JBoss -->
<context-param>
<param-name>resteasy.scan</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan.resources</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>resteasy.scan.providers</param-name>
<param-value>false</param-value>
</context-param>
<!-- End of JBoss -->

<listener>
<listener-class>
org.apache.axis.transport.http.AxisHTTPSessionListener
</listener-class>
</listener>

<!-- Used to listen out for Shutdown messages and handle the Shutdown of threads -->
<listener>
<listener-class>
com.konakart.bl.KKServletContextListener
</listener-class>
</listener>

<!-- Start a KKAppEngine -->
<servlet>
<description>KonaKart Client Engine Servlet</description>
<servlet-name>KonaKartAppEngineServlet</servlet-name>
<servlet-class>com.konakart.servlet.AppEngServlet</servlet-class>
<init-param>
<param-name>propertiesPath</param-name>
<param-value>konakart.properties</param-value>
</init-param>
<init-param>
<param-name>appPropertiesPath</param-name>
<param-value>konakart_app.properties</param-value>
</init-param>
<init-param>
<param-name>mode</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>storeId</param-name>
<param-value>store1</param-value>
</init-param>
<init-param>
<param-name>customersShared</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>productsShared</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>categoriesShared</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>defaultStoreId</param-name>
<param-value>store1</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>


<!-- Servlet for Apache Message Queue

Uncomment this if you want to use the Apache MQ

ApacheMQ Server parameters:
uri = The broker URI
mqEnabled = Enable (true) or Disable (false) the Apache Message Queue
mqName = A name for this Broker to make it unique
mqAdminUserName = admin username
mqAdminUserPassword = admin password
mqUserUserName = username
mqUserPassword = password
mqKonaKartQStub = users are authorised to use Queue Names starting with this prefix

-->

<!-- Apache ActiveMQ
<servlet>
<servlet-name>KonaKartMQServlet</servlet-name>
<servlet-class>
com.konakart.mq.KKMQServer
</servlet-class>
<init-param>
<param-name>uri</param-name>
<param-value>tcp://localhost:8791</param-value>
</init-param>
<init-param>
<param-name>mqEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>mqName</param-name>
<param-value>KonaKart.Broker.1</param-value>
</init-param>
<init-param>
<param-name>mqAdminUserName</param-name>
<param-value>kkadmin</param-value>
</init-param>
<init-param>
<param-name>mqAdminUserPassword</param-name>
<param-value>princess</param-value>
</init-param>
<init-param>
<param-name>mqUserUserName</param-name>
<param-value>kkuser</param-value>
</init-param>
<init-param>
<param-name>mqUserPassword</param-name>
<param-value>prince</param-value>
</init-param>
<init-param>
<param-name>mqKonaKartQStub</param-name>
<param-value>KonaKart.</param-value>
</init-param>
<load-on-startup>20</load-on-startup>
</servlet>
End of Apache ActiveMQ -->

<!-- Servlet for JSON Engine

Uncomment the section below if you want to use the JSON Engine

JSON Server parameters:
jsonEnabled = Enable (true) or Disable (false) the JSON server
excludedInterfaces = Comma separated list of KKEngIf interfaces that
are not allowed. If not specified or left empty,
no interfaces are excluded.
includedInterfaces = Comma separated list of KKEngIf interfaces that
are allowed. If not specified or left empty, all
interfaces are allowed.
-->

<!-- JSON Server
<servlet>
<servlet-name>KonaKart_JSON_Servlet</servlet-name>
<servlet-class>
com.konakart.json.KKJSONServer
</servlet-class>
<init-param>
<param-name>jsonEnabled</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>includedInterfaces</param-name>
<param-value></param-value>
</init-param>
<init-param>
<param-name>excludedInterfaces</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>30</load-on-startup>
</servlet>
End of JSON Server -->

<!-- Servlet for JSON Admin

Uncomment the section below if you want to use the JSON Admin Servlet

When sending these commands the password must match the one defined in the
"password" servlet parameter below.

Only enable the JSON Admin server if you need to and if you do, change the
password.

JSON Admin commands:
?cmd=enableJSON&pwd=password
Enables the JSON server
?cmd=disableJSON&pwd=password
Disables the JSON server
?cmd=excludeInterfaces&pwd=password&Interfaces=Comma separated list of KKEngIf interfaces
Sets the excludedInterfaces
?cmd=includeInterfaces&pwd=password&Interfaces=Comma separated list of KKEngIf interfaces
Sets the includedInterfaces
-->

<!-- JSON Admin
<servlet>
<servlet-name>KonaKart_JSON_Admin</servlet-name>
<servlet-class>
com.konakart.json.KKJSONServerAdmin
</servlet-class>
<init-param>
<param-name>password</param-name>
<param-value>jason</param-value>
</init-param>
<load-on-startup>29</load-on-startup>
</servlet>
End of JSON Admin -->

<!-- Servlet for RMI Server

Uncomment this if you want to use RMI

RMI Server parameters:
port = The port number where the RMI registry will listen
rmiEnabled = Enable (true) or Disable (false) the RMI interface
-->

<!-- RMI Server
<servlet>
<servlet-name>KonakartRMIServlet</servlet-name>
<servlet-class>
com.konakart.rmi.KKRMIServer
</servlet-class>
<init-param>
<param-name>port</param-name>
<param-value>8790</param-value>
</init-param>
<init-param>
<param-name>rmiEnabled</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>20</load-on-startup>
</servlet>
End of RMI Server -->

<servlet>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>
org.apache.axis.transport.http.AxisServlet
</servlet-class>
</servlet>

<!-- Servlet Mapping -->

<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>

<!--
Uncomment the section below if you want to use the JSON Engine
-->
<!-- JSON Server
<servlet-mapping>
<servlet-name>KonaKart_JSON_Servlet</servlet-name>
<url-pattern>/konakartjson</url-pattern>
</servlet-mapping>
End of JSON Server -->

<!--
Uncomment the section below if you want to use the JSON Admin Servlet
-->
<!-- JSON Admin
<servlet-mapping>
<servlet-name>KonaKart_JSON_Admin</servlet-name>
<url-pattern>/konakartjsonadmin</url-pattern>
</servlet-mapping>
End of JSON Admin -->

<!--
Currently the W3C haven't settled on a media type for WSDL;
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
for now we go with the basic 'it's XML' response
-->
<mime-mapping>
<extension>wsdl</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>

<mime-mapping>
<extension>xsd</extension>
<mime-type>text/xml</mime-type>
</mime-mapping>

<mime-mapping>
<extension>html</extension>
<mime-type>text/html;charset=UTF-8</mime-type>
</mime-mapping>

<!-- Welcome File List -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

</web-app>

Answer

add this below dependency in your pom.xml

<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>2.3.1.GA</version>
</dependency>

If your not using maven add this jar to your classpath

Comments