java的常见问题及解决方法.doc
文本预览下载声明
1.mons.collections.SequencedHashMaps signer information does not match signer information of other classes in the same package 这是由于struts提供的commons-beanutils.jar和 hibernate提供的commons-collections.jar冲突成的, 可以从spring提供的lib中找到这个两个jar
2.java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.IdentNode
用hql 时,忘了给表名加别名,如select p from Position,应该是select p from Position p
3.The Server didn t send back a proper XML response用FCKEditor时
原因:解析不了xml文件解决方法:
情况一:web.xml的配置是否正确,具体查看《FCKEditor使用指南.pdf》,还有fckeditor自带的几个jar包情况二:加入serializer.jar,xalan.jar情况三:把项目下的fckeditor包删了,重新加入一遍
4.org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)]SWTError:没有更多的处理[未知Mozilla的路径(MOZILLA_FIVE_HOME未设置)]
环境:linux下运行swt程序(我出现此问题是,在linux下嵌套浏览器)原因:firefox版本不一致解决:重装一个firefox,并设置相关变量
5.Exception in thread main org.eclipse.swt.SWTError: No more handles [Could not detect registered XULRunner to use]环境:用XULRunner 在java application中嵌套浏览器原因:没有注册XULRunner解决:window下环境中,在程序中加入,如(第二个参数是下载解压后的存放路径):?? static{???? System.setProperty(org.eclipse.swt.browser.XULRunnerPath, C:\\xulrunner); ?? }
6.Exception in thread main java.lang.UnsatisfiedLinkError: no swt-win32-3536 or swt-win32 in swt.library.path, java.library.path or the jar file环境:用DJ Natvie Swing时,在java application中嵌套浏览器,且在windows环境下运行正常,?? 但在linux下却包此异常原因:windows下与linux下使用的swt jar包不一样解决:在windows下用swt-3.5M6-win32-win32-x86.jar,在linux下用swt-3.5.1-gtk-linux-x86.jar
7.Exception in thread main .ProtocolException:cannot write to a URLConnection if doOutput=false - call setDoOutput(true)
环境: 用URLConnection送某url发送数据时原因: doOutput=false时,不能发送数据解决: 如 urlConnection.setDoOutput(true)
8...SocketException: Connection resetat .SocketInputStream.read(SocketInputStream.java:168)at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)at java.io.InputStreamReader.read(
显示全部