在过去的一年工作中遇到的一些问题及解决方式,如下:
--------------------------------------------------------------------------------------------------
问题1:windows下oracle 集群TNS: 无法分配内存错误,如下
TNS-12531: TNS: 无法分配内存
Sat Aug 03 13:27:20 2013
03-8月 -2013 13:27:20 * service_update * orcl2 * 0
03-8月 -2013 13:27:23 * 12531
TNS-12531: TNS: 无法分配内存
03-8月 -2013 13:27:29 * 12531
TNS-12531: TNS: 无法分配内存
Sat Aug 03 13:27:32 2013
03-8月 -2013 13:27:32 * service_update * orcl2 * 0
03-8月 -2013 13:27:40 * 12531
TNS-12531: TNS: 无法分配内存
问题1原因及解决:
修改HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\SubSystems Windows value
预设值如下:
%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,3072,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16
修改SharedSection=1024,3072,512,三个数字全部加大。
这个地方就是控制 section的内存的
--------------------------------------------------------------------------------------------------
问题2:TongWeb报错1
Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite
-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|pr
imitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)"
问题2原因及解决:
写法不规范
<natural-id >放到id后面
<discriminator column="type" type="string"/> 放在id后面
-------------------------------------------------------------------------------------------------
问题3:TongWeb报错2
An element with the identifier "sessionFactory" must appear in the document.
问题3原因及解决:
写法不兼容
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
改为:
<property name="sessionFactory" ref="sessionFactory"/>
--------------------------------------------------------------------------------------------------
问题4:
远端服务器远程桌面无法复制文件
问题4原因及解决:
启动rdpclip.exe程序
--------------------------------------------------------------------------------------------------
问题5:PL/SQL连接本机及远程数据库报错(TNS)
ORA-12154: TNS: could not resolve the connect identifier specified
问题5原因及解决:
【参考】http://xxwinnie.iteye.com/blog/599018
--------------------------------------------------------------------------------------------------
问题6:数据库乱码问题
问题6原因及解决:
修改数据库编码
【参考】http://hi.baidu.com/fengqiyunluan/item/c662ef1a40577e17e2f98608
--------------------------------------------------------------------------------------------------
问题7:Oracle 11g sys,system 密码忘记
问题7原因及解决:
【参考】http://blog.csdn.net/dqw120/article/details/6260636
--------------------------------------------------------------------------------------------------
问题8:resin访问直接跳转主页
问题8原因及解决:
doc/index.jsp 修改conf/resin.conf中将index.jsp放到前面
--------------------------------------------------------------------------------------------------
问题9:HttpClient 进行数据传输警告信息
[WARN org.apache.commons.httpclient.HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
问题9原因及解决:
//String response = method.getResponseBodyAsString().trim();
InputStream resStream = method.getResponseBodyAsStream();
BufferedReader br = new BufferedReader(new InputStreamReader(resStream));
StringBuffer resBuffer = new StringBuffer();
String resTemp = "";
while((resTemp = br.readLine()) != null){
resBuffer.append(resTemp);
}
String response = resBuffer.toString();
--------------------------------------------------------------------------------------------------
问题10:resin服务器报:META-INF/c.tld:6 unknown element `xsi:schemaLocation' in `taglib'
问题10原因及解决:
原因是resin无法解析jsp中tld
导致该结果的深层原因是
resin2.x支持JSP 1.2/Servlet 2.3
3.X支持JSP 2.0/Servlet 2.4
3.03不需要许可证
3.04开始需要许可证
--------------------------------------------------------------------------------------------------
问题11:oracle 访问非常慢,本机访问都非常慢
Fatal NI connect error 12570, connecting to:
(LOCAL=NO)
VERSION INFORMATION:
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 11.2.0.1.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 11.2.0.1.0 - Production
Time: 08-7月 -2012 21:50:07
Tracing not turned on.
Tns error struct:
ns main err code: 12570
TNS-12570: TNS: 包阅读程序失败
ns secondary err code: 12560
nt main err code: 0
nt secondary err code: 0
nt OS err code: 0
opiodr aborting process unknown ospid (4084) as a result of ORA-609
Sun Jul 08 21:50:37 2012
问题11原因及解决:
原因:\app\Administrator\diag\tnslsnr\WIN-OO3ICC8EYPV\listener\trace\listener.log文件过大,超过4G 就会出现该问题。
解决:需要查看日志文件,其中有两个:一个是alert_sdba.log、一个是listener.log,关闭tns监听服务,删除listener.log文件,重启就好了
--------------------------------------------------------------------------------------------------