ssl._create_default_https_context无效

是否是使用了代理后
ssl._create_default_https_context = ssl._create_unverified_context
无效

获取代理ip

def get_proxy():
return requests.get("http://127.0.0.1:5010/get/").content

获得页面数据

def do_spider(page_no=1, encoding="gbk", parse_url="null"):
ssl._create_default_https_context = ssl._create_unverified_context
proxy = request.ProxyHandler({
"sock5": get_proxy()
})

opener = request.build_opener(proxy)
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
request.install_opener(opener)
# 对于二级页面进行爬取
if parse_url == "null":
    html_bytes = request.urlopen(url.format(page_no)).read()
else:
    html_bytes = request.urlopen(parse_url).read()
html_code = str(html_bytes, encoding)
return html_code

    异常
    Traceback (most recent call last):

File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\urllib\request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\http\client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\http\client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\http\client.py", line 964, in send
self.connect()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\http\client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\socket.py", line 724, in create_connection
raise err
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\Lib\socket.py", line 713, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

循环6次左右后就会爆上面这个异常

1个回答

这个是跟服务器连接失败,你的代理能不能正确连接等

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
requests库爬虫报错import ssl也没用?
requests库爬虫报错import ssl也没用 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108) 代码 ``` import requests import re # urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: # unable to get local issuer certificate (_ssl.c:1045)> import ssl ssl._create_default_https_context = ssl._create_unverified_context # 伪装浏览器 hd={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36",} # 需要开Fiddler才能使用这个ip+端口 px={"http":"http://127.0.0.1:8888"} rst=requests.get('http://www.aliwx.com.cn/',headers=hd,proxies=px) title=re.compile('<title>(.*?)</title>',re.S).findall(rst.text) print('rst: ',rst) print('title: ',title) ``` 详细说明:在看阿里云的爬虫课程实操时出现这个问题,我试过了这个取消全局验证的方法但是仍旧没用,提示信息就是这样,猜测是我的ip和端口有问题?但是之前的操作都和老师是一样的,有大佬知悉请指教一下 ![图片说明](https://img-ask.csdn.net/upload/202003/23/1584937982_542732.png)
python ssl客户端认证
server端 ``` # coding:utf-8 from __future__ import absolute_import, division, print_function, with_statement import socket, ssl import os import tornado.tcpserver from tornado.ioloop import IOLoop import tornado.gen ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) ssl_ctx.load_cert_chain("/keys/server.crt", "/keys/server.key") ssl_ctx.load_verify_locations("keys/ca.crt") ssl_ctx.verify_mode = ssl.CERT_REQUIRED class A(tornado.tcpserver.TCPServer): def handle_stream(self, stream, address): self.run(stream) @tornado.gen.coroutine def run(self, stream): body = yield stream.read_bytes(111110, partial=True) print(body) def main(): server = A(ssl_options=ssl_ctx) server.listen(6030, '') io_loop = IOLoop.current() io_loop.add_callback(main) io_loop.start() ``` client端 ``` # coding:utf-8 import socket, ssl, pprint import os s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ssl_ctx = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) ssl_ctx.load_cert_chain("keys/server.crt","keys/server.key") ssl_sock = ssl_ctx.wrap_socket(s) ssl_sock.connect(('localhost', 6030)) print repr(ssl_sock.getpeername()) print ssl_sock.cipher() print pprint.pformat(ssl_sock.getpeercert()) ssl_sock.write("boo!") ``` 运行后 服务器端报错 [SSL: NO_CERTIFICATE_RETURNED] no certificate returned (_ssl.c:590) 客户端也报错 [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:590) 我想做的是ssl双向认证
python 模拟登录知乎,登录不成功
import urllib2 import urllib import cookielib import ssl filename = 'cookie.txt' cookie = cookielib.MozillaCookieJar(filename) handler = urllib2.HTTPCookieProcessor(cookie) opener = urllib2.build_opener(handler) postData = urllib.urlencode({ 'account':'krishna_liang@163.com', 'password':'1liangwei', '_xsrf':'0764ca863ddcde749667d4aedd21d341', 'remember_me':True }) ssl._create_default_https_context = ssl._create_unverified_context loginUrl = 'http://www.zhihu.com/login/email' try: result = opener.open(loginUrl,postData) except urllib2.HTTPError,e: print e.code except urllib2.URLError,e: print e.reason else: print "OK" #print result.read() cookie.save(ignore_discard=True,ignore_expires=True) gradeUrl = 'https://www.zhihu.com' result = opener.open(gradeUrl) print result.read() ------------------------------------------------------------------------------------------ result = opener.open(loginUrl,postData)这句总是输入“OK” 读到的网页内容,也总是登录那一页,求教怎么才能模拟登录成功?
爬虫(python):为什么验证码总是验证失败(内有描述)?
#这是一个试图模拟12306登陆的程序,只到验证码部分 import urllib.request as U import urllib.parse as P import http.cookiejar as C import ssl import chardet as cd ssl._create_default_https_context = ssl._create_unverified_context #无视证书的有效性 opener = U.build_opener(U.HTTPCookieProcessor(C.CookieJar())) U.install_opener(opener) #创建一个访问者(具有cookie功能) req = U.Request("https://kyfw.12306.cn/passport/captcha/captcha-image64?login_site=E&module=login&rand=sjrand&1581337391968&callback=jQuery19109972447551572461_1581326959299&_=1581326959322") req.headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362" res = opener.open(req) #申请验证码 url = "data:image/jpg;base64," + res.read().decode("utf-8").split('({"image":"')[1].split('","result_message"')[0] #12306分为申请验证码和生成两部分,这是根据两部分的URL规律,生成的验证码图片的URL req = U.Request(url) req.headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362" res = opener.open(req) code_img = res.read() with open("D:\\py\\测试_练习综合体\\py练习\\imagecode12306.png","wb") as f: f.write(code_img) #获取验证码 pass_code = input("请输入验证码(坐标):") #根据图片获取验证码坐标 data = {"callback":"jQuery19109972447551572461_1581326959299","answer":pass_code,"rand":"sjrand","login_site":"E","_":"1581326959323"} data = P.urlencode(data).encode("utf-8") req = U.Request("https://kyfw.12306.cn/passport/captcha/captcha-check?callback=jQuery19109972447551572461_1581326959299&answer=188%2C49%2C30%2C39&rand=sjrand&login_site=E&_=1581326959323") req.headers["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362" res = opener.open(req,data = data) html = res.read().decode("utf-8") #验证码验证 #疑问:为什么验证码验证总是失败了(通过html获得结果)
python发送邮件报错 smtplib.SMTPHeloError: (500, b'Error: bad syntax')怎么解决
1、wind10系统,使用python发送邮件报语法错误。 2、源码 ``` import smtplib,ssl from email.message import EmailMessage #设置smtp服务器 smtp_server ='smtp.163.com' port=465 context=ssl.create_default_context() from_addr='xxx@163.com' to_addrs='sss@qq.com' passwd='1111' #设置邮件内容和格式 msg=EmailMessage() msg.set_content('邮件内容') msg['Subject']='test' msg['From']=from_addr msg['To']=to_addrs #登录和发送邮件 with smtplib.SMTP_SSL(smtp_server, port,context) as server: server.login(from_addr,passwd) server.sendmail(from_addr,to_addrs,msg) ``` 2、报错信息 ``` Traceback (most recent call last): File "send_email_text.py", line 29, in <module> server.login(from_addr,passwd) File "E:\Program Files\Python\Python3.8\lib\smtplib.py", line 698, in login self.ehlo_or_helo_if_needed() File "E:\Program Files\Python\Python3.8\lib\smtplib.py", line 607, in ehlo_or_helo_if_needed raise SMTPHeloError(code, resp) smtplib.SMTPHeloError: (500, b'Error: bad syntax') ```
基于Jitsi的网页视频通话项目
Jitsi-meet.js如下: ``` (function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f } var l = n[o] = { exports : {} }; t[o][0].call(l.exports, function(e) { var n = t[o][1][e]; return s(n ? n : e) }, l, l.exports, e, t, n, r) } return n[o].exports } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++) s(r[o]); return s }) ( { 1 : [ function(require, module, exports) { 'use strict'; var _createClass = function() { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target,descriptor.key, descriptor); } } return function(Constructor, protoProps,staticProps) { if (protoProps) defineProperties(Constructor.prototype,protoProps); if (staticProps) defineProperties(Constructor,staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call&& (typeof call === "object" || typeof call === "function")?call:self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function"&& superClass !== null) { throw new TypeError( "Super expression must either be null or a function, not "+typeof superClass); } subClass.prototype = Object.create( superClass && superClass.prototype, { constructor : { value : subClass, enumerable : false, writable : true, configurable : true } }); if (superClass) Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__ = superClass; } var EventEmitter = require('events').EventEmitter; var loadScript = require('load-script2'); var JitsiMeet = function(_EventEmitter) { _inherits(JitsiMeet, _EventEmitter); function JitsiMeet(baseUrl) { _classCallCheck(this, JitsiMeet); var _this = _possibleConstructorReturn( this,(JitsiMeet.__proto__ || Object.getPrototypeOf(JitsiMeet)).call(this)); _this._baseUrl = new window.URL(baseUrl); _this._ready = false; setTimeout(function() { return _this._loadApi(); }); return _this; } _createClass( JitsiMeet, [ { key : '_loadApi', value : function _loadApi() { var _this2 = this; if (window.JitsiMeetExternalAPI) { // Already // loaded this._ready = true; this.emit('ready'); return; } var apiUrl = this._baseUrl.href+ 'external_api.js'; loadScript( apiUrl, function(err) { if (err) { console.error('Error loading external API from '+ apiUrl); _this2.emit('initError');} else { _this2._ready = true; _this2.emit('ready'); } }); } }, { key : 'join', value : function join(room, selector,options) { if (!this._ready) { throw new Error('The library is not ready yet!'); } return new JitsiMeetConference( this._baseUrl,'' + room,selector,options); } }, { key : 'ready', get : function get() { return this._ready; } } ]); return JitsiMeet; }(EventEmitter); var JitsiMeetConference = function(_EventEmitter2) { _inherits(JitsiMeetConference,_EventEmitter2); function JitsiMeetConference(baseUrl, room,selector, options) { _classCallCheck(this,JitsiMeetConference); var _this3 = _possibleConstructorReturn( this,(JitsiMeetConference.__proto__ || Object.getPrototypeOf(JitsiMeetConference)).call(this)); _this3._roomUrl = '' + baseUrl.href+ room; _this3._node = typeof selector === 'string' ? document.querySelector(selector): selector; // XXX Fixup config overrides var config = Object.assign({},options.config); config.startAudioMuted = 9999; // make sure we always start unmuted config.startVideoMuted = 9999; config.enableRecording = false; // fix bug when customizing toolbars fixupConfigObject(config); var interfaceConfig = Object.assign({},options.interfaceConfig); fixupConfigObject(interfaceConfig); _this3._api = new window.JitsiMeetExternalAPI( baseUrl.host, // domain room, undefined, undefined, _this3._node, // HTML DOM element config, interfaceConfig, baseUrl.protocol !== 'https:' // No SSL? ); // XXX workarounds //_this3._api.iframeHolder.style.height = '100%'; //_this3._api.iframeHolder.style.width = '100%'; //_this3._api.frame.style.border = 0; _this3._avatarUrl = ''; _this3._displayName = ''; _this3._email = ''; _this3._audioMuted = false; _this3._videoMuted = false; _this3._shareScreen = false; // Setup event listeners _this3._api.addEventListeners({ videoConferenceJoined : _this3._onVideoConferenceJoined.bind(_this3), videoConferenceLeft : _this3._onVideoConferenceLeft.bind(_this3), readyToClose : _this3._onReadyToClose.bind(_this3) }); return _this3; } _createClass( JitsiMeetConference, [ { key : 'hangup', value : function hangup() { this._api.hangup(); } }, { key : 'dispose', value : function dispose() { if (this._api !== null) { this._api.dispose(); this._api = null; } } }, { key : '_onVideoConferenceJoined', value : function _onVideoConferenceJoined() { this.emit('joined'); } }, { key : '_onVideoConferenceLeft', value : function _onVideoConferenceLeft() { this.emit('left'); } }, { key : '_onReadyToClose', value : function _onReadyToClose() { this.dispose(); } }, { key : 'avatarUrl', get : function get() { return this._avatarUrl; }, set : function set(value) { this._avatarUrl = value; this._api.executeCommand('avatarUrl',value); } }, { key : 'displayName', get : function get() { return this._displayName; }, set : function set(value) { this._displayName = value; this._api.executeCommand('displayName',value); } }, { key : 'email', get : function get() { return this._email; }, set : function set( value) { this._email = value; this._api.executeCommand('email',value); } }, { key : 'roomUrl', get : function get() { return this._roomUrl; } }, { key : 'audioMuted', get : function get() { return this._audioMuted; }, set : function set( muted) { if (this._audioMuted === muted) { return; } this._audioMuted = muted; this._api.executeCommand('toggleAudio'); } }, { key : 'videoMuted', get : function get() { return this._videoMuted; }, set : function set( muted) { if (this._videoMuted === muted) { return; } this._videoMuted = muted; this._api.executeCommand('toggleVideo'); } }, { key : 'shareScreen', get : function get() { return this._shareScreen; }, set : function set( share) { if (this._shareScreen === share) { return; } this._shareScreen = share; this._api.executeCommand('toggleShareScreen'); } } ]); return JitsiMeetConference; }(EventEmitter); function fixupConfigObject(config) { for ( var key in config) { if (typeof key !== 'string') { continue; } try { config[key] = encodeURIComponent(JSON .stringify(config[key])); } catch (e) { console.warn('Error encoding '+ key + ': ' + e); delete config[key]; } } } module.exports = JitsiMeet; // Export also to the window object if running // in a browser. if (typeof window !== 'undefined') { window.JitsiMeet = JitsiMeet; } }, { "events" : 2, "load-script2" : 3 } ],2:[ function(require, module, exports) { function EventEmitter() { this._events = this._events || {}; this._maxListeners = this._maxListeners|| undefined; } module.exports = EventEmitter; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning // if more than 10 listeners are // added to it. This is a useful default which // helps finding memory leaks. EventEmitter.defaultMaxListeners = 10; // Obviously not all Emitters should be limited // to 10. This function allows // that to be increased. Set to zero for // unlimited. EventEmitter.prototype.setMaxListeners = function( n) { if (!isNumber(n) || n < 0 || isNaN(n)) throw TypeError('n must be a positive number'); this._maxListeners = n; return this; }; EventEmitter.prototype.emit = function(type) { var er, handler, len, args, i, listeners; if (!this._events) this._events = {}; // If there is no 'error' event listener // then throw. if (type === 'error') { if (!this._events.error|| (isObject(this._events.error) && !this._events.error.length)) { er = arguments[1]; if (er instanceof Error) { throw er; // Unhandled 'error' // event } else { // At least give some kind of // context to the user var err = new Error('Uncaught, unspecified "error" event. ('+ er + ')'); err.context = er; throw err; } } } handler = this._events[type]; if (isUndefined(handler)) return false; if (isFunction(handler)) { switch (arguments.length) { // fast cases case 1: handler.call(this); break; case 2: handler.call(this, arguments[1]); break; case 3: handler.call(this, arguments[1], arguments[2]); break; // slower default: args = Array.prototype.slice.call(arguments, 1); handler.apply(this, args); } } else if (isObject(handler)) { args = Array.prototype.slice.call(arguments, 1); listeners = handler.slice(); len = listeners.length; for (i = 0; i < len; i++) listeners[i].apply(this, args); } return true; }; EventEmitter.prototype.addListener = function(type, listener) { var m; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events) this._events = {}; // To avoid recursion in the case that type // === "newListener"! Before // adding it to the listeners, first emit // "newListener". if (this._events.newListener) this.emit('newListener',type,isFunction(listener.listener) ? listener.listener: listener); if (!this._events[type]) // Optimize the case of one listener. // Don't need the extra array object. this._events[type] = listener; else if (isObject(this._events[type])) // If we've already got an array, just // append. this._events[type].push(listener); else // Adding the second element, need to // change to array. this._events[type] = [this._events[type], listener ]; // Check for listener leak if (isObject(this._events[type])&& !this._events[type].warned) { if (!isUndefined(this._maxListeners)) { m = this._maxListeners; } else { m = EventEmitter.defaultMaxListeners; } if (m&& m > 0&& this._events[type].length > m) { this._events[type].warned = true; console.error( '(node) warning: possible EventEmitter memory '+ 'leak detected. %d listeners added. '+ 'Use emitter.setMaxListeners() to increase limit.', this._events[type].length); if (typeof console.trace === 'function') { // not supported in IE 10 console.trace(); } } } return this; }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.once = function(type, listener) { if (!isFunction(listener)) throw TypeError('listener must be a function'); var fired = false; function g() { this.removeListener(type, g); if (!fired) { fired = true; listener.apply(this, arguments); } } g.listener = listener; this.on(type, g); return this; }; // emits a 'removeListener' event iff the listener was removed EventEmitter.prototype.removeListener = function(type, listener) { var list, position, length, i; if (!isFunction(listener)) throw TypeError('listener must be a function'); if (!this._events || !this._events[type]) return this; list = this._events[type]; length = list.length; position = -1; if (list === listener || (isFunction(list.listener) && list.listener === listener)) { delete this._events[type]; if (this._events.removeListener) this.emit('removeListener', type,listener); } else if (isObject(list)) { for (i = length; i-- > 0;) { if (list[i] === listener || (list[i].listener && list[i].listener === listener)) { position = i; break; } } if (position < 0) return this; if (list.length === 1) { list.length = 0; delete this._events[type]; } else { list.splice(position, 1); } if (this._events.removeListener) this.emit('removeListener', type, listener); } return this; }; EventEmitter.prototype.removeAllListeners = function(type) { var key, listeners; if (!this._events) return this; // not listening for removeListener, no need to emit if (!this._events.removeListener) { if (arguments.length === 0) this._events = {}; else if (this._events[type]) delete this._events[type]; return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { for (key in this._events) { if (key === 'removeListener') continue; this.removeAllListeners(key); } this .removeAllListeners('removeListener'); this._events = {}; return this; } listeners = this._events[type]; if (isFunction(listeners)) { this.removeListener(type, listeners); } else if (listeners) { // LIFO order while (listeners.length) this.removeListener( type,listeners[listeners.length - 1]); } delete this._events[type]; return this; }; EventEmitter.prototype.listeners = function( type) { var ret; if (!this._events || !this._events[type]) ret = []; else if (isFunction(this._events[type])) ret = [ this._events[type] ]; else ret = this._events[type].slice(); return ret; }; EventEmitter.prototype.listenerCount = function( type) { if (this._events) { var evlistener = this._events[type]; if (isFunction(evlistener)) return 1; else if (evlistener) return evlistener.length; } return 0; }; EventEmitter.listenerCount = function(emitter,type) { return emitter.listenerCount(type); }; function isFunction(arg) { return typeof arg === 'function'; } function isNumber(arg) { return typeof arg === 'number'; } function isObject(arg) { return typeof arg === 'object' && arg !== null; } function isUndefined(arg) { return arg === void 0; } }, {} ],3 : [ function(require, module, exports) { module.exports = load function load(src, cb) { var head = document.head || document.getElementsByTagName('head')[0] var script = document.createElement('script') script.type = 'text/javascript' script.async = true script.src = src if (cb) { script.onload = function() { script.onerror = script.onload = null cb(null, script) } script.onerror = function() { script.onerror = script.onload = null cb(new Error('Failed to load '+ src), script) } } head.appendChild(script) } }, {} ] }, {}, [ 1 ]); ``` Jitsi.html代码如下: ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <style type="text/css"> #meet { position: absolute; bottom: 0; right: 0; width: 100%; height: 100%; overflow: hidden; } </style><!-- 此处配置视频在整个页面的大小 --> </head> <body> <div id="meet"></div><!-- css与js要对这个div进行操作时就能通过id来找到这个div --> <script src="script/jitsi-meet.js"></script> <script> var meet = new JitsiMeet('https://meet.jit.si'); meet.on('ready', function() { var interfaceConfig = { //filmStripOnly: true, DEFAULT_REMOTE_DISPLAY_NAME: 'John Doe', }; var options = {}; options.interfaceConfig = interfaceConfig; var conference = meet.join('Test1234', '#meet', options); conference.on('joined', function() { console.log('We are in!'); }); }); </script> </body> </html> ``` 上面的两个文件是整个项目的所有文件。在eclipse上编译运行,在浏览器上可以用localhost访问,但是输入本机ip地址无法获取音频和视频: ![图片说明](https://img-ask.csdn.net/upload/201902/26/1551162578_535574.png) 我尝试过在tomcat服务器上运行其他的.html文件,用localhost和ip地址都可以访问,请各位大佬帮忙看看,帮助我理解一下上面的.js文件,解决这个问题。先谢谢大家了!
我用python splunk-sdk 写的脚本查询splunk数据,建立一个oneshort查询,为什么最多只返回100条数据
如题有没有大神能帮帮看下是为什么? 最近公司要从splunk调数据放到自己的解析系统里,然后发现python有个splunk-sdk,但是编写脚本创建oneshort查询时发现,search_query里写到head n,n>100的时候也返回100条数据 脚本如下: ``` #!/usr/bin/env python #_*_encoding:utf-8_*_ import splunklib.client as client import splunklib.results as results from datetime import datetime, timedelta import os import ssl import time ssl._create_default_https_context = ssl._create_unverified_context HOST="127.0.0.1"#splunk服务器地址 PORT=8089#端口 USERNAME="splunk"#登录名 PASSWORD="12345678"#密码 #设置查询语句 search_query='search sourcetype=ttm | head 200' #定义查询起始日期和结束日期 end_time=datetime.now() #当前时间 start_time=end_time - timedelta(minutes=5) #当前时间-5分钟 #flume读取文件路径 basedir='/root/ezdata/ezlog/' #files,先写入temp文件,然后重命名成flows tempfile=os.path.join(basedir,'domain.temp') flows=end_time.strftime("%Y%m%d%H%M%S")+'.flows' flowsfile=os.path.join(basedir,flows) def main(): #连接splunk service = client.connect(host=HOST, port=PORT, username=USERNAME, password=PASSWORD, app='search',verify=False) assert isinstance(service, client.Service) #查询参数 search_kwargs={ 'earliest_time':datetime.strftime(start_time, "%Y-%m-%dT%H:%M:%S.%f")[:-3]+'+08:00', 'latest_time':datetime.strftime(end_time, "%Y-%m-%dT%H:%M:%S.%f")[:-3]+'+08:00' } jobs=service.jobs #执行查询语句 print("正在查询...") job=jobs.oneshot(search_query,**search_kwargs) #将结果写入本地文件中 with open(tempfile,'w+') as fh: for result in results.ResultsReader(job): fh.write(str(result['_raw'])) fh.write("\n") os.rename(tempfile,flowsfile) print("执行成功...") main() ``` 有没有人能帮忙看看
问个有关python+django+heroku的问题
``` Traceback (most recent call last): File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) psycopg2.errors.UndefinedTable: relation "auth_user" does not exist LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user... The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 351, in execute_from_command_line utility.execute() File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 325, in execute django.setup() File "/app/.heroku/python/lib/python3.6/site-packages/django/__init__.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models self.models_module = import_module(models_module_name) File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 978, in _gcd_import File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 655, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed File "/app/learning_logs/models.py", line 7, in <module> class Topic(models.Model): File "/app/learning_logs/models.py", line 8, in Topic choices=Help().choices() File "/app/learning_logs/help.py", line 9, in choices for user in users: File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py", line 162, in __iter__ self._fetch_all() File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py", line 965, in _fetch_all self._result_cache = list(self.iterator()) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py", line 238, in iterator results = compiler.execute_sql() File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql cursor.execute(sql, params) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 97, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/six.py", line 658, in reraise raise value.with_traceback(tb) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: relation "auth_user" does not exist LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user... ``` 在heroku bash操作makemigrations,migrate中出现的错误 在本地用这些没问题 settings.py ``` """ Django settings for learning_log project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os import django_heroku BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'o47!#$sbu_&=)pnbk63ra!hjbx@+pc=2j42cf(&mx82&hs&ph_' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'whitenoise.runserver_nostatic', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', #my app 'learning_logs', 'users', #other app 'bootstrap3', ) MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', ] MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', ) ROOT_URLCONF = 'learning_log.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'learning_log.wsgi.application' # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Internationalization # https://docs.djangoproject.com/en/1.8/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True LOGIN_URL = '/users/login/' # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.8/howto/static-files/ STATIC_URL = '/static/' MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') if os.getenv('DATABASE_URL') is not None: import dj_database_url DATABASES['default'] = dj_database_url.config() SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') ALLOWED_HOSTS = ['stark-anchorage-08076.herokuapp.com'] DEBUG = False BASE_DIR = os.path.dirname(os.path.abspath(__file__)) STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) django_heroku.settings(locals()) ``` views.py ``` from django.shortcuts import render from .models import Topic, Entry, Root, Suf_Pre_fix from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse from .forms import TopicForm, EntryForm, RootForm from django.contrib.auth.decorators import login_required from .help import Help from django.contrib.auth.models import User # Create your views here. def index(request): return render(request, 'learning_logs/index.html') @login_required def topics(request): topics = Topic.objects.order_by('date_added') context = {'topics': topics} return render(request, 'learning_logs/topics.html', context) @login_required def topic(request, topic_id): topic = Topic.objects.get(id=topic_id) entries = topic.entry_set.order_by('-date_added') context = {'topic': topic,'entries': entries} return render(request, 'learning_logs/topic.html', context) @login_required def new_topic(request): if request.method != 'POST': form = TopicForm() else: form = TopicForm(request.POST) if form.is_valid(): new_topic = form.save(commit=False) new_topic.owner = request.user new_topic.edit_able = request.POST.getlist("edit_able") new_topic.save() return HttpResponseRedirect(reverse('learning_logs:topics')) context = {'form': form, 'users':Help().users()} return render(request, 'learning_logs/new_topic.html', context) @login_required def new_entry(request, topic_id): topic = Topic.objects.get(id=topic_id) if request.method != 'POST': form = EntryForm() else: form = EntryForm(data=request.POST) if form.is_valid(): new_entry = form.save(commit=False) new_entry.topic = topic new_entry.edit_able = request.POST.getlist("edit_able") new_entry.save() return HttpResponseRedirect(reverse('learning_logs:topic',args=[topic_id])) context = {'topic':topic, 'form': form, 'users':Help().users()} return render(request, 'learning_logs/new_entry.html', context) @login_required def edit_entry(request, entry_id): entry = Entry.objects.get(id=entry_id) topic = entry.topic if not Help().check_user(request.user,entry.edit_able) or not Help().check_user(request.user,topic.edit_able): raise Http404 if request.method != 'POST': form = EntryForm(instance=entry) else: form = EntryForm(instance=entry, data=request.POST) if form.is_valid(): edit_entry = form.save(commit=False) edit_entry.edit_able = request.POST.getlist("edit_able") edit_entry.save() return HttpResponseRedirect(reverse('learning_logs:topic',args=[topic.id])) context = {'entry': entry, 'topic': topic, 'form': form ,'users':Help().users()} return render(request, 'learning_logs/edit_entry.html', context) @login_required def roots(request): roots = Root.objects.order_by('date_added') context = {'roots': roots} return render(request, 'learning_logs/roots.html', context) def root(request, root_id): root = Root.objects.get(id=root_id) things = root.things.order_by('-date_added') context = {'root':root, 'things':things} return render(request, 'learning_logs/root.html', context) ``` help.py ``` from django.contrib.auth.models import User class Help(): def __init__(self): pass def choices(self): users=User.objects.all() choices=[] a=1 for user in users: choices.append((a,str(user))) a+=1 return choices def check_user(self,user,users): try: str(users).index(str(user)) except: return False else: return True def users(self): users=[] for user in User.objects.all(): users.append(str(user)) return users def test_list(self,list1): for item in list1: print(type(item)) def test_word(self,item): print(item,type(item)) ```
问个有关django+heroku的问题
``` Traceback (most recent call last): File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) psycopg2.errors.UndefinedTable: relation "auth_user" does not exist LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user... The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 351, in execute_from_command_line utility.execute() File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 325, in execute django.setup() File "/app/.heroku/python/lib/python3.6/site-packages/django/__init__.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/app/.heroku/python/lib/python3.6/site-packages/django/apps/config.py", line 198, in import_models self.models_module = import_module(models_module_name) File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 978, in _gcd_import File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 655, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed File "/app/learning_logs/models.py", line 7, in <module> class Topic(models.Model): File "/app/learning_logs/models.py", line 8, in Topic choices=Help().choices() File "/app/learning_logs/help.py", line 9, in choices for user in users: File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py", line 162, in __iter__ self._fetch_all() File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py", line 965, in _fetch_all self._result_cache = list(self.iterator()) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/query.py", line 238, in iterator results = compiler.execute_sql() File "/app/.heroku/python/lib/python3.6/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql cursor.execute(sql, params) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/utils.py", line 97, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/app/.heroku/python/lib/python3.6/site-packages/django/utils/six.py", line 658, in reraise raise value.with_traceback(tb) File "/app/.heroku/python/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: relation "auth_user" does not exist LINE 1: ...user"."is_active", "auth_user"."date_joined" FROM "auth_user... ``` 在heroku bash操作makemigrations,migrate中出现的错误 在本地用这些没问题 settings.py ``` """ Django settings for learning_log project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os import django_heroku BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'o47!#$sbu_&=)pnbk63ra!hjbx@+pc=2j42cf(&mx82&hs&ph_' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'whitenoise.runserver_nostatic', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', #my app 'learning_logs', 'users', #other app 'bootstrap3', ) MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', ] MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', ) ROOT_URLCONF = 'learning_log.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'learning_log.wsgi.application' # Database # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Internationalization # https://docs.djangoproject.com/en/1.8/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True LOGIN_URL = '/users/login/' # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.8/howto/static-files/ STATIC_URL = '/static/' MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') if os.getenv('DATABASE_URL') is not None: import dj_database_url DATABASES['default'] = dj_database_url.config() SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') ALLOWED_HOSTS = ['stark-anchorage-08076.herokuapp.com'] DEBUG = False BASE_DIR = os.path.dirname(os.path.abspath(__file__)) STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) django_heroku.settings(locals()) ``` views.py ``` from django.shortcuts import render from .models import Topic, Entry, Root, Suf_Pre_fix from django.http import HttpResponseRedirect, Http404 from django.core.urlresolvers import reverse from .forms import TopicForm, EntryForm, RootForm from django.contrib.auth.decorators import login_required from .help import Help from django.contrib.auth.models import User # Create your views here. def index(request): return render(request, 'learning_logs/index.html') @login_required def topics(request): topics = Topic.objects.order_by('date_added') context = {'topics': topics} return render(request, 'learning_logs/topics.html', context) @login_required def topic(request, topic_id): topic = Topic.objects.get(id=topic_id) entries = topic.entry_set.order_by('-date_added') context = {'topic': topic,'entries': entries} return render(request, 'learning_logs/topic.html', context) @login_required def new_topic(request): if request.method != 'POST': form = TopicForm() else: form = TopicForm(request.POST) if form.is_valid(): new_topic = form.save(commit=False) new_topic.owner = request.user new_topic.edit_able = request.POST.getlist("edit_able") new_topic.save() return HttpResponseRedirect(reverse('learning_logs:topics')) context = {'form': form, 'users':Help().users()} return render(request, 'learning_logs/new_topic.html', context) @login_required def new_entry(request, topic_id): topic = Topic.objects.get(id=topic_id) if request.method != 'POST': form = EntryForm() else: form = EntryForm(data=request.POST) if form.is_valid(): new_entry = form.save(commit=False) new_entry.topic = topic new_entry.edit_able = request.POST.getlist("edit_able") new_entry.save() return HttpResponseRedirect(reverse('learning_logs:topic',args=[topic_id])) context = {'topic':topic, 'form': form, 'users':Help().users()} return render(request, 'learning_logs/new_entry.html', context) @login_required def edit_entry(request, entry_id): entry = Entry.objects.get(id=entry_id) topic = entry.topic if not Help().check_user(request.user,entry.edit_able) or not Help().check_user(request.user,topic.edit_able): raise Http404 if request.method != 'POST': form = EntryForm(instance=entry) else: form = EntryForm(instance=entry, data=request.POST) if form.is_valid(): edit_entry = form.save(commit=False) edit_entry.edit_able = request.POST.getlist("edit_able") edit_entry.save() return HttpResponseRedirect(reverse('learning_logs:topic',args=[topic.id])) context = {'entry': entry, 'topic': topic, 'form': form ,'users':Help().users()} return render(request, 'learning_logs/edit_entry.html', context) @login_required def roots(request): roots = Root.objects.order_by('date_added') context = {'roots': roots} return render(request, 'learning_logs/roots.html', context) def root(request, root_id): root = Root.objects.get(id=root_id) things = root.things.order_by('-date_added') context = {'root':root, 'things':things} return render(request, 'learning_logs/root.html', context) ``` help.py ``` from django.contrib.auth.models import User class Help(): def __init__(self): pass def choices(self): users=User.objects.all() choices=[] a=1 for user in users: choices.append((a,str(user))) a+=1 return choices def check_user(self,user,users): try: str(users).index(str(user)) except: return False else: return True def users(self): users=[] for user in User.objects.all(): users.append(str(user)) return users def test_list(self,list1): for item in list1: print(type(item)) def test_word(self,item): print(item,type(item)) ```
python中URL地址用.format转换后出错
python中URL地址用.format转换后出错,提示JSONDecodeError("Expecting value", s, err.value) from None。 不转换的话没什么问题,url地址放在了address变量中(我用的是python3) ``` import urllib.request import ssl import json from cons import cons ssl._create_default_https_context = ssl._create_unverified_context station_list = {} for i in cons.split('@'): if i: temp_list = i.split('|') station_list[temp_list[1]] = temp_list[2] train_date = '2017-8-17' from_station = station_list['北京'] to_station = station_list['上海'] print(train_date, from_station, to_station) def get_list(): address = 'https://kyfw.12306.cn/otn/leftTicket/query?leftTicketDTO.train_date={0}' \ '&leftTicketDTO.from_station={1}' \ '&leftTicketDTO.to_station={2}&purpose_codes=ADULT'.format(train_date, from_station, to_station) print(address) url = urllib.request.Request(address) url.add_header('User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)' ' Chrome/45.0.2454.101 Safari/537.36') html = urllib.request.urlopen(url).read() dit = json.loads(html) print(type(html)) print(type(dit)) return dit['data']['result'] # 车次3 # 出发时间8 # 到达时间9 # 历时 = 10 # 硬卧 =28 # 出发日期 13 for i in get_list(): temp_buy = i.split('|') if temp_buy == '无' or temp_buy == ' ': continue else: print(temp_buy) # buy break ``` cost.py中的代码如下 ``` cons = '@bji|北京|BJP|0@sha|上海|SHH|1@tji|天津|TJP|2@cqi|重庆|CQW|3' \ '@csh|长沙|CSQ|4@cch|长春|CCT|5@cdu|成都|CDW|6@fzh|福州|FZS|7' \ '@gzh|广州|GZQ|8@gya|贵阳|GIW|9@hht|呼和浩特|HHC|10' \ '@heb|哈尔滨|HBB|11@hfe|合肥|HFH|12@hzh|杭州|HZH|13' \ '@hko|海口|VUQ|14@jna|济南|JNK|15@kmi|昆明|KMM|16' \ '@lsa|拉萨|LSO|17@lzh|兰州|LZJ|18@nni|南宁|NNZ|19' \ '@nji|南京|NJH|20@nch|南昌|NCG|21@sya|沈阳|SYT|22' \ '@sjz|石家庄|SJP|23@tyu|太原|TYV|24@wlq|乌鲁木齐南|WMR|25' \ '@wha|武汉|WHN|26@xni|西宁|XNO|27@xan|西安|XAY|28' \ '@ych|银川|YIJ|29@zzh|郑州|ZZF|30@szh|深圳|SZQ|shenzhen|sz|31' \ '@xme|厦门|XMS|xiamen|xm|32' ```
我的mnist运行报错,请问是那出现问题了?
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse #解析训练和检测数据模块 import sys from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf FLAGS = None def main(_): # Import data mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True) # Create the model x = tf.placeholder(tf.float32, [None, 784]) #此函数可以理解为形参,用于定义过程,在执行的时候再赋具体的值 W = tf.Variable(tf.zeros([784, 10])) # tf.zeros表示所有的维度都为0 b = tf.Variable(tf.zeros([10])) y = tf.matmul(x, W) + b #对应每个分类概率值。 # Define loss and optimizer y_ = tf.placeholder(tf.float32, [None, 10]) # The raw formulation of cross-entropy, # # tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(tf.nn.softmax(y)), # reduction_indices=[1])) # # can be numerically unstable. # # So here we use tf.nn.softmax_cross_entropy_with_logits on the raw # outputs of 'y', and then average across the batch. cross_entropy = tf.reduce_mean( tf.nn.softmax_cross_entropy_with_logits(labels=y_, logits=y)) train_step = tf.train.GradientDescentOptimizer(0.5).minimize(cross_entropy) sess = tf.InteractiveSession() tf.global_variables_initializer().run() # Train for _ in range(1000): batch_xs, batch_ys = mnist.train.next_batch(100) sess.run(train_step, feed_dict={x: batch_xs, y_: batch_ys}) # Test trained model correct_prediction = tf.equal(tf.argmax(y, 1), tf.argmax(y_, 1)) accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32)) print(sess.run(accuracy, feed_dict={x: mnist.test.images, y_: mnist.test.labels})) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--data_dir', type=str, default='/tmp/tensorflow/mnist/input_data', help='Directory for storing input data') FLAGS, unparsed = parser.parse_known_args() tf.app.run(main=main, argv=[sys.argv[0]] + unparsed) ``` ```下面是报错: TimeoutError Traceback (most recent call last) ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 1317 h.request(req.get_method(), req.selector, req.data, headers, -> 1318 encode_chunked=req.has_header('Transfer-encoding')) 1319 except OSError as err: # timeout error ~\Anaconda3\envs\tensorflow\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) 1238 """Send a complete request to the server.""" -> 1239 self._send_request(method, url, body, headers, encode_chunked) 1240 ~\Anaconda3\envs\tensorflow\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) 1284 body = _encode(body, 'body') -> 1285 self.endheaders(body, encode_chunked=encode_chunked) 1286 ~\Anaconda3\envs\tensorflow\lib\http\client.py in endheaders(self, message_body, encode_chunked) 1233 raise CannotSendHeader() -> 1234 self._send_output(message_body, encode_chunked=encode_chunked) 1235 ~\Anaconda3\envs\tensorflow\lib\http\client.py in _send_output(self, message_body, encode_chunked) 1025 del self._buffer[:] -> 1026 self.send(msg) 1027 ~\Anaconda3\envs\tensorflow\lib\http\client.py in send(self, data) 963 if self.auto_open: --> 964 self.connect() 965 else: ~\Anaconda3\envs\tensorflow\lib\http\client.py in connect(self) 1399 self.sock = self._context.wrap_socket(self.sock, -> 1400 server_hostname=server_hostname) 1401 if not self._context.check_hostname and self._check_hostname: ~\Anaconda3\envs\tensorflow\lib\ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session) 400 server_hostname=server_hostname, --> 401 _context=self, _session=session) 402 ~\Anaconda3\envs\tensorflow\lib\ssl.py in __init__(self, sock, keyfile, certfile, server_side, cert_reqs, ssl_version, ca_certs, do_handshake_on_connect, family, type, proto, fileno, suppress_ragged_eofs, npn_protocols, ciphers, server_hostname, _context, _session) 807 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets") --> 808 self.do_handshake() 809 ~\Anaconda3\envs\tensorflow\lib\ssl.py in do_handshake(self, block) 1060 self.settimeout(None) -> 1061 self._sslobj.do_handshake() 1062 finally: ~\Anaconda3\envs\tensorflow\lib\ssl.py in do_handshake(self) 682 """Start the SSL/TLS handshake.""" --> 683 self._sslobj.do_handshake() 684 if self.context.check_hostname: TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 During handling of the above exception, another exception occurred: URLError Traceback (most recent call last) <ipython-input-1-eaf9732201f9> in <module>() 57 help='Directory for storing input data') 58 FLAGS, unparsed = parser.parse_known_args() ---> 59 tf.app.run(main=main, argv=[sys.argv[0]] + unparsed) ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py in run(main, argv) 46 # Call the main function, passing through any arguments 47 # to the final program. ---> 48 _sys.exit(main(_sys.argv[:1] + flags_passthrough)) 49 50 <ipython-input-1-eaf9732201f9> in main(_) 15 def main(_): 16 # Import data ---> 17 mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True) 18 19 # Create the model ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\mnist.py in read_data_sets(train_dir, fake_data, one_hot, dtype, reshape, validation_size, seed) 238 239 local_file = base.maybe_download(TRAIN_LABELS, train_dir, --> 240 SOURCE_URL + TRAIN_LABELS) 241 with open(local_file, 'rb') as f: 242 train_labels = extract_labels(f, one_hot=one_hot) ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py in maybe_download(filename, work_directory, source_url) 206 filepath = os.path.join(work_directory, filename) 207 if not gfile.Exists(filepath): --> 208 temp_file_name, _ = urlretrieve_with_retry(source_url) 209 gfile.Copy(temp_file_name, filepath) 210 with gfile.GFile(filepath) as f: ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py in wrapped_fn(*args, **kwargs) 163 for delay in delays(): 164 try: --> 165 return fn(*args, **kwargs) 166 except Exception as e: # pylint: disable=broad-except) 167 if is_retriable is None: ~\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\contrib\learn\python\learn\datasets\base.py in urlretrieve_with_retry(url, filename) 188 @retry(initial_delay=1.0, max_delay=16.0, is_retriable=_is_retriable) 189 def urlretrieve_with_retry(url, filename=None): --> 190 return urllib.request.urlretrieve(url, filename) 191 192 ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in urlretrieve(url, filename, reporthook, data) 246 url_type, path = splittype(url) 247 --> 248 with contextlib.closing(urlopen(url, data)) as fp: 249 headers = fp.info() 250 ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 221 else: 222 opener = _opener --> 223 return opener.open(url, data, timeout) 224 225 def install_opener(opener): ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in open(self, fullurl, data, timeout) 524 req = meth(req) 525 --> 526 response = self._open(req, data) 527 528 # post-process response ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in _open(self, req, data) 542 protocol = req.type 543 result = self._call_chain(self.handle_open, protocol, protocol + --> 544 '_open', req) 545 if result: 546 return result ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in _call_chain(self, chain, kind, meth_name, *args) 502 for handler in handlers: 503 func = getattr(handler, meth_name) --> 504 result = func(*args) 505 if result is not None: 506 return result ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in https_open(self, req) 1359 def https_open(self, req): 1360 return self.do_open(http.client.HTTPSConnection, req, -> 1361 context=self._context, check_hostname=self._check_hostname) 1362 1363 https_request = AbstractHTTPHandler.do_request_ ~\Anaconda3\envs\tensorflow\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 1318 encode_chunked=req.has_header('Transfer-encoding')) 1319 except OSError as err: # timeout error -> 1320 raise URLError(err) 1321 r = h.getresponse() 1322 except: URLError: <urlopen error [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。> In [ ]:
python string不能合并到一个列表
1.题目描述及期望结果 从data中提取出x,然后相加。期望结果为9。 data ='''[ { "id" : "001","x" : "2"} , { "id" : "009","x" : "7"} ]''' 2.相关代码 import ssl import json ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE data ='''[ { "id" : "001","x" : "2"} , { "id" : "009","x" : "7"} ]''' info = json.loads(data) for item in info: x1=item['x'] x3=[] for x2 in x1: x3.append(int(x2)) print(x3) 3.执行结果 [2] [7] 无法将这两个数字放在一个列表中,导致无法加和
急求:Json无法从dic-list-dic结构的字典中提取出数据
# 问题描述及期望结果 读取data[](http://py4e-data.dr-chuck.net/comments_213628.json "") 将里面count的数字都抓出来,并加和。 data={ "note":"This file contains the actual data for your assignment", "comments":[ { "name":"Lilygrace", "count":99 }, { "name":"Fraser", "count":1 } ] } # 思考过程及代码 用json把数字抓出来 import urllib.request, urllib.parse, urllib.error import ssl import json ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE url= input('Enter: ') uh = urllib.request.urlopen(url, context=ctx) data = uh.read() info = json.loads(data) x3 = [] for item in info: x1 = item['count'] x3.append(int(x1)) print(x3) print(sum(x3)) # 执行情况 报错 x1 = item['count'] TypeError: string indices must be integers
爬虫 根据F12拿到了Form data却得不到数据
[https://exclusions.ustr.gov/s/docket?docketNumber=USTR-2019-0005]( "")这是要爬的网站,我要抓那个表格的数据。 根据F12 我看到的Form data是 ![图片说明](https://img-ask.csdn.net/upload/201911/01/1572575634_265292.png) 他的rep是这样的 ![图片说明](https://img-ask.csdn.net/upload/201911/01/1572575662_770561.png) 然后这是我的部分代码 ![图片说明](https://img-ask.csdn.net/upload/201911/01/1572575681_727700.png) 这是我代码运行的结果 ![图片说明](https://img-ask.csdn.net/upload/201911/01/1572575700_192338.png)、 这是我完整的代码 import json import urllib import gzip from io import BytesIO import ssl ssl._create_default_https_context = ssl._create_unverified_context# 验证证书??不是很懂但是解决了SSL问题 def getHtml(url): headers={'User-Agent': 'User-Agent:Mozilla/5.0', 'Accept': '*/*', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'zh-CN,zh;q=0.9', 'Connection': 'keep-alive', 'Content-Length': '1483', 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8', #'Cookie': 'pctrk=13806d4e-9502-4a46-b0a9-2dd0335ae056; renderCtx=%7B%22pageId%22%3A%2261489a7e-6511-4230-b9ed-bab5c8ff93b7%22%2C%22schema%22%3A%22Published%22%2C%22viewType%22%3A%22Published%22%2C%22brandingSetId%22%3A%2211600771-9799-46b6-9913-22cd8f714e32%22%2C%22audienceIds%22%3A%226Aut0000000PB9n%22%7D; oinfo=c3RhdHVzPUFDVElWRSZ0eXBlPTYmb2lkPTAwRHQwMDAwMDAwNFhMQw==; autocomplete=1; sid_Client=0000003KCN200000004XLC; clientSrc=222.68.18.123; inst=APPt; oid=00Dt00000004XLC; sid=00Dt00000004XLC!AQMAQHl3llX9OgfLSZgIaLL.z6gaelF3sYrH.QuZwNF1MIR6MR.k19Tfgn1O9Yd0hdFjMn1XQrgtdNQ6tv4MKhSLxjhTF4ET; __cfduid=d85b901ba5cd527ea8548a447e8f01b5a1572504746', 'Host': 'exclusions.ustr.gov', 'Origin': 'https://exclusions.ustr.gov', 'Referer': 'https://exclusions.ustr.gov/s/docket?docketNumber=USTR-2019-0005', #User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36 'X-SFDC-Request-Id': '11312554500007b083'} data = {'message': '{"actions":[{"id":"68;a","descriptor":"aura://ApexActionController/ACTION$execute","callingDescriptor":"UNKNOWN","params":{"namespace":"","classname":"ustrPublicDocketAuraService","method":"getPageRecords","params":{"selectorJSON":"{\"docketNumber\":\"USTR-2019-0005\",\"filteredBy\":\"\",\"sortedBy\":\"Name\",\"sortedDirection\":\"asc\",\"lastSortedByValue\":null,\"lastRequestNumber\":null,\"startIndex\":50,\"endIndex\":100}"},"cacheable":false,"isContinuation":false}}]}', 'aura.context': '{"mode":"PROD","fwuid":"3uHUkqaEy5o9m3W8DAEYIw","app":"siteforce:communityApp","loaded":{"APPLICATION@markup://siteforce:communityApp":"vc87DBrWuhFjIBDb5BvCxQ"},"dn":[],"globals":{},"uad":false}', 'aura.pageURI': '/s/docket?docketNumber=USTR-2019-0005', 'aura.token': 'undefined'} data = urllib.parse.urlencode(data).encode("utf-8") data1 = urllib.request.Request(url, headers=headers) page = urllib.request.urlopen(data1,data=data) html2 = page.read() buff = BytesIO(html2) f = gzip.GzipFile(fileobj = buff) res = f.read().decode('utf-8') return res url = 'https://exclusions.ustr.gov/s/sfsites/aura?r=8&aura.ApexAction.execute=1' #url = 'https://www.baidu.com' a = getHtml(url) print(a) ``` ``` ``` ```
一个异常大佬来看看啊
十一月 29, 2017 2:53:14 下午 com.microsoft.sqlserver.jdbc.TDSChannel enableSSL 信息: java.security path: D:\Java\jdk1.8.0_121\jre\lib\security Security providers: [SUN version 1.8, SunRsaSign version 1.8, SunEC version 1.8, SunJSSE version 1.8, SunJCE version 1.8, SunJGSS version 1.8, SunSASL version 1.8, XMLDSig version 1.8, SunPCSC version 1.8, SunMSCAPI version 1.8] SSLContext provider info: Sun JSSE provider(PKCS12, SunX509/PKIX key/trust factories, SSLv3/TLSv1/TLSv1.1/TLSv1.2) SSLContext provider services: [SunJSSE: KeyFactory.RSA -> sun.security.rsa.RSAKeyFactory aliases: [1.2.840.113549.1.1, OID.1.2.840.113549.1.1] , SunJSSE: KeyPairGenerator.RSA -> sun.security.rsa.RSAKeyPairGenerator aliases: [1.2.840.113549.1.1, OID.1.2.840.113549.1.1] , SunJSSE: Signature.MD2withRSA -> sun.security.rsa.RSASignature$MD2withRSA aliases: [1.2.840.113549.1.1.2, OID.1.2.840.113549.1.1.2] , SunJSSE: Signature.MD5withRSA -> sun.security.rsa.RSASignature$MD5withRSA aliases: [1.2.840.113549.1.1.4, OID.1.2.840.113549.1.1.4] , SunJSSE: Signature.SHA1withRSA -> sun.security.rsa.RSASignature$SHA1withRSA aliases: [1.2.840.113549.1.1.5, OID.1.2.840.113549.1.1.5, 1.3.14.3.2.29, OID.1.3.14.3.2.29] , SunJSSE: Signature.MD5andSHA1withRSA -> sun.security.ssl.RSASignature , SunJSSE: KeyManagerFactory.SunX509 -> sun.security.ssl.KeyManagerFactoryImpl$SunX509 , SunJSSE: KeyManagerFactory.NewSunX509 -> sun.security.ssl.KeyManagerFactoryImpl$X509 aliases: [PKIX] , SunJSSE: TrustManagerFactory.SunX509 -> sun.security.ssl.TrustManagerFactoryImpl$SimpleFactory , SunJSSE: TrustManagerFactory.PKIX -> sun.security.ssl.TrustManagerFactoryImpl$PKIXFactory aliases: [SunPKIX, X509, X.509] , SunJSSE: SSLContext.TLSv1 -> sun.security.ssl.SSLContextImpl$TLS10Context aliases: [SSLv3] , SunJSSE: SSLContext.TLSv1.1 -> sun.security.ssl.SSLContextImpl$TLS11Context , SunJSSE: SSLContext.TLSv1.2 -> sun.security.ssl.SSLContextImpl$TLS12Context , SunJSSE: SSLContext.TLS -> sun.security.ssl.SSLContextImpl$TLSContext aliases: [SSL] , SunJSSE: SSLContext.Default -> sun.security.ssl.SSLContextImpl$DefaultSSLContext , SunJSSE: KeyStore.PKCS12 -> sun.security.pkcs12.PKCS12KeyStore ] java.ext.dirs: D:\Java\jdk1.8.0_121\jre\lib\ext;C:\Windows\Sun\Java\lib\ext 2017-11-29 14:53:14 [ERROR] -com.zhwy.dao.BaseDao.listEntity(BaseDao.java:161) 查询实体出错:sql语句:SELECT id,disasterName,disasterCode FROM ZaiQing_DisasterType org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“Connection reset by peer: socket write error ClientConnectionId:966610ce-9b7d-49b7-8a3d-d02bf9506918”。) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:394) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:474) at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:484) at com.zhwy.dao.BaseDao.listEntity(BaseDao.java:157) at com.zhwy.dao.impl.DisasterTypeDaoImpl.listDisasterType(DisasterTypeDaoImpl.java:41) at com.zhwy.service.impl.DisasterTypeServiceImpl.listDisasterType(DisasterTypeServiceImpl.java:21) at com.zhwy.controller.ZaiQingShaiXuanController.zaiQingShaiXuan(ZaiQingShaiXuanController.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:967) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) at javax.servlet.http.HttpServlet.service(HttpServlet.java:723) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:876) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:618) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1790) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“Connection reset by peer: socket write error ClientConnectionId:966610ce-9b7d-49b7-8a3d-d02bf9506918”。) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) ... 40 more Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。错误:“Connection reset by peer: socket write error ClientConnectionId:966610ce-9b7d-49b7-8a3d-d02bf9506918”。 at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667) at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1668) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1323) at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ... 44 more Caused by: java.io.IOException: Connection reset by peer: socket write error ClientConnectionId:966610ce-9b7d-49b7-8a3d-d02bf9506918 at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:638) at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:708) at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:700) at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:895) at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:883) at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) at sun.security.ssl.InputRecord.read(InputRecord.java:503) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1618) ... 52 more 请大佬告诉我这个怎么解决 度娘googel都找不到办法
Json提取dic-list-dic数据报错
### 题目描述 提取data中的x,并将其相加。 data ={"note":"This", "count":[ { "id" : "001","x" : "2","name" : "Chuck"} , { "id" : "009","x" : "7", "name" : "Brent"} ]} ### 题目来源及自己的思路 用json提取 ### 相关代码 // 请把代码文本粘贴到下方(请勿用图片代替代码) import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup import ssl import json ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE data ={"note":"This", "count":[ { "id" : "001","x" : "2","name" : "Chuck"} , { "id" : "009","x" : "7", "name" : "Brent"} ]} info = json.loads(data) print('User count:', len(info)) for item in info: print('Name', item['name']) print('Id', item['id']) print('Attribute', item['x']) ### 你期待的结果是什么?实际看到的错误信息又是什么? 1.我期待的结果是 x 2 x 7 2.但执行结果提示TypeError: the JSON object must be str, bytes or bytearray, not dict 3.我试了下如果将data转化为以下样式就可以了,但不知如何转化。另外,如果用data=data['count'],转化出来的数据不带”'''“,导致还是会报错。 data ='''[ { "id" : "001", "x" : "2", "name" : "Chuck"} , { "id" : "009", "x" : "7", "name" : "Brent"} ]'''
MavenWeb项目使用mybatis的分页查询插件,在项目部署时出现错误
MavenWeb项目使用mybatis的分页查询插件,在项目部署时出现错误,在程序中 运行可以查询出来,但是我只要用tomcat启动项目就报错,把mybatis的分页插件 配置注掉后就又可以部署成功,有没有大佬知道是什么情况!?? 下面是报错信息 ``` D:\apache-tomcat-9.0.19\bin\catalina.bat run [2019-06-22 06:33:48,732] Artifact SSM整合:war exploded: Waiting for server connection to start artifact deployment... Using CATALINA_BASE: "C:\Users\95638\.IntelliJIdea2018.3\system\tomcat\Unnamed_SSM整合" Using CATALINA_HOME: "D:\apache-tomcat-9.0.19" Using CATALINA_TMPDIR: "D:\apache-tomcat-9.0.19\temp" Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_144" Using CLASSPATH: "D:\apache-tomcat-9.0.19\bin\bootstrap.jar;D:\apache-tomcat-9.0.19\bin\tomcat-juli.jar" 22-Jun-2019 18:33:49.881 警告 [main] org.apache.tomcat.util.digester.Digester.endElement No rules found matching [Server/Service/Context] 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.19 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.构建: Apr 12 2019 14:22:48 UTC 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.19.0 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 结.造: amd64 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: C:\Program Files\Java\jdk1.8.0_144\jre 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本: 1.8.0_144-b01 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\95638\.IntelliJIdea2018.3\system\tomcat\Unnamed_SSM整合 22-Jun-2019 18:33:49.917 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\apache-tomcat-9.0.19 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\95638\.IntelliJIdea2018.3\system\tomcat\Unnamed_SSM整合\conf\logging.properties 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote= 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\95638\.IntelliJIdea2018.3\system\tomcat\Unnamed_SSM整合 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\apache-tomcat-9.0.19 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-9.0.19\temp 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. 22-Jun-2019 18:33:49.918 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 22-Jun-2019 18:33:49.919 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 22-Jun-2019 18:33:49.922 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018] 22-Jun-2019 18:33:50.039 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"] 22-Jun-2019 18:33:50.062 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["ajp-nio-8009"] 22-Jun-2019 18:33:50.066 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[448]毫秒内初始化 22-Jun-2019 18:33:50.094 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 22-Jun-2019 18:33:50.094 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.19] 22-Jun-2019 18:33:50.107 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"] 22-Jun-2019 18:33:50.121 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"] 22-Jun-2019 18:33:50.124 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [58] milliseconds Connected to server [2019-06-22 06:33:50,289] Artifact SSM整合:war exploded: Artifact is being deployed, please wait... 22-Jun-2019 18:33:52.765 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 22-Jun-2019 18:33:52.844 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started 22-Jun-2019 18:33:53.914 信息 [MLog-Init-Reporter] com.mchange.v2.log.MLog. MLog clients using java 1.4+ standard logging. 22-Jun-2019 18:33:53.996 信息 [RMI TCP Connection(3)-127.0.0.1] com.mchange.v2.c3p0.C3P0Registry. Initializing c3p0-0.9.5.4 [built 23-March-2019 23:00:48 -0700; debug? true; trace: 10] 22-Jun-2019 18:33:54.097 警告 [RMI TCP Connection(3)-127.0.0.1] org.springframework.context.support.AbstractApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'departmentService': Unsatisfied dependency expressed through field 'departmentMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'departmentMapper' defined in file [E:\SSM整合\out\artifacts\SSM_war_exploded\WEB-INF\classes\com\neuedu\dao\DepartmentMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring.xml]: Cannot create inner bean 'com.github.pagehelper.PageInterceptor#360582c8' of type [com.github.pagehelper.PageInterceptor] while setting bean property 'plugins' with key [0]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.github.pagehelper.PageInterceptor] for bean with name 'com.github.pagehelper.PageInterceptor#360582c8' defined in class path resource [spring.xml]; nested exception is java.lang.ClassNotFoundException: com.github.pagehelper.PageInterceptor 22-Jun-2019 18:33:54.103 严重 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'departmentService': Unsatisfied dependency expressed through field 'departmentMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'departmentMapper' defined in file [E:\SSM整合\out\artifacts\SSM_war_exploded\WEB-INF\classes\com\neuedu\dao\DepartmentMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring.xml]: Cannot create inner bean 'com.github.pagehelper.PageInterceptor#360582c8' of type [com.github.pagehelper.PageInterceptor] while setting bean property 'plugins' with key [0]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.github.pagehelper.PageInterceptor] for bean with name 'com.github.pagehelper.PageInterceptor#360582c8' defined in class path resource [spring.xml]; nested exception is java.lang.ClassNotFoundException: com.github.pagehelper.PageInterceptor at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4682) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5150) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695) at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1728) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:457) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:406) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'departmentMapper' defined in file [E:\SSM整合\out\artifacts\SSM_war_exploded\WEB-INF\classes\com\neuedu\dao\DepartmentMapper.class]: Cannot resolve reference to bean 'sqlSessionFactory' while setting bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring.xml]: Cannot create inner bean 'com.github.pagehelper.PageInterceptor#360582c8' of type [com.github.pagehelper.PageInterceptor] while setting bean property 'plugins' with key [0]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.github.pagehelper.PageInterceptor] for bean with name 'com.github.pagehelper.PageInterceptor#360582c8' defined in class path resource [spring.xml]; nested exception is java.lang.ClassNotFoundException: com.github.pagehelper.PageInterceptor at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:314) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1681) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1433) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1251) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1171) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ... 60 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [spring.xml]: Cannot create inner bean 'com.github.pagehelper.PageInterceptor#360582c8' of type [com.github.pagehelper.PageInterceptor] while setting bean property 'plugins' with key [0]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.github.pagehelper.PageInterceptor] for bean with name 'com.github.pagehelper.PageInterceptor#360582c8' defined in class path resource [spring.xml]; nested exception is java.lang.ClassNotFoundException: com.github.pagehelper.PageInterceptor at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:361) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:124) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedArray(BeanDefinitionValueResolver.java:388) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:155) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1681) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1433) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:303) ... 73 more Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.github.pagehelper.PageInterceptor] for bean with name 'com.github.pagehelper.PageInterceptor#360582c8' defined in class path resource [spring.xml]; nested exception is java.lang.ClassNotFoundException: com.github.pagehelper.PageInterceptor at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1392) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:487) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:346) ... 85 more Caused by: java.lang.ClassNotFoundException: com.github.pagehelper.PageInterceptor at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1363) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:348) at org.springframework.util.ClassUtils.forName(ClassUtils.java:275) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:444) at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1457) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1384) ... 87 more 22-Jun-2019 18:33:54.140 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file 22-Jun-2019 18:33:54.142 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors [2019-06-22 06:33:54,184] Artifact SSM整合:war exploded: Error during artifact deployment. See server log for details. 22-Jun-2019 18:34:00.118 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\apache-tomcat-9.0.19\webapps\manager] 22-Jun-2019 18:34:00.415 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\apache-tomcat-9.0.19\webapps\manager] has finished in [297] ms ``` # springmvc.xml的配置 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd"> <context:component-scan base-package="com.neuedu" use-default-filters="false"> <!--指定指挥扫描那些类型的注解,这里指定只会扫描com.neuedu下或子包中的注解@Controller。其他注解不扫描--> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!--导入依赖注入的注解解析器 --> <context:annotation-config></context:annotation-config> <!--开启基于注解的处理器映射器与处理器适配器 --> <mvc:annotation-driven ></mvc:annotation-driven> <!--配置吧静态资源交给tomcat来处理(springmvc框架就不要处理了) --> <mvc:default-servlet-handler></mvc:default-servlet-handler> <!-- 视图解析器 解析jsp解析,默认使用jstl标签,classpath下的得有jstl的包 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <!-- 配置jsp路径的前缀 --> <property name="prefix" value="/WEB-INF/jsp/"/> <!-- 配置jsp路径的后缀 --> <property name="suffix" value=".jsp"/> </bean> </beans> ``` # spring.xml的配置 ``` <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/cache" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd"> <!--配置对service及dao包的扫描 --> <context:component-scan base-package="com.neuedu"> <!--配置对那些注解不进行扫描(不扫描注解@controller,因为他被springmvc扫描了) --> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!--配置开启依赖注入的注解解析器(主要针对@Autoired,@Resource注解) --> <context:annotation-config/> <!--配置通过引入配置文件来进行数据库连接 --> <context:property-placeholder location="classpath:jdbc"/> <!--配置基于c3p0的数据库连接池,该类在c3p0对应的jar包中 --> <bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <!--配置数据库连接的基本属性 --> <property name="driverClass" value="${jdbc.driverClass}"/> <property name="jdbcUrl" value="${jdbc.dburl}"/> <property name="user" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> </bean> <!--配置sqlSessionFactory 该类在Mybatis-spring jar包中--> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <!--通过整合mybatis框架的核心配置文件,通过属性configLocation来指定 --> <property name="configLocation" value="classpath:mybatis-config.xml"/> <!--配置引用数据源(数据库连接池) --> <property name="dataSource" ref="c3p0DataSource"/> <!--配置加载那些mybatis框架中的映射文件 --> <property name="mapperLocations" value="classpath:mapper/*.xml"/> <!-- 在 Spring 配置文件中配置拦截器插件 --> <property name="typeAliasesPackage" value="com.isea533.mybatis.model"/> <property name="plugins"> <array> <bean class="com.github.pagehelper.PageInterceptor"> <!-- 这里的几个配置主要演示如何使用,如果不理解,一定要去掉下面的配置 --> <property name="properties"> <value> helperDialect=mysql reasonable=true supportMethodsArguments=true params=count=countSql autoRuntimeDialect=true </value> </property> </bean> </array> </property> </bean> <!--配置事务管理器类,该类在Spring-jdbc jar包中 --> <bean id="tx" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <!--关联数据源 --> <property name="dataSource" ref="c3p0DataSource"/> </bean> <!--配置开启基于注解的事务管理的注解解析器(@Transactional) --> <!--<tx:annotation-driven transaction-manager="tx"/>--> <!--配置dao曾家口的实现代理 --> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <!--配置对那个包进行接口扫描 --> <property name="basePackage" value="com.neuedu.dao"/> <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/> </bean> </beans> ``` # mybatis.xml的配置 ``` <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <settings> <setting name="mapUnderscoreToCamelCase" value="true"/> </settings> </configuration> ``` 来个大佬捞一手叭!
Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used
一、控制台打印信息 "D:\Program Files\tomcat9.0.20\bin\catalina.bat" run [2019-10-26 08:59:45,240] Artifact Jia01.02:war exploded: Waiting for server connection to start artifact deployment... Using CATALINA_BASE: "C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp" Using CATALINA_HOME: "D:\Program Files\tomcat9.0.20" Using CATALINA_TMPDIR: "D:\Program Files\tomcat9.0.20\temp" Using JRE_HOME: "D:\Program Files\Java\jdk1.8.0_181" Using CLASSPATH: "D:\Program Files\tomcat9.0.20\bin\bootstrap.jar;D:\Program Files\tomcat9.0.20\bin\tomcat-juli.jar" Connected to the target VM, address: '127.0.0.1:65083', transport: 'socket' 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.20 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.构建: May 3 2019 22:26:00 UTC 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.20.0 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 结.造: amd64 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: D:\Program Files\Java\jdk1.8.0_181\jre 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本: 1.8.0_181-b13 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\Program Files\tomcat9.0.20 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp\conf\logging.properties 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:65083,suspend=y,server=n 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\Administrator\.IntelliJIdea2018.2\system\captureAgent\debugger-agent.jar=file:/C:/Users/Administrator/AppData/Local/Temp/capture11347.props 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote= 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx3072m 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=256M 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=512M 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmn256M 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Duser.timezone=Asia/Shanghai 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx3072m 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=256M 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=512M 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmn256M 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Duser.timezone=Asia/Shanghai 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Program Files\tomcat9.0.20 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\Program Files\tomcat9.0.20\temp 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018] 26-Oct-2019 08:59:46.962 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"] 26-Oct-2019 08:59:46.993 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["ajp-nio-8009"] 26-Oct-2019 08:59:46.993 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[827]毫秒内初始化 26-Oct-2019 08:59:47.056 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 26-Oct-2019 08:59:47.056 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.20] 26-Oct-2019 08:59:47.071 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"] 26-Oct-2019 08:59:47.103 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"] 26-Oct-2019 08:59:47.103 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [103] milliseconds Connected to server [2019-10-26 08:59:47,353] Artifact Jia01.02:war exploded: Artifact is being deployed, please wait... 26-Oct-2019 08:59:57.450 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\Program Files\tomcat9.0.20\webapps\manager] 26-Oct-2019 08:59:58.502 信息 [Catalina-utility-1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 26-Oct-2019 08:59:58.645 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\Program Files\tomcat9.0.20\webapps\manager] has finished in [1,196] ms 26-Oct-2019 09:00:18.849 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 本地网络IP:192.168.58.1,网卡物理地址:00:50:56:c0:00:08 2019-10-26 09:00:20,447 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.framework.plugin.loader.PluginContextLoaderListener.printHwadd(159) 获取本地网卡地址时,出现多个网卡,可能会导致正式版的license失效,建议通过JVM参数“-Djgroups.bind_addr=ip地址”,绑定本机地址 授权给:深圳市蓝凌软件股份有限公司开发演示许可 试用版:2019-11-09 Plugin Context is starting ... WebContentPath:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war 2019-10-26 09:01:13,491 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(133) No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml 2019-10-26 09:01:26,540 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.sys.config.loader.KmssLookupListableBeanFactory.resolveBeanDefinition(151) Overriding bean definition for bean 'lbpmRobotNodeServiceAdapter for using @replace': replacing [bean name: lbpmRobotNodeServiceAdapter; defined in ServletContext resource [/WEB-INF/KmssConfig/sys/lbpmservice/node/robotnode/spring.xml]] with [bean name: @replace(lbpmRobotNodeServiceAdapter); defined in ServletContext resource [/WEB-INF/KmssConfig/sys/workflow/support/oa/spring.xml]] 2019-10-26 09:01:36,793 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: com.alibaba.druid.pool.DruidDataSource.init(722) {dataSource-1} inited 2019-10-26 09:02:13,638 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.sys.restservice.client.cloud.eureka.EkpCloudClientFactoryBean.getObject(78) UnusableRestClient will be created, it will throw RestClientException when invoked at any time. 2019-10-26 09:02:36,036 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy.init(126) com.landray.kmss.sys.authentication.integration.KmssAuthenticationProcessingFilter is a GenericFilterBean, cannot execute init with a null value, be sure this situation is accepted. 2019-10-26 09:02:36,233 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.security.web.access.intercept.FilterSecurityInterceptor.afterPropertiesSet(141) Could not validate configuration attributes as the SecurityMetadataSource did not return any attributes from getAllConfigAttributes() 2019-10-26 09:02:36,713 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(133) No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml 2019-10-26 09:02:36,726 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.CacheManager.detectAndFixDiskStorePathConflict(322) Creating a new instance of CacheManager using the diskStorePath "D:\Program Files\tomcat9.0.20\temp" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to D:\Program Files\tomcat9.0.20\temp\ehcache_auto_created_1572051756726. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. 2019-10-26 09:03:02,518 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(133) No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml 2019-10-26 09:03:02,527 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.CacheManager.detectAndFixDiskStorePathConflict(322) Creating a new instance of CacheManager using the diskStorePath "D:\Program Files\tomcat9.0.20\temp" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to D:\Program Files\tomcat9.0.20\temp\ehcache_auto_created_1572051782527. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. 2019-10-26 09:03:02,535 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.third.ftsearch.cache.ehcache.EhCacheProvider.buildCache(94) Could not find configuration [indexSchemaCache]; using defaults. 2019-10-26 09:03:03,176 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.getProperties(138) config paoding analysis from: D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-analysis.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-analysis-default.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-analyzer.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-dic-home.properties;E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\dic\paoding-dic-names.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-knives.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-knives-user.properties 2019-10-26 09:03:03,185 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.createPaodingWithKnives(456) add knike: net.paoding.analysis.knife.CJKKnife 2019-10-26 09:03:03,190 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.createPaodingWithKnives(456) add knike: net.paoding.analysis.knife.LetterKnife 2019-10-26 09:03:03,193 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.createPaodingWithKnives(456) add knike: net.paoding.analysis.knife.NumberKnife 2019-10-26 09:03:08,969 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,044 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,124 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,312 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,409 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,515 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,615 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,721 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,925 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,015 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,104 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,210 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,315 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,399 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,529 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,664 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,753 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,956 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,045 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,142 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,252 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,317 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,377 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,451 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,559 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,638 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,724 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,885 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,976 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,047 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,128 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,228 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,298 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,386 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,467 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,542 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 二、一直在控制台打印这个,非常影响时间,怎么解决?
Windows版Mysql服务意外停止error number 23
MySQL日志如下:求帮助: 场景:查询一段很耗的sql会引起mysql服务非正常关闭(手动重启是ok的),如下异常日志,mysql需要怎么设置; mysql 配置文件: ![图片说明](https://img-ask.csdn.net/upload/201804/26/1524711838_399410.png) 2018-04-26T02:15:05.557394Z 24 [ERROR] InnoDB: Operating system error number 23 in a file operation. 2018-04-26T02:15:05.557394Z 24 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html 2018-04-26T02:15:05.572994Z 24 [ERROR] InnoDB: File .\mfg_db\sn_scan_ht.ibd: 'Windows aio' returned OS error 123. Cannot continue operation 2018-04-26T02:15:05.572994Z 24 [ERROR] InnoDB: Cannot continue operation. 2018-04-26T02:15:07.772598Z 0 [Note] InnoDB: FTS optimize thread exiting. 2018-04-26T02:16:54.819986Z 24 [Warning] InnoDB: 13 threads created by InnoDB had not exited at shutdown! 2018-04-26T02:17:11.605615Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). 2018-04-26T02:17:11.605615Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release. 2018-04-26T02:17:11.605615Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set. 2018-04-26T02:17:11.605615Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 2018-04-26T02:17:11.605615Z 0 [Note] MySQL (mysqld 5.7.17-log) starting as process 10868 ... 2018-04-26T02:17:11.621215Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2018-04-26T02:17:11.621215Z 0 [Note] InnoDB: Uses event mutexes 2018-04-26T02:17:11.621215Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier 2018-04-26T02:17:11.621215Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3 2018-04-26T02:17:11.621215Z 0 [Note] InnoDB: Number of pools: 1 2018-04-26T02:17:11.636815Z 0 [Note] InnoDB: Not using CPU crc32 instructions 2018-04-26T02:17:11.636815Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M 2018-04-26T02:17:11.652415Z 0 [Note] InnoDB: Completed initialization of buffer pool 2018-04-26T02:17:11.730415Z 0 [Note] InnoDB: Highest supported file format is Barracuda. 2018-04-26T02:17:11.746015Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 22526427804 2018-04-26T02:17:11.746015Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 22526427813 2018-04-26T02:17:11.746015Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 22526427813 2018-04-26T02:17:11.761615Z 0 [Note] InnoDB: Database was not shutdown normally! 2018-04-26T02:17:11.761615Z 0 [Note] InnoDB: Starting crash recovery. 2018-04-26T02:17:11.886416Z 0 [Note] InnoDB: Last MySQL binlog file position 0 1457173, file name master-bin.000024 2018-04-26T02:17:12.089216Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2018-04-26T02:17:12.089216Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2018-04-26T02:17:12.089216Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2018-04-26T02:17:12.104816Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB. 2018-04-26T02:17:12.104816Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2018-04-26T02:17:12.104816Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2018-04-26T02:17:12.104816Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 22526427813 2018-04-26T02:17:12.104816Z 0 [Note] InnoDB: Loading buffer pool(s) from E:\DB_Data\MySql\ib_buffer_pool 2018-04-26T02:17:12.104816Z 0 [Note] Plugin 'FEDERATED' is disabled. 2018-04-26T02:17:12.120416Z 0 [Note] Recovering after a crash using master-bin 2018-04-26T02:17:12.151616Z 0 [Note] Starting crash recovery... 2018-04-26T02:17:12.151616Z 0 [Note] Crash recovery finished. 2018-04-26T02:17:12.214016Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key 2018-04-26T02:17:12.214016Z 0 [Note] Server hostname (bind-address): '*'; port: 3306 2018-04-26T02:17:12.214016Z 0 [Note] IPv6 is available. 2018-04-26T02:17:12.214016Z 0 [Note] - '::' resolves to '::'; 2018-04-26T02:17:12.214016Z 0 [Note] Server socket created on IP: '::'. 2018-04-26T02:17:12.713217Z 0 [Note] Event Scheduler: Loaded 0 events 2018-04-26T02:17:12.713217Z 0 [Note] Executing 'SELECT * FROM INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated partition engine. You may use the startup option '--disable-partition-engine-check' to skip this check. 2018-04-26T02:17:12.713217Z 0 [Note] Beginning of list of non-natively partitioned tables 2018-04-26T02:17:12.775617Z 0 [Note] End of list of non-natively partitioned tables 2018-04-26T02:17:12.775617Z 0 [Note] MySQL: ready for connections. Version: '5.7.17-log' socket: '' port: 3306 MySQL Community Server (GPL) 2018-04-26T02:17:13.415218Z 0 [Note] InnoDB: Buffer pool(s) load completed at 180426 10:17:13
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
复习一周,京东+百度一面,不小心都拿了Offer
京东和百度一面都问了啥,面试官百般刁难,可惜我全会。
Java 14 都快来了,为什么还有这么多人固守Java 8?
从Java 9开始,Java版本的发布就让人眼花缭乱了。每隔6个月,都会冒出一个新版本出来,Java 10 , Java 11, Java 12, Java 13, 到2020年3月份,...
达摩院十大科技趋势发布:2020 非同小可!
【CSDN编者按】1月2日,阿里巴巴发布《达摩院2020十大科技趋势》,十大科技趋势分别是:人工智能从感知智能向认知智能演进;计算存储一体化突破AI算力瓶颈;工业互联网的超融合;机器间大规模协作成为可能;模块化降低芯片设计门槛;规模化生产级区块链应用将走入大众;量子计算进入攻坚期;新材料推动半导体器件革新;保护数据隐私的AI技术将加速落地;云成为IT技术创新的中心 。 新的画卷,正在徐徐展开。...
轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
首先介绍下在本文出现的几个比较重要的概念: 函数计算(Function Compute): 函数计算是一个事件驱动的服务,通过函数计算,用户无需管理服务器等运行情况,只需编写代码并上传。函数计算准备计算资源,并以弹性伸缩的方式运行用户代码,而用户只需根据实际代码运行所消耗的资源进行付费。Fun: Fun 是一个用于支持 Serverless 应用部署的工具,能帮助您便捷地管理函数计算、API ...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
Idea 中最常用的10款插件(提高开发效率),一定要学会使用!
学习使用一些插件,可以提高开发效率。对于我们开发人员很有帮助。这篇博客介绍了开发中使用的插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
立即提问