当我尝试部署Web服务时,它告诉我找不到该类。
17:39:15,305 GRAVE [com.sun.xml.ws.server.http.getImplementorClass:617] (MSC service thread 1-8) euo.bk.soap.impl.S_Impl_Prueba from [Module "deployment.euo.bk.soap.pd.war:main" from Service Module Loader]: java.lang.ClassNotFoundException: euo.bk.soap.impl.S_Impl_Prueba from [Module "deployment.euo.bk.soap.pd.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:615) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:256) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:179) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152) [jaxws-rt.jar:2.2.8]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-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(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
17:39:15,317 GRAVE [com.sun.xml.ws.server.http.parseAdaptersAndCreateDelegate:138] (MSC service thread 1-8) WSSERVLET11: Fallo al analizar el descriptor en tiempo de ejecución: com.sun.xml.ws.util.exception.LocatableWebServiceException: No se ha encontrado la clase en el descriptor de tiempo de ejecución: euo.bk.soap.impl.S_Impl_Prueba.
en la línea 9 de jndi:/default-host/euo.bk.soap.pd/WEB-INF/sun-jaxws.xml: com.sun.xml.ws.util.exception.LocatableWebServiceException: No se ha encontrado la clase en el descriptor de tiempo de ejecución: euo.bk.soap.impl.S_Impl_Prueba.
en la línea 9 de jndi:/default-host/euo.bk.soap.pd/WEB-INF/sun-jaxws.xml
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:618) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:256) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:179) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131) [jaxws-rt.jar:2.2.8]
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152) [jaxws-rt.jar:2.2.8]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-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(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]
Caused by: java.lang.ClassNotFoundException: euo.bk.soap.impl.S_Impl_Prueba from [Module "deployment.euo.bk.soap.pd.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules-1.1.1.GA.jar:1.1.1.GA]
at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_79]
at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_79]
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.getImplementorClass(DeploymentDescriptorParser.java:615) [jaxws-rt.jar:2.2.8]
... 12 more
太阳-贾克斯.xml
文件sun-jaxws.xml具有正确的路径,因为单击控件会将您带到下一个类(它说它找不到(
<endpoints version="2.0" xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
<endpoint name="pd_Prueba_WSDL" implementation="euo.bk.soap.impl.S_Impl_Prueba" url-pattern="/pd_Prueba" />
import javax.jws.WebService;
import euo.bk.soap.interf.S_Interf_Prueba;
@WebService
public class S_Impl_Prueba implements S_Interf_Prueba {
@Override
public String prueba(String txt) {
// TODO Auto-generated method stub
return "prueba";
}
}
如果我执行注释行
正确执行,但没有 Web 服务。
(我把代码和片段放在一起,因为它看起来很bette(
谢谢。
我已经能够解决这个问题了。
错误在 web.xml 中,因为随机添加了 xmlns="http://java.sun.com/xml/ns/javaee">
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee"
xmlns="http://java.sun.com/xml/ns/javaee"
如果您删除它并保留它的方式,它会再次工作。
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee"