错误汇总及解决办法
JasonYao
从事java开发3年。熟悉WAS MQ JMS SOA
展开
-
踩坑记录:layui动态添加的radio没法赋值
首先申明一下我用的layui版本是2.4.5页面上的radio选项是动态生成的,默认生成的都是不被选中的,编辑的时候会从后台拿到选中的记录ID通过form.val方法赋值最后调用 form.render(‘radio’) 重新渲染。发现始终都选不上,最后发现后台传输给前台的json数据里字段类型是int类型的,int类型的赋值layui不工作,所以始终就勾选不上。解决办法调用form.val方法的时候,传入的参数加一个.toString()方法转换成string类型的就行了。...原创 2020-10-23 00:42:02 · 1453 阅读 · 0 评论 -
SpringMVC 配置url pattern为 /* 之后返回的modelandview也会被拦截
原始配置如下: springmvc org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:springmvc-config.xml 1 springmvc /* 修改成城如下就不会有问题了:原创 2014-11-04 00:07:16 · 2073 阅读 · 0 评论 -
Nginx 的启动、停止、平滑重启、信号控制和平滑升级
Nginx 的启动、停止、平滑重启、信号控制和平滑升级博客分类: NginxNginx ● Nginx 的启动 假设 nginx 安装在 /usr/local/nginx 目录中,那么启动 nginx 的命令就是: Command代码 [root@localhost ~]# /usr/local/nginx/转载 2014-08-13 22:29:01 · 820 阅读 · 0 评论 -
My oracle certificate
原创 2014-09-04 22:52:15 · 729 阅读 · 0 评论 -
Eclipse 解决项目间循环依赖的错误
On the Eclipse IDE screen, click Window tab and then click Preferences propertyIt will shows another windowOn the left site of the widow原创 2014-08-05 20:54:23 · 1209 阅读 · 0 评论 -
How to deploy maven project to tomcat inside your eclipse
1. After you created your maven project, you should convert it to dynamic web project:ri原创 2014-05-29 21:02:45 · 665 阅读 · 0 评论 -
java中的AES 256算法遇到 Illegal key size or default parameters错的解决办法
报错堆栈如下:Caused by: java.security.InvalidKeyException: Illegal key size or default parameters at javax.crypto.Cipher.a(DashoA13*..) ~[na:1.6] at javax.crypto.Cipher.a(DashoA13*..) ~[na:1.6]原创 2012-04-13 16:07:08 · 18040 阅读 · 5 评论 -
MAC 环境下mysql编码设置
The mysql will first to find the configuration file from /etc/my.cnfso first copy the sample configuration file to the filer /etc/use below command to do this:sudo cp /usr/local/mysql/support-原创 2014-04-30 21:24:01 · 1024 阅读 · 0 评论 -
使用URLConnection报302 response code
需求:项目中有发邮件的功能,邮件内容固定,然后就配置成一个静态的html文件,https环境,使用URLConnection访问此页面取得邮件内容模板。问题:使用过程中报302错误。解决方案:private static URLConnection reload(URLConnection uc) throws Exception {原创 2014-03-05 19:43:45 · 7437 阅读 · 0 评论 -
dpkg: error: dpkg status database is locked by another process
报错信息如下:dpkg: error: dpkg status database is locked by another process解决办法如下:sudo rm /var/lib/dpkg/locksudo dpkg --configure -a转载 2014-02-14 21:31:33 · 12451 阅读 · 0 评论 -
SQL Developer error: ORA-00904: "ORA_ROWSCN": invalid identifier
SQL Developer error, the version of SQL Developer is 4.0.3.You can disable the ORA_ROWSCN check via below steps:1. Click "Tool" menu and then click the "Preferences..." 2. Expand "Database" and原创 2015-03-04 10:45:38 · 2324 阅读 · 0 评论 -
[Xcode] The iPhone simulator do not have home button
By default, there is no home key inside the simulator. So we cannot close the application and go to the home screen.There is another way to implement this action. Use below group keys: shift + command原创 2015-11-22 20:53:25 · 801 阅读 · 0 评论 -
[Xcode] adjust the iphone simulator size
Default the size is too large, cannot see the whole screen of the iphone.How to fix: Go the Simulator window, Click the Window->Scale->Choose 50%.(Default is 100%) .原创 2015-11-22 20:48:05 · 493 阅读 · 0 评论 -
Springboot2集成Quartz异步执行不生效
写了好几个task,我期望各个类里的task可以异步执行的,所以在类上加入了@EnableAsync注解,然而实际测试出来并没有效果,这个注解是需要加在启动类上的。加在task类上的应该是@AsyncSpringboot2集成Quartz异步执行步骤pom引入依赖:<dependency> <groupId>org.springframework.boot<...原创 2019-02-01 00:28:53 · 3599 阅读 · 12 评论 -
MySQL报错error near where not exists
5.6版本和5.7版本的写法不一样,高版本的不能到低版本执行。5.7 版本INSERT INTO USER (name, email) SELECT 'John', 'john@mmm.com' WHERE NOT EXISTS (SELECT id FROM USER WHERE email = 'john@mmm.com');5.6版本INSERT I...原创 2018-11-29 16:19:47 · 1874 阅读 · 0 评论 -
用spring反射的时候用e.getMessage得到的是null
现有系统里面用了很多类似如下的打印log的方式:try {} catch (Exception e) {logger.error(e.getMessage());}但事实上spring反射调用的时候如果代码中有异常抛出的话是InvocationTagetException类型,而这个类型并没有覆写getMessage()方法,所以现在系统中的log打出来是信息是null,返回null的话...原创 2018-11-23 17:45:19 · 1033 阅读 · 1 评论 -
使用nginx后让tomcat的localhost_access_log获得真实IP
配置nginx在location节点下面加入如下代码proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header REMOTE-HOST $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;修原创 2016-09-11 15:52:41 · 4784 阅读 · 0 评论 -
java.security.ProviderException: java.security.KeyException
问题描述在centos系统上用openjdk1.7, 用https请求微信api,报错如下Caused by: java.security.ProviderException: java.security.KeyException at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:146原创 2016-07-05 13:02:02 · 7990 阅读 · 3 评论 -
Python module “cx_Oracle” module could not be found
The detail error message show below:ImportError: DLL load failed: The specified module could not be found.Solution (for windows OS)Download the oracle client from Oracle ClientExtract the zip file an原创 2016-02-25 10:14:46 · 1694 阅读 · 0 评论 -
mvn spring-boot:run 启动的应用有中文乱码的解决办法
参考如下pom.xml的配置文件加入jvm启动参数。<jvmArguments>-Dfile.encoding=UTF-8</jvmArguments> <build> <finalName>AutoEngine</finalName> <plugins> <plugin> &a原创 2016-01-18 09:06:32 · 19735 阅读 · 0 评论 -
Eclipse 项目中的包路径变成文件夹目录形式了
问题:导入了一个项目,却发现包路径变成文件夹目录的形式了解决办法:右点击项目,然后点击Properties,在弹出的窗口中选择Java Build Path,然后选择Source tab, 展开找到Excluded。正常情况下应该是None,现在发现是 ××,所以需要修改它:点击Finish 然后点击OK button,在查看项目就会发现文件夹形式又变回包的原创 2015-12-28 10:25:40 · 43570 阅读 · 16 评论 -
[UIWebView Error]App Transport Security has blocked a cleartext
The detailed error stack show below:App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist fi原创 2015-12-10 20:41:42 · 105 阅读 · 0 评论 -
java 下载文件解决文件名乱码问题
String fileName = "2014毕设.xls";fileName = new String(fileName.getBytes("GBK"),"ISO8859_1"); response.setHeader("Content-Disposition", "attachment;filename=" + fileName);原创 2014-02-26 20:08:11 · 1332 阅读 · 0 评论 -
【备忘】Ubuntu安装卸载qq(version number does not start with digit)
错误描述:dpkg:处理 ~/linuxqq_v1.0.2-beta1_i386.deb (–install)时出错:parsing file ‘/var/lib/dpkg/tmp.ci/control’ near line 7 package ‘linuxqq’:版本字符串 v1.0.2-beta1 中有错误: version number does not st转载 2014-02-13 20:55:29 · 1340 阅读 · 0 评论 -
执行java.io.ByteArrayOutputStream.write 方法内存突然加大的原因与解决办法
转载请注明出处问题描述:在项目中用有个上传功能,会把文件转换成inputstream然后转换成byte[] 数组转换代码如下:public static byte[] convertstream(InputStream inStream) throws IOException { ByteArrayOutputStream swapStream = new ByteAr原创 2012-04-01 09:31:37 · 10503 阅读 · 1 评论 -
WAS 中配置JMS Queue的注意事项
WAS 中配置JMS有关Message Format(MQSTR,MQHRF2)的注意事项登录WAS控制台,进入配置Queue 信息的主界面在右边可以看到高级属性 的配置选项点击 高级属性,进入高级属性配置页面,里面有一个选项(将RFH V2 头附加到发送至此目标的消息),如下图所示如果勾上这个选项,那么用这个Queue 发出到 MQ Server 的消息会自动加上原创 2011-12-29 09:11:19 · 2689 阅读 · 0 评论 -
Eclipse 指定不同的workspace
右点击Eclipse快捷键,然后点击属性, 把目标(target)内容修改如下:"这里填你Eclipse.exe 程序的目录" -data "这里填你workspace的目录,注意不能有空格目录" -showlocation以后点击快捷就会自动加载你设置的workspace原创 2011-12-29 09:08:49 · 1434 阅读 · 4 评论 -
JBOSS 下的web应用中用system.out.println不生效,不显示到控制台
问题原因:自己的应用程序中采用了log4j 记录日志, 而JBOSS 的日志也是通过log4j来实现的,,所以两者有冲突解决办法:参见下面的主题:http://community.jboss.org/message/635446#635446只要在jboss-server.xml 中的log4j 节点下增加一个属性就可以了: false原创 2011-11-08 11:27:33 · 3619 阅读 · 0 评论 -
How to know the port which process is using
On windows OS:use cmd : netstat -aon|findstr 'the port number'it will show the process id.原创 2011-11-28 16:47:39 · 107 阅读 · 0 评论 -
Eclipse 中如何解决项目之间循环依赖的错误
On the Eclipse IDE screen, click Window tab and then click Preferences propertyIt will shows another windowOn the left site of the widow原创 2011-10-10 14:46:22 · 6513 阅读 · 2 评论 -
JMSWMQ2008, JMSCMQ0001,compcode '2' reason '2085'
具体堆栈信息如下:com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSWMQ2008: Failed to open MQ queue 'Queue Name'. JMS attempted t原创 2011-08-29 15:02:14 · 9135 阅读 · 4 评论 -
Websphere MQ 报错 JMSWMQ2010
报错堆栈信息如下:com.cs.soa.excp.CSSOAException: com.ibm.msg.client.jms.DetailedInvalidDestinationException: JMSWMQ2010: The destination for NPMCL原创 2011-08-15 15:46:59 · 2639 阅读 · 0 评论 -
JMS 接收 IBM Websphere MQ 消息报错 :JMSCC0065
具体堆栈报错信息如下:com.ibm.msg.client.jms.DetailedMessageEOFException: JMSCC0065: 试图在消息结束后读消息。 试图在消息结束后读消息。如果应用程序已编写为使用 JMS 1.0.2 规范来读可变长度数据,那么这可能原创 2011-08-09 13:01:39 · 17679 阅读 · 5 评论 -
log4j 版本冲突 log4j-1.2.6.jar 和 log4j-1.2.15.jar
<br />两个系统,用的不同的log4j的包,结果放在一起部署,较新的包会去找旧版本的类的方法,包方法找不到。<br />较新的包Logger 有个trace的方法,而旧版本的却没有。<br />然后统一用了较新版本的 : log4j-1.2.15.jar原创 2011-05-06 17:00:00 · 3367 阅读 · 0 评论 -
IBMJCE AND SunJCE(javax.crypto.BadPaddingException:Given final block not properly padded)
问题描述:项目中要用到和SFTP进行连接上传文件,用户名密码IP什么的要配置在WAS服务器里面,出于安全性考虑,需要把这些连接的必要信息用AES-256进行加密,加密自己写了一个桌面工具,把加密过后的信息放到WAS配置文件里面,但是问题来了,在应用程序运行过程中,并没有成功的解密,报错如下:javax.crypto.BadPaddingException:Given final原创 2012-05-29 10:24:57 · 5334 阅读 · 3 评论 -
Eclipse 上的JBOSS 怎么提供IP访问方式?
Usually we use localhost to access the system which is deployed on JBOSS AS Server.But if someone in the remote machine want to access your system the default JBOSS configuration is not supported.原创 2012-07-05 13:58:00 · 1090 阅读 · 1 评论 -
SpringMVC+Spring3.2+Hibernate4.2 @Transactional 事务不成功原因
研究N久,发现是springMVC的配置文件和Spring的配置文件内容有冲突,在配置扫描包的时候,springMVC配置到具体controller的包路径就好。原来配置的太粗粒度了。两个配置文件都是扫描com包路径下了。结果spring下的service层和dao层就不起作用了。原创 2013-10-21 19:57:25 · 1893 阅读 · 1 评论 -
Hibernate4报错java.lang.NullPointException, JdbcServiceImpl.configure(JdbcServiceImpl.java:207)
报错堆栈如下:Caused by: java.lang.NullPointExceptionat org.hibernate.engine.jdbs.internal.JdbcServiceImpl.configure(JdbcServiceImpl.java:207)at org.hibernate.service.internal.StandardServiceRegistryIm原创 2013-12-05 19:27:07 · 1201 阅读 · 0 评论 -
AJAX 缓存请求结果的问题
发现AJAX 请求同一个url的时候,第二个请求并没有真正发到后台。遂百度 Google,发现AJAX 对于相同的URL, 会缓存第一次执行的结果,所以接下来页面怎么刷新都不会真正发请求到后台,会一直用第一次的缓存结果。如果想解决此现象有两种办法:1. 相同url请求后面额外加上一个参数,该参数的值就取随机数保证每次url都不同。2. 在后台返回的时候,response做如下操作:原创 2013-08-05 21:59:42 · 914 阅读 · 0 评论 -
Log4j 怎么打出错误堆栈而不是一条错误message
使用logger.error(e) 这个方法相当于打出了 e.toString() 的内容。想要打出具体堆栈的信息,定位到具体哪边抛出错误的话可以使用logger.error('Some String such as 'Exception occurred'', e)原创 2013-07-01 22:58:00 · 2106 阅读 · 0 评论