开发者社区> 问答> 正文

ossclient在jsp中初始化失败



20:   OSSClient client = new OSSClient(ENDPOINT, ACCESS_ID, ACCESS_KEY);21:   byte[] bytes = TestTileCache.getCompressedTile("D:/platform/tilecache1","zjemap", "214", "42", "8", null, client);22:   FileOutputStream foss = new FileOutputStream("D:/testlly1.png");23:   foss.write(bytes);Stacktrace:org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)

root causejavax.servlet.ServletException: java.lang.NoSuchMethodError: org.apache.http.impl.conn.DefaultClientConnectionOperator.<init>(Lorg/apache/http/conn/scheme/SchemeRegistry;Lorg/apache/http/conn/DnsResolver;)Vorg.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:912)org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)org.apache.jsp.ALtest_jsp._jspService(ALtest_jsp.java:100)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)

root causejava.lang.NoSuchMethodError: org.apache.http.impl.conn.DefaultClientConnectionOperator.<init>(Lorg/apache/http/conn/scheme/SchemeRegistry;Lorg/apache/http/conn/DnsResolver;)Vorg.apache.http.impl.conn.PoolingClientConnectionManager.createConnectionOperator(PoolingClientConnectionManager.java:138)org.apache.http.impl.conn.PoolingClientConnectionManager.<init>(PoolingClientConnectionManager.java:112)org.apache.http.impl.conn.PoolingClientConnectionManager.<init>(PoolingClientConnectionManager.java:101)com.aliyun.oss.common.comm.HttpClientFactory.createConnectionManager(HttpClientFactory.java:89)com.aliyun.oss.common.comm.HttpClientFactory.create HttpClient(HttpClientFactory.java:56)com.aliyun.oss.common.comm.DefaultServiceClient.<init>(DefaultServiceClient.java:54)com.aliyun.oss.OSSClient.<init>(OSSClient.java:235)com.aliyun.oss.OSSClient.<init>(OSSClient.java:160)org.apache.jsp.ALtest_jsp._jspService(ALtest_jsp.java:80)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)javax.servlet.http.HttpServlet.service(HttpServlet.java:728)com.planetj.servlet.filter.compression.CompressingFilter.doFilter(CompressingFilter.java:270)

展开
收起
faith0001 2015-11-26 15:02:15 6535 0
1 条回答
写回答
取消 提交回答
  • Reossclient在jsp中初始化失败
    看上去像是 httpclient的版本不对,检查下环境中依赖的httpclient版本和oss sdk依赖的版本是否一致。
    2015-11-26 15:07:32
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
OSS运维进阶实战手册 立即下载
《OSS运维基础实战手册》 立即下载
OSS运维基础实战手册 立即下载