WebSphere 异常问题记录
java.lang.IllegalAccessError: Class com/mysql/jdbc/NonRegisteringDriver illegally accessing “protected” member of class com/mysql/jdbc/ConnectionImpl
解决:确认jar包存在;可能为Jar包版本;
猜测或者为was bug: JDBC provides新建后,修改一下才会生效,否则报错如上(NonRegisteringDriver);而且,新建Data source时指定了jdbc provide,则以当时jdbc provide的配置为准,后面对jdbc provide的修改,不会影响到已新建的Data source(重启生效)
java.sql.SQLRecoverableException: Communications link failure Last packet sent to the server was 0 ms ago.
解决:确认jar包存在;检查数据库连接URL;
可能为mysql JDBC jar包版本问题,修改jar包;
javax.naming.NameNotFoundException: Context: DefaultCell01/nodes/DefaultNode01/servers/server1, name: comp/env/local_container: First component in name comp/env/local_container not found.
解决:不使用jndi的域,直接保持数据源名一致(不使用java:/com/env/xxx)
https://veryls.iteye.com/blog/1841525
eg:
Spring-ds.xml:配置jndiName = jdbc/local_jndi
Websphere:配置jndiName = jdbc/local_jndi
java.security.NoSuchAlgorithmException: sunX509 KeyManagerFactory not available
解决:WebSphere不支持SunX509,只有ibmX509
https://issues.apache.org/jira/browse/ZOOKEEPER-2429
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(“sunX509”);
修改为:
String defaultAlgorithm = KeyManagerFactory.getDefaultAlgorithm();
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(defaultAlgorithm);
javax.net.ssl.SSLException: Received fatal alert: protocol_version
解决:代码实现替换版本
https://developer.ibm.com/answers/questions/206952/how-do-i-configure-websphere-application-server-ss.html
https://jazz.net/forum/questions/219184/error-javaxnetsslsslexception-received-fatal-alert-protocol_version-starting-rqm-command-line-adapter-with-java-18
https://stackoverflow.com/questions/38398265/kubernetes-fatal-alert-protocol-version-error-when-creating-a-deployment
https://developer.ibm.com/recipes/tutorials/configuring-tlsv1-2-for-websphere-application-servers-8-5-5/
确认接口的ssl版本
curl -k --tlsv1.2 https://10.8.6.37:6443
curl -k --tlsv1.0 https://10.8.6.37:6443
openssl s_client -connect 10.8.6.37:9443 -tls1_2
java.lang.OutOfMemoryError: Java 堆空间
解决:设置JVM参数
Servers > Server Types(WebSphere application servers) > server1 >
Configuration > Server Infrastructure > Java and Process Management(Process definition) >
Additional Properties > Java Virtual Machine
端口冲突
解决:
server1 > Ports
Environment > Virtual hosts
java.lang.NoSuchMethodError: javax/persistence/JoinColumn.foreignKey()Ljavax/persistence/ForeignKey;
java.lang.NoSuchMethodError: javax/persistence/Table.indexs();
解决:由于was8默认使用jpa2.0,而项目使用jpa2.1,导致冲突。一般为jar包冲突
Enterprise Applications > afa-console_war > Manage Modules > afa-console.war > Class loader order(parent last)
https://stackoverflow.com/questions/29476026/deploying-application-using-hibernate-jpa-2-1-to-ibm-websphere-gives-nullpointer/29476578
https://stackoverflow.com/questions/28062271/java-lang-nosuchmethoderror-javax-persistence-joincolumn-foreignkeyljavax-per
Was9 Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not a subtype
解决:包冲突问题
https://developer.ibm.com/answers/questions/439545/websphere-9-startup-problem/
If applications are not using CDI, disabling CDI should help.
application server > Server Infrastructure > Java and process management(Process definition) > Additional Properties(Java virtual machine) > Additional Properties(Custom properties)
Add this custom property with value false
Name = com.ibm.ws.cdi.enableCDI
Value = false
javax.xml.parsers.SAXParserFactory: org.apache.xerces.jaxp.SAXParserFactoryImpl not a subtype
javax.xml.parsers.DocumentBuilderFactory: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not a subtype
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl incompatible with javax.xml.parsers.SAXParserFactory(不兼容)
解决:包冲突问题,移除项目中xml相关的jar包
开启verbose class loading,查看类加载的路径(Servers > Server Types(WebSphere application servers) > server1 > Configuration > Server Infrastructure > Java and Process Management(Process definition) > Additional Properties > Java Virtual Machine > Verbose class loading)
移除xercesImpl-xx.jar 、 xml-apis-xx.jar、xmlParserAPIs-xx.jar、stax-api-xx.jar、woodstox-core-als-xx.jar、woodstox-core-xx.jar
https://stackoverflow.com/questions/19585014/was-8-5-java-lang-classcastexception-org-apache-xerces-jaxp-saxparserfactoryim
https://stackoverflow.com/questions/54106531/javax-xml-parsers-documentbuilderfactory-could-not-be-instantiated-in-websphere
Enterprise Applications > afa-console_war > Manage Modules > afa-console.war > Class loader order(Classes loaded with parent class loader first)
feature is not implemented PreparedStatement.setBinaryStream. WSJdbcPreparedStatement.java db2 ERRORCODE=-4499, SQLSTATE=08001
解决:驱动包版本问题,更改驱动包(JDBC3.0 -> JDBC4.0)
目前使用方案:删掉was自带的 db2jcc.jar(JDBC3.0),数据源配置 db2jcc4.jar(JDBC4.0)
http://www.notonlyanecmplace.com/feature-is-not-implemented-preparedstatement-setbinarystream/
https://www.ibm.com/support/pages/connection-refused-db2-errorcode-4499-during-server-setup
https://blog.csdn.net/xiaoyu714543065/article/details/52775218
https://developer.ibm.com/answers/questions/190002/what-causes-this-exception-when-connecting-to-webs/
https://www.ibm.com/support/pages/troubleshooting-enterprise-applications-websphere-application-server-which-simultaneously-use-jdbc-providers-jdbc-30-and-40-specification-levels
java.sql.SQLNonTransientException: [jcc][t4][10205][11234][4.14.113] Null userid is not supported.
解决:点击数据源名打开详情页,进入JAAS-J2CC认证数据配置(配置JAAS)
Could not obtain WebSphere TransactionManager
java.lang.ClassCastException: com.ibm.ws.tx.jta.TranManagerSet incompatible with javax.transaction.TransactionManager
解决:未知
com.ibm.db2.jcc.am.SqlException: [jcc][t4][10199][10462][4.14.113] Required character converter is not available. ERRORCODE=-4220, SQLSTATE=null
at com.ibm.db2.jcc.am.ed.a(ed.java:661) ~[db2jcc-db2jcc4.jar:na]...at org.hibernate.loader.Loader.doList(Loader.java:2554) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]... 72 common frames omitted
解决:更新jdbc驱动包。对应数据库版本。
目前方案:去掉项目的jar包(db2jcc-db2jcc4.jar),则默认使用was自带的 db2jcc4.jar
https://www.ibm.com/support/pages/db2-jdbc-driver-versions-and-downloads
com.ibm.db2.jcc.am.SqlDataException: [jcc][t4][10275][10041][4.14.113] Unsupported ccsid, encoding, or locale: “Cp1386”. ERRORCODE=-4220, SQLSTATE=22021
at com.ibm.db2.jcc.am.ed.a(ed.java:669) ~[db2jcc4.jar:na]at com.ibm.db2.jcc.am.ed.a(ed.java:60) ~[db2jcc4.jar:na]... 71 common frames omitted
Caused by: java.io.UnsupportedEncodingException: GBK
at sun.io.Converters.getConverterClass(Converters.java:319) ~[jacl.jar:na]
at com.ibm.db2.jcc.am.Agent.getByteToCharConverter(Agent.java:463) ~[db2jcc4.jar:na]
… 93 common frames omitted
解决:
https://developer.ibm.com/answers/questions/439579/unsupported-ccsid-encoding-or-locale-cp037-errorco.html?smartspace=decision-optimization
com.ibm.ws.webcontainer.webapp.WebApp initializeStaticFileHandler SRVE0278E: Error while adding servlet mapping --> /*.
解决:未知
https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.5/com.ibm.websphere.nd.multiplatform.doc/ae/tweb_jspengine.html
https://stackoverflow.com/questions/41773355/webapp-srve0278e-error-while-adding-servlet-mapping
https://www-01.ibm.com/support/docview.wss?uid=swg1PI34990
使用DB2数据库,频繁锁超时异常,locktimeout
解决:创建锁监视器,查看锁超时语句STMT_TEXT(锁拥有者ACTIVITY_TYPE=“Past”、锁请求者ACTIVITY_TYPE=“CURRENT”)以及事务隔离级别EFFECTIVE_ISOLATION
调整超时时间(db2 update db cfg for 数据库名 using locktimeout 30)
WAS默认事务隔离级别:https://www.ibm.com/support/pages/changing-default-isolation-level-non-cmp-applications-and-describing-how-do-so-using-new-custom-property-webspheredefaultisolationlevel
DB2事务隔离级别&加锁机制:https://www.cnblogs.com/live-and-learn077/p/5462548.html
WebSphere 异常问题记录相关推荐
- java将异常输出到日志_【ThinkingInJava】25、将异常输出记录到日志
/** * 书本:<Thinking In Java> * 功能:将异常输出记录到日志中. * 文件:LoggingExceptions.java * 时间:2015年4月8日21:11: ...
- Log4Net异常日志记录在asp.net mvc3.0的应用
前言 log4net是.Net下一个非常优秀的开源日志记录组件.log4net记录日志的功能非常强大.它可以将日志分不同的等级,以不同的格式,输出到不同的媒介.本文主要是简单的介绍如何在Visual ...
- IE8下JQuery clone 出的select元素使用append添加option异常解决记录
IE8下JQuery clone 出的select元素使用append添加option异常解决记录 参考文章: (1)IE8下JQuery clone 出的select元素使用append添加opti ...
- HBase中此类异常解决记录org.apache.hadoop.ipc.RemoteException(java.io.IOException):
HBase中此类异常解决记录org.apache.hadoop.ipc.RemoteException(java.io.IOException): 参考文章: (1)HBase中此类异常解决记录org ...
- python 修饰器_python中用修饰器进行异常日志记录
当脚本中需要进行的的相同的异常操作很多的时候,可以用修饰器来简化代码.比如我需要记录抛出的异常: 在log_exception.py文件中, import functools import loggi ...
- C#错误异常日志记录到文件
当我们将网站布署到线上之后,为了实时了解网站的运行情况,如是否有错误页面.网站运行速度.是否有攻击等.那么我们就很有必要为网站加上错误与异常记录到日志文件,这样就可以随时查看网站的线上运行情况,另有一 ...
- ASP.NET Web API 异常日志记录
如果在 ASP.NET MVC 应用程序中记录异常信息,我们只需要在 Global.asax 的 Application_Error 中添加代码就可以了,比如: public class MvcApp ...
- Flink:集群异常问题记录
记录下一些相关问题,持续跟新中-- 1.stop-cluster.sh 未杀死进程解决方式 如果出现启动异常, 首先查看日志有无错误 如果没有错误查看flink进程 ps aux | grep fli ...
- 从壹开始前后端分离 [.netCore 不定期更新 ] 三十五║ 完美实现全局异常日志记录...
缘起 哈喽我是不定期更新的日常,昨天群里小伙伴问到了记录日志,当然,以前我也挖过这个坑,后来一直没有来得及填上,也想着 swagger 一直又有错误信息展示的功能,就迟迟没有添加这个功能,不过昨天夜里 ...
- All-in-One 模式安装 KubeSphere 异常问题记录
环境 腾讯云2核4g服务器 官方文档 https://kubesphere.io/zh/docs/quick-start/all-in-one-on-linux/ 安装步骤: 修改主机名(坑:名称不能 ...
最新文章
- linux_kernel下载网站
- 第一篇:数据库基本管理(mysql)
- Hadoop Install
- Linux基础学习1--档案的属性和目录
- Newtonsoft.Json(Json.Net)学习笔记
- Java多线程之单例模式在多线程环境下的安全问题
- Spring开启@Async异步方法(javaconfig配置)
- Nginx的location配置详解
- 【VS开发】使用CTabView分割多页卡窗口
- Silverlight 2 Beta 1学习资源
- 19.卷1(套接字联网API)---密钥管理套接字
- IDEA设置字体随鼠标滚动放大缩小
- 解决Mybatis报错并分析原因:Invalid bound statement (not found): com.xxx.mapper.xxx
- 纪念尼古拉·特斯拉---一个伟大却很少被普罗大众认识的科学家
- 59深度解密五十九:利用“抖音”进行吸粉的简单、另类玩法
- Android简易计算器的制作
- 为博客添加樱花飘落的效果
- 解决windows xp 局域网共享
- WPS表格打印的时候有非常多的空白页应该怎么办?
- 从网上下载资料怎样打印,网上打印资料步骤
热门文章
- Java之阻塞和非阻塞以及同步和异步的区别
- 【斯坦福大学公开课】Stanford NLP: Lesson 1 Intro
- 奥托尼克斯接近开关型号_奥托尼克斯接近开关型号如何选?
- 【Python+Stata】豪斯曼检验:固定效应or随机效应?
- 计算机毕业设计asp.net193酒店客房预订网站系统
- 微软Win8Server2012各版本安装密匙序列号
- TOM企业邮箱,为你打造企业专属邮箱
- Discuz模板安装步骤以及发生的问题
- python 模拟键盘按键错乱_python 采坑总结 调用键盘事件后导致键盘失灵的可能原因...
- 错误1311。没有找到源文件:D:\MSOCache\All Users\{90150000-0015-0804-1000-0000000FF1CE}-D\AccLR.CAB。请确认存在该文件,并且您