MVN报错整理

在Eclipse 里面配置MVN注意点:

MVN报错整理_第1张图片MVN报错整理_第2张图片MVN报错整理_第3张图片

这两个如果在mvn配置成功后,再次配置的话会不停的更新和不停的下载,要花去大量时间,中途断掉更新又会报错,所以在mvn配置和下载包索引成功后就去掉这两个选项。

 

 

2015-04-15 10:32:20.185:INFO:oejs.Server:jetty-8.1.16.v20140903
2015-04-15 10:32:21.263:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.springframework.web.util.Log4jConfigListener
java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
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.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1839)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:80)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:67)
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:332)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1219)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
2015-04-15 10:32:21.265:WARN:oejw.StandardDescriptorProcessor:Could not instantiate listener org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
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.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
at org.eclipse.jetty.server.handler.ContextHandler.loadClass(ContextHandler.java:1528)
at org.eclipse.jetty.webapp.StandardDescriptorProcessor.visitListener(StandardDescriptorProcessor.java:1839)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:80)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:67)
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:332)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1219)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
2015-04-15 10:32:21.288:WARN:oejs.Holder:java.lang.ClassNotFoundException:org.springframework.web.filter.CharacterEncodingFilter
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.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:424)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100)
at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:107)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:90)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
2015-04-15 10:32:21.289:WARN:oejuc.AbstractLifeCycle:FAILED encodingFilter: javax.servlet.UnavailableException: org.springframework.web.filter.CharacterEncodingFilter
at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:114)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:90)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
at org.eclipse.jetty.server.Server.doStart(Server.java:282)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.wst.server.preview.internal.PreviewStarter.run(PreviewStarter.java:72)
at org.eclipse.wst.server.preview.internal.PreviewStarter.main(PreviewStarter.java:29)
2015-04-15 10:32:21.290:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/city_output,file:/D:/Users/lenovo/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/city_output/}, javax.servlet.UnavailableException: org.springframework.web.filter.CharacterEncodingFilter
at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:114)
at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:90)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1221)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:454)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife 

如果出现上述错误,多半是TOMCAT出现的错误。重新配置TOMCAT

 

***ORACLE数据库中主键名字不能叫ID 表名不能为USER***

 

 

 

 

严重: End event threw exception

java.lang.reflect.InvocationTargetException

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)

       at java.lang.reflect.Method.invoke(Unknown Source)

       atorg.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:911)

       at org.apache.catalina.startup.CallMethodMultiRule.end(WebRuleSet.java:1021)

       atorg.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051)

       atcom.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(UnknownSource)

       at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespaceScope(UnknownSource)

       atcom.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(UnknownSource)

       atcom.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(UnknownSource)

       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(UnknownSource)

       atcom.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(UnknownSource)

       at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(UnknownSource)

       atcom.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(UnknownSource)

       atcom.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(UnknownSource)

       at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(UnknownSource)

       atcom.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(UnknownSource)

       atcom.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(UnknownSource)

       at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)

       atorg.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1883)

       atorg.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1252)

       at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)

       atorg.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)

       atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

       at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

       atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)

       atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

       at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

       atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

       at java.util.concurrent.FutureTask.run(Unknown Source)

       at java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)

       at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)

       at java.lang.Thread.run(Unknown Source)

Caused by:java.lang.IllegalArgumentException: The servlets named [cxf] and [cxf] are bothmapped to the url-pattern [/*] which is not permitted

       at org.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:335)

       ... 35 more

 

四月 15, 2015 2:39:02 下午 org.apache.catalina.startup.ContextConfig parseWebXml

严重: Parse error in application web.xml file atjndi:/localhost/city_output/WEB-INF/web.xml

org.xml.sax.SAXParseException;systemId: jndi:/localhost/city_output/WEB-INF/web.xml; lineNumber: 74;columnNumber: 20; Error at (74, 20) : The servlets named [cxf] and [cxf] areboth mapped to the url-pattern [/*] which is not permitted

       atorg.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687)

       at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2719)

       atorg.apache.tomcat.util.digester.Digester.endElement(Digester.java:1054)

       atcom.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(UnknownSource)

       at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endNamespaceScope(UnknownSource)

       atcom.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(UnknownSource)

       atcom.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(UnknownSource)

       atcom.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(UnknownSource)

       atcom.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(UnknownSource)

       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(UnknownSource)

       atcom.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(UnknownSource)

       atcom.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(UnknownSource)

       at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(UnknownSource)

       atcom.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(UnknownSource)

       atcom.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(UnknownSource)

       at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)

       atorg.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1883)

       atorg.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1252)

       at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)

       atorg.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)

       atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

       at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)

       atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)

       atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

       at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

       atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

       at java.util.concurrent.FutureTask.run(Unknown Source)

       at java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)

       at java.util.concurrent.ThreadPoolExecutor$Worker.run(UnknownSource)

       at java.lang.Thread.run(Unknown Source)

Caused by:java.lang.IllegalArgumentException: The servlets named [cxf] and [cxf] are bothmapped to the url-pattern [/*] which is not permitted

       atorg.apache.catalina.deploy.WebXml.addServletMapping(WebXml.java:335)

       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

       at sun.reflect.DelegatingMethodAccessorImpl.invoke(UnknownSource)

       at java.lang.reflect.Method.invoke(Unknown Source)

       atorg.apache.tomcat.util.IntrospectionUtils.callMethodN(IntrospectionUtils.java:911)

       atorg.apache.catalina.startup.CallMethodMultiRule.end(WebRuleSet.java:1021)

       at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1051)

       ...28 more

 

*********重复配置!!!!!!!

 

http://localhost:8080/city_output/p/dog?id=1

 

返回JSON格式: http://localhost:8080/demo/webservice/rest_HelloWorld/getList/1?_type=json

 

Cxf 一个bean对应一个或者多个server  jaxrs:server

 

 

四月 16, 2015 2:06:32 上午org.apache.cxf.phase.PhaseInterceptorChain add

警告: Skipping interceptorcom.dc.city.service.EncodingLoggingInInterceptor$$EnhancerBySpringCGLIB$$63e5d4b2:Phase declaration is missing.

四月 16, 2015 2:06:32 上午org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor processRequest

警告: No root resourcematching request path /city_output/ has been found, Relative Path: /. Pleaseenable FINE/TRACE log level for more details.

四月 16, 2015 2:06:32 上午org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse

警告:javax.ws.rs.NotFoundException

       atorg.apache.cxf.jaxrs.utils.SpecExceptions.toNotFoundException(SpecExceptions.java:87)

       atorg.apache.cxf.jaxrs.utils.ExceptionUtils.toNotFoundException(ExceptionUtils.java:126)

       atorg.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:184)

       atorg.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:88)

       atorg.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)

       atorg.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

       atorg.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249)

       atorg.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)

       atorg.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)

org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:289)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:214)

       atjavax.servlet.http.HttpServlet.service(HttpServlet.java:621)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:265)

       atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

       atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

       atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

       atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

       atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

       atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

       atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

       atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

       atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

       atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

       atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

       atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

       atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)

       atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

       atorg.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)

       at java.util.concurrent.ThreadPoolExecutor.runWorker(UnknownSource)

       atjava.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

       atjava.lang.Thread.run(Unknown Source)

 

四月 16, 2015 2:06:32 上午org.apache.cxf.interceptor.LoggingOutInterceptor

信息: Outbound Message

---------------------------

ID: 1

Response-Code: 404

Content-Ty

 

错误原因“:::

 

 

缺少address……!!!

 

 

警告: Nooperation matching request path"/city_output/hehe/logisticsApi/itemConfirm/dsafasfasfsafdsafdsafadsfasfdasfasdf"is found, Relative Path: /itemConfirm/dsafasfasfsafdsafdsafadsfasfdasfasdf,HTTP Method: GET, ContentType: */*, Accept: application/x-ms-application,image/jpeg,application/xaml+xml,image/gif,image/pjpeg,application/x-ms-xbap,*/*,.Please enable FINE/TRACE log level for more details.

四月 16, 20152:28:34 上午org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse

警告:javax.ws.rs.ClientErrorException

       atorg.apache.cxf.jaxrs.utils.SpecExceptions.toHttpException(SpecExceptions.java:110)

       atorg.apache.cxf.jaxrs.utils.ExceptionUtils.toHttpException(ExceptionUtils.java:158)

       atorg.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRSUtils.java:478)

       atorg.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:216)

       atorg.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:88)

       atorg.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)

       atorg.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

       atorg.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249)

       atorg.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)

       atorg.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)

       atorg.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)

       atorg.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:289)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:214)

       atjavax.servlet.http.HttpServlet.service(HttpServlet.java:621)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:265)

       atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

       atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

       atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

       atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

       atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

       atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

       atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

       atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

       atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

       atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

       atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

       atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

       atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

       atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)

       atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

       atorg.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)

       atjava.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

       atjava.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

       atjava.lang.Thread.run(Unknown Source)

 

四月 16, 20152:28:34 上午org.apache.cxf.interceptor.LoggingOutInterceptor

信息: OutboundMessage

 

 

 

Cannot find any providersupporting RSA 异常用 java RSA 加密与解密算法的时候,用eclipse 的 run 运行程序来解密相应的信息时会出现java.security.NoSuchAlgorithmException: Cannot find any provider supportingRSA 的异常,根据网上的说法和自己的实际测试,个人认为是因为编译时和运行时的jdk版本不一致造成的,估计是因为配置 run 的jdk与编译时的jdk不同,只要将run中的classpath、jre配置跟项目的jre一致就行了!

 

 

 

INFO: Setting the server's publish addressto be /hehe

2015-04-16 23:47:29  WARN [localhost-startStop-1](AbstractApplicationContext.java:487) - Exception encountered during contextinitialization - cancelling refresh attempt

org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'restEncodeDecodeServiceContainer':Initialization of bean failed; nested exception isorg.springframework.beans.ConversionNotSupportedException: Failed to convertproperty value of type 'java.util.ArrayList' to required type 'java.util.List'for property 'inInterceptors'; nested exception isjava.lang.IllegalStateException: Cannot convert value of type[com.dc.city.service.MyHandlerInterceptor$$EnhancerBySpringCGLIB$$cb65082f] torequired type [org.apache.cxf.interceptor.Interceptor] for property'inInterceptors[0]': no matching editors or conversion strategy found

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

       atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

       atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

       atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

       at

org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

       atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

       at

Caused by:org.springframework.beans.ConversionNotSupportedException: Failed to convertproperty value of type 'java.util.ArrayList' to required type 'java.util.List'for property 'inInterceptors'; nested exception isjava.lang.IllegalStateException: Cannot convert value of type[com.dc.city.service.MyHandlerInterceptor$$EnhancerBySpringCGLIB$$cb65082f] torequired type [org.apache.cxf.interceptor.Interceptor] for property'inInterceptors[0]': no matching editors or conversion strategy found

       atorg.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:476)

       atorg.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:506)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1523)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1482)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

       ...21 more

Caused by: java.lang.IllegalStateException:Cannot convert value of type[com.dc.city.service.MyHandlerInterceptor$$EnhancerBySpringCGLIB$$cb65082f] torequired type [org.apache.cxf.interceptor.Interceptor] for property'inInterceptors[0]': no matching editors or conversion strategy found

       atorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:287)

       atorg.springframework.beans.TypeConverterDelegate.convertToTypedCollection(TypeConverterDelegate.java:557)

       atorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:216)

       atorg.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:461)

       ...27 more

2015-04-16 23:47:29 ERROR[localhost-startStop-1] (ContextLoader.java:331) - Context initializationfailed

org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'restEncodeDecodeServiceContainer':Initialization of bean failed; nested exception isorg.springframework.beans.ConversionNotSupportedException: Failed to convertproperty value of type 'java.util.ArrayList' to required type 'java.util.List'for property 'inInterceptors'; nested exception isjava.lang.IllegalStateException: Cannot convert value of type[com.dc.city.service.MyHandlerInterceptor$$EnhancerBySpringCGLIB$$cb65082f] torequired type [org.apache.cxf.interceptor.Interceptor] for property'inInterceptors[0]': no matching editors or conversion strategy found

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

       atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

       atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

       atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

       atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

ontextLoader.java:403)

       atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

       atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

       atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)

       atorg.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)

       atorg.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

       atorg.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

       atjava.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

       atjava.util.concurrent.FutureTask.run(FutureTask.java:166)

       atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

       atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

       atjava.lang.Thread.run(Thread.java:722)

Caused by:org.springframework.beans.ConversionNotSupportedException: Failed to convertproperty value of type 'java.util.ArrayList' to required type 'java.util.List'for property 'inInterceptors'; nested exception isjava.lang.IllegalStateException: Cannot convert value of type[com.dc.city.service.MyHandlerInterceptor$$EnhancerBySpringCGLIB$$cb65082f] torequired type [org.apache.cxf.interceptor.Interceptor] for property 'inInterceptors[0]':no matching editors or conversion strategy found

       atorg.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:476)

       at

org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:506)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1523)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1482)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1222)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

       ...21 more

Caused by: java.lang.IllegalStateException:Cannot convert value of type[com.dc.city.service.MyHandlerInterceptor$$EnhancerBySpringCGLIB$$cb65082f] torequired type [org.apache.cxf.interceptor.Interceptor] for property'inInterceptors[0]': no matching editors or conversion strategy found

       atorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:287)

       atorg.springframework.beans.TypeConverterDelegate.convertToTypedCollection(TypeConverterDelegate.java:557)

       atorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:216)

       atorg.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:461)

       ...27 more

 

 

 

 

 

SEVERE: Servlet.service() for servlet [cxf]in context with path [/city_output] threw exception

java.lang.ClassCastException:com.dc.city.service.MyHandlerInterceptor$$EnhancerBySpringCGLIB$$8c75cf46cannot be cast to org.apache.cxf.phase.PhaseInterceptor

       atorg.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:195)

       atorg.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:186)

       atorg.apache.cxf.phase.PhaseInterceptorChain.add(PhaseInterceptorChain.java:177)

       atorg.apache.cxf.phase.PhaseChainCache.getChain(PhaseChainCache.java:93)

       atorg.apache.cxf.phase.PhaseChainCache.get(PhaseChainCache.java:68)

       atorg.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:99)

       atorg.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:249)

       atorg.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)

       atorg.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)

       atorg.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:289)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:214)

       atjavax.servlet.http.HttpServlet.service(HttpServlet.java:621)

       atorg.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:265)

       atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

       atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

       atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

       atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

       atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)

       atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

       atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

       atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

       atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)

       atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

       atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

       atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)

       atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

       atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)

       atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)

       atorg.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

       atorg.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)

       atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

       atjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

       atjava.lang.Thread.run(Thread.java:722)

 

 

四月17, 2015 2:39:53 下午 org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptorwriteResponseErrorMessage

WARNING: No message body writer has been foundfor response class MyUser.

No message body writer has been found forresponse class UserMap.

@Path("/userservice"

@Produces("application/json"

public classMyUserService {

   @GET 

   @Path("/getUsers"

   @Consumes("application/xml"

public UserMap  getUsers() { 

 

No message body writer has been found forresponse class UserMap.

缺少JSON支持Jar包

org.codehaus.jackson

                       jackson-jaxrs

                       1.9.13

        com.fasterxml.jackson.jr

                       jackson-jr-all

                       2.5.2

!!!!!!!!!!!!

JSON:

http://localhost:8080/city_output/11/userservice/getUser.json?id=1

XML:

http://localhost:8080/city_output/11/userservice/getUser.xml?id=2

 

 

Exception in thread "main"redis.clients.jedis.exceptions.JedisDataException: ERR wrong number ofarguments for 'set' command

       atredis.clients.jedis.Protocol.processError(Protocol.java:117)

       atredis.clients.jedis.Protocol.process(Protocol.java:142)

       atredis.clients.jedis.Protocol.read(Protocol.java:196)

       atredis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:288)

       atredis.clients.jedis.Connection.getStatusCodeReply(Connection.java:187)

       atredis.clients.jedis.Jedis.set(Jedis.java:2939)

       atcom.dc.city.dao.jedis.RedisUtil.tryLock(RedisUtil.java:35)

       atcom.dc.city.dao.support.RedisTest.main(RedisTest.java:33)

 

 

 

org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'userDao': Injection of autowired dependenciesfailed; nested exception isorg.springframework.beans.factory.BeanCreationException: Could not autowirefield: protected org.springframework.data.redis.core.RedisTemplatecom.city.common.test.AbstractBaseRedisDao.redisTemplate; nested exception isorg.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifyingbean of type [org.springframework.data.redis.core.RedisTemplate] found fordependency: expected at least 1 bean which qualifies as autowire candidate forthis dependency. Dependency annotations:{@org.springframework.beans.factory.annotation.Autowired(required=true)}

       atorg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)

       atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)

       atorg.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)

       atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

       atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)

       atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

       atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)

       atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)

       atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)

       atorg.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:125)

       atorg.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:60)

       atorg.springframework.test.context.support.AbstractDelegatingSmartContextLoader.delegateLoading(AbstractDelegatingSmartContextLoader.java:109)

       atorg.springframework.test.context.support.AbstractDelegatingSmartContextLoader.loadContext(AbstractDelegatingSmartContextLoader.java:261)

       atorg.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)

       atorg.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)

       atorg.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)

       atorg.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)

       atorg.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)

       atorg.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212)

       atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:200)

       atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:259)

       atorg.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

       atorg.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:261)

       at

org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)

       atorg.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

       atorg.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

       atorg.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

       atorg.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

       atorg.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

       atorg.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)

       atorg.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)

       atorg.junit.runners.ParentRunner.run(ParentRunner.java:309)




你可能感兴趣的:(问题,java)