----------------------------------------------------------------------------------------------------------------------------------
python调用数据库,oracle客户端报错:
ERROR in db: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory"
解决方案(将Instant Client永久添加到运行时链接路径):
sudo sh -c "echo /opt/oracle/instantclient_19_6 > /etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig
注:
ldconfig是一个动态链接库管理命令,其目的为了让动态链接库为系统所共享。
sudo是linux系统管理指令,是允许系统管理员让普通用户执行一些或者全部的root命令的一个工具
https://oracle.github.io/odpi/doc/installation.html#linux
https://www.cnblogs.com/schips/p/10183111.html
https://www.cnblogs.com/lkj371/p/12793463.html
----------------------------------------------------------------------------------------------------------------------------------
Request method 'GET' not supported(Could not find acceptable representation)
org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
我的问题:
请求某个url后报以上错误
参考解决思路:
方法不能有返回值,却有了返回值,将方法改为void即可。
if (outputValue != null) {
throw new HttpMediaTypeNotAcceptableException(this.allSupportedMediaTypes);
}
我的解决办法:
代码中有以下逻辑,response.sendRedirect 到指定页面后,方法又返回另一个指定页面,避免出现这种逻辑即可(这里将第二行return login.html去掉)
response.sendRedirect(request.getContextPath() + "/noright.html");
//return "login.html";
https://www.jianshu.com/p/bfd09b18206e
----------------------------------------------------------------------------------------------------------------------------------------------
Mybatis 使用Oracle主键自增插入报错
无效的列类型: getLong not implemented for class oracle.jdbc.driver.T4CRowidAccessor
把insert 属性里的useGeneratedKeys的属性设置为false,useGeneratedKeys 要求数据库本身具备主键自动增长的功能,mysql、sqlserver可以使用useGeneratedKeys=true ,oracle不支持useGeneratedKeys,所以ORACLE是不能使用useGeneratedKeys=true的。
Oracle 如果需要保存后返回id,
SELECT SQ_TABLE_ID.NEXTVAL as id from DUAL
insert into table (id, code) values (#{id}, #{code})
https://www.cnblogs.com/legendjslc/p/7159171.html
------------------------------------------------------------------------------------------------------------------------------------------------
Quartz2.2.3+Spring整合的问题
java.sql.SQLException: ORA-01453: SET TRANSACTION 必须是事务处理的第一个语句
1:可能你在配置文件中配置了多个数据源,解决方法:只配置一个
2:可能是由org.quartz.jobStore.txIsolationLevelSerializable设置为true的原因,将此属性设置为false
https://blog.csdn.net/zhaoyachao123/article/details/78469964
-------------------------------------------------------------------------------------------------------------------------------------------
Redis调优
1> logfile "D:/redis/logs/redis.log", 设置日志路径
2> maxmemory 10GB,最大内存设置
3> maxmemory-policy allkeys-lru,超过最大内存处理策略(最近最少使用算法,从所有的键中选择空转时间最长的键值对清除)
4> stop-writes-on-bgsave-error no,设置为no可忽略错误信息
启动redis的时候指向指定的conf文件,启用这些配置
start.bat文件如下:
@echo
d:
cd D:\tools\dev tools\redis-latest
redis-server.exe redis.windows.conf
pause
https://blog.csdn.net/gdj0001/article/details/80117797
https://blog.csdn.net/hexieshangwang/article/details/47254087
---------------------------------------------------------------------------------------------------------------------------------------------
tomcat 服务性能调优
1、设置最大线程数,增加server.xml中Connector中的属性
maxThreads="800",tomcat起动的最大线程数,即同时处理的任务个数,默认值为200
acceptCount="1000",当tomcat起动的线程数达到最大时,接受排队的请求个数,默认值为100
2、设置jvm内存
setevn.bat文件:
set JAVA_OPTS=-Xms8192m -Xmx8192m -Xss1024K -XX:PermSize=512m -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit
rem set JAVA_OPTS=-Xms4096m -Xmx4096m -Xss1024K -XX:MetaspaceSize=512m -XX:MaxMetaspaceSize=1024m -XX:-UseGCOverheadLimit
https://www.cnblogs.com/jpfss/p/11015976.html
https://blog.csdn.net/JustinQin/article/details/79530038
-----------------------------------------------------------------------------------------------------------------------------------------------
java web项目,post请求发送数据太大的处理方法
可以设置tomcat,server.xml中Connector中的属性,maxPostSize的值。tomcat默认是2M,单位为字节。maxPostSize=”0”则表示不限制大小。maxPostSize="5120000"
https://blog.csdn.net/menghuanzhiming/article/details/78127389
-------------------------------------------------------------------------------------------------------------------------------------------------
oracle11g 本地服务无法访问
修改pfile配置
D:\develop\oracle\admin\orcl\pfile\init.ora.912018124822
找到local_listener,然后将它的值换掉(原始值叫LISTENER_ORCL),换成你tnsnames.ora中的ADDRESS_LIST
原配置:#local_listener=LISTENER_ORCL
修改后:local_listener="(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))"
执行命令:
1、sqlplus /nolog
2、conn sys/sysdb as sysdba
3、startup pfile='D:\develop\oracle\admin\orcl\pfile\init.ora.912018124822'
https://blog.csdn.net/xb12369/article/details/26720275
------------------------------------------------------------------------------------------------------------------------------------------------
bootstrap中使用modal加载kindeditor时弹出层文本框不能输入的问题
https://blog.csdn.net/aaa333qwe/article/details/72865388
//解决编辑器弹出层文本框不能输入的问题
$('#transeModal').off('shown.bs.modal').on('shown.bs.modal', function (e) {
$(document).off('focusin.modal');//解决编辑器弹出层文本框不能输入的问题
});
-----------------------------------------------------------------------------------------------------------------------------------------------
css,js 打包添加版本号,解决前端页面样式缓存问题
https://blog.csdn.net/u013218443/article/details/85165800
-----------------------------------------------------------------------------------------------------------------------------------------------
oracle 无法从套接字读取更多的数据:
数据库服务器上用sys账户登录后输入:alter session set “_optimizer_join_elimination_enabled”=false;
然后后重启数据库:
shutdown immediate;
startup;
然后重启监听:
lsnrctl
stop
start
https://blog.csdn.net/xydds/article/details/8859224
https://blog.csdn.net/sinat_33517300/article/details/78968181
https://lucklysmile-gmail-com.iteye.com/blog/2023993