WarcraftZS
WarcraftZS
采纳率0%
2018-11-26 03:17 阅读 484

webService发布到web项目上错误

11:10:54.279 [main] DEBUG o.apache.cxf.common.logging.LogUtils - Using org.apache.cxf.common.logging.Slf4jLogger for logging.
11:10:54.468 [main] INFO o.a.c.s.f.ReflectionServiceFactoryBean - Creating Service {http://webservice.test/}MyWebServiceImplService from class test.webservice.MyWebService
11:10:54.578 [main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created JAXBContext "jar:file:/E:/Program%20Files/Java/jre8/lib/rt.jar!/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.class Build-Id: 1.8.0_11
Classes known to this context:
[B
boolean
byte
char
com.sun.xml.internal.bind.api.CompositeStructure
double
float
int
java.awt.Image
java.io.File
java.lang.Boolean
java.lang.Byte
java.lang.Character
java.lang.Class
java.lang.Double
java.lang.Float
java.lang.Integer
java.lang.Long
java.lang.Object
java.lang.Short
java.lang.String
java.lang.Void
java.math.BigDecimal
java.math.BigInteger
java.net.URI
java.net.URL
java.util.Calendar
java.util.Date
java.util.GregorianCalendar
java.util.UUID
javax.activation.DataHandler
javax.xml.bind.JAXBElement
javax.xml.datatype.Duration
javax.xml.datatype.XMLGregorianCalendar
javax.xml.namespace.QName
javax.xml.transform.Source
long
short
test.webservice.jaxws_asm.GetProjectInfomation
test.webservice.jaxws_asm.GetProjectInfomationResponse
void
" with classes [class test.webservice.jaxws_asm.GetProjectInfomation, class test.webservice.jaxws_asm.GetProjectInfomationResponse].
11:10:54.686 [main] DEBUG o.a.c.r.DefaultResourceManager - resolving resource type
11:10:54.687 [main] DEBUG o.a.c.r.DefaultResourceManager - resolving resource type
11:10:54.803 [main] DEBUG o.a.c.t.h.JettyHTTPServerEngineFactory - Creating Jetty HTTP Server Engine for port 8080.
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/jetty/http/HttpBuffers
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.getHTTPConnectorFactory(JettyHTTPServerEngine.java:661)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.retrieveListenerFactory(JettyHTTPServerEngine.java:650)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.finalizeConfig(JettyHTTPServerEngine.java:702)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.getOrCreate(JettyHTTPServerEngineFactory.java:121)
at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory.createJettyHTTPServerEngine(JettyHTTPServerEngineFactory.java:268)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.retrieveEngine(JettyHTTPDestination.java:127)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.finalizeConfig(JettyHTTPDestination.java:160)
at org.apache.cxf.transport.http.HTTPTransportFactory.getDestination(HTTPTransportFactory.java:308)
at org.apache.cxf.binding.soap.SoapTransportFactory.getDestination(SoapTransportFactory.java:142)
at org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:83)
at org.apache.cxf.endpoint.ServerImpl.(ServerImpl.java:62)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:170)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:456)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:334)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:251)
at org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:155)
at javax.xml.ws.Endpoint.publish(Unknown Source)
at test.webservice.MyWebServicePublish.main(MyWebServicePublish.java:9)
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.HttpBuffers
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 31 more

如果创建的是一个java project就没有问题,可以成功发布,但是在web项目里面就会出问题,我查了一下说是缺少jar包,但是jetty-util-7.5.4.v20111024.jar,cxf-2.7.18.jar,jetty-webapp-7.5.4.v20111024,jetty-server-7.5.4.v20111024,jetty-servlet-7.5.4.v20111024这几个jar包我都复制到本地的tomcat的lib里面了,依然不行,希望大神指点迷津
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

相关推荐