<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    2010年11月25日

    在IBM的JDK環(huán)境下進(jìn)行JVM內(nèi)存監(jiān)控的問題

    錯誤信息如下:
    java.lang.NoClassDefFoundError: sun.management.ManagementFactory

    處理:

    sun.management.ManagementFactory替換成java.lang.management.ManagementFactory  

    因?yàn)?/span>ibmjdk沒有sun.management.ManagementFactory這個對象

    posted @ 2010-11-25 12:01 JGAO編程隨筆 閱讀(561) | 評論 (0)編輯 收藏

    oracel PreparedStatement的setString問題

    錯誤信息如下:

    超過最大長度限制

    處理:

    只能插入666個中文字符。


    或者更新到最新的
    oracle驅(qū)動包

    posted @ 2010-11-25 12:00 JGAO編程隨筆 閱讀(265) | 評論 (0)編輯 收藏

    servicemix部署到websphere中,需注意的問題

    1derby.jar包可能沖突,需刪除項(xiàng)目中的該包

    2MBean調(diào)用問題

       Websphere的MBean注冊路徑包括cell,nodeName和processName,具體可以銅鼓jconsole連接來查看MBean注冊的全路徑。這三個值可以通過Websphere的com.ibm.websphere.management.AdminServiceFactory這個對象來獲取,spring中的配置如下:
    <!-- 用于獲取websphereMBean名稱的cell,node,process -->

    <bean id="adminService" class="com.ibm.websphere.management.AdminServiceFactory" factory-method="getAdminService"/>

    <bean id="adminService.cellName" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>

    <bean id="adminService.nodeName" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>

    <bean id="adminService.processName" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/>

    <bean id="websphereNamingStrategy" class="com.des.engine.mbean.WebsphereNamingStrategy">

    <property name="cellName" ref="adminService.cellName"/>

    <property name="nodeName" ref="adminService.nodeName"/>

    <property name="processName" ref="adminService.processName"/>

    </bean>

    WebsphereNamingStrategy為自己創(chuàng)建的對象就包括那三個屬性

    3:安全問題

    出現(xiàn)如下錯誤,Caused by: javax.management.JMRuntimeException: ADMN0022E: 由于憑證不足或憑證為空,無法對 org.apache.servicemix:Name=ServiceMgtImpl,cell=dvpbNode02Cell,Type=SystemService,ContainerName=ServiceMix,node=dvpbNode02,process=server1 MBean  retrieveServiceList 操作進(jìn)行訪問。

        該問題是因?yàn)樵O(shè)置了安全控制,把控制臺的【安全性->安全管理、應(yīng)用程序和基礎(chǔ)結(jié)構(gòu)】里面的所以安全配置都去掉,然后重新啟動服務(wù)器主機(jī)(注意是重啟主機(jī),不然安全設(shè)置不起作用),再啟動websphere服務(wù)應(yīng)該就可以了,還有就是servicemix的應(yīng)用要跟websphere一起啟動,不要等websphere啟動后再到控制臺啟動

    posted @ 2010-11-25 11:58 JGAO編程隨筆 閱讀(888) | 評論 (2)編輯 收藏

    2009年6月23日

    ResultSet內(nèi)存溢出OutOfMemory問題

    錯誤信息如下:

    jdbc在操作oracle海量數(shù)據(jù)的時候用ResultSet獲取所有的返回數(shù)據(jù)出現(xiàn)內(nèi)存溢出

    處理:
    出錯的原因是ResultSet用的是可滾動結(jié)果集,正常情況下ResultSet是指針指向數(shù)據(jù)庫的數(shù)據(jù),本身是不存儲數(shù)據(jù)庫的數(shù)據(jù)的,默認(rèn)情況下就算是提交的sql能查詢處上億條的數(shù)據(jù)也是不消耗內(nèi)存的,但是如果用的是可滾動結(jié)果集的ResultSet情況就不一樣了,ORACLE 是不支持可滾動結(jié)果集的,那么我們用JDBC得到一個可滾動的結(jié)果集就是由JDBC自己支持的,也就是說結(jié)果集是要存放在內(nèi)存中的,所以在海量數(shù)據(jù)的情況下也就是要消耗大量內(nèi)存的,因此造成內(nèi)存溢出也就是正常的了,所以如果是海量數(shù)據(jù)的話就不要用可滾動結(jié)果集就可以了。

    posted @ 2009-06-23 21:19 JGAO編程隨筆 閱讀(2106) | 評論 (0)編輯 收藏

    com.ibm.websphere.ce.cm.StaleConnectionException: [ibm][db2][jcc][t4][2030][11211] 檢測到了通信錯誤

    錯誤信息如下:

    com.ibm.websphere.ce.cm.StaleConnectionException: [ibm][db2][jcc][t4][2030][11211]

    檢測到了通信錯誤。所使用的通信協(xié)議:TCP/IP"n所使用的通信 APISOCKETS

    檢測到錯誤的位置:Reply.fill()"n用于檢測錯誤的通信功能:InputStream.read()

    特定于協(xié)議的錯誤代碼數(shù)據(jù)不足、 0。消息:null"n   

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)"n     

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)"n    at

    sun.reflect.DelegatingConstructorAccessorImpl.newInstance

    (DelegatingConstructorAccessorImpl.java:45)"n

    at java.lang.reflect.Constructor.newInstance(Constructor.java:522)"n  

    at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper

    (GenericDataStoreHelper.java:523)"n   

    at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:578)"n      

    at com.ibm.ws.rsadapter.jdbc.WSJdbcUtil.mapException(WSJdbcUtil.java:909)"n 

    at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeQuery(WSJdbcStatement.java:898)"n   

    at com.newland.bi.util.db.DBUtil.executeQuery(Unknown Source)"n

    at com.newland.bi.util.db.DBUtil.executeSql(Unknown Source)"n     

    at com.newland.bi.dao.jdbc.DaoImpl.executeQuery(DaoImpl.java:64)"n   

    at com.newland.bi.service.report.exp.dao.ReportExpDao.getExpList(ReportExpDao.java:72)"n 

    at com.newland.bi.service.report.exp.manage.ReportExpMgt.runExport(ReportExpMgt.java:91)"n   

    at com.newland.bi.service.report.exp.servlet.ReportExp1Servlet$1.run(ReportExp1Servlet.java:97)"n      

    at java.util.TimerThread.mainLoop(Timer.java:537)"n       at java.util.TimerThread.run(Timer.java:487)"n

    處理:

    出錯的原因可能是防火墻問題,websphere應(yīng)用服務(wù)器和數(shù)據(jù)庫服務(wù)器之間是否存在防火墻

    防火墻是否會設(shè)置多久沒活動的連接就自動斷開掉,如果是這樣的話就會有問題,因?yàn)?/span>websphere上面的數(shù)據(jù)庫連接池可能有一段時間沒連接而被防火墻斷掉了

    但對于連接池本身根本就不知道該連接是否還可用,所以web應(yīng)用從連接池獲取的連接可能就是已經(jīng)斷開的了,所以就可能會出現(xiàn)日記中的錯誤問題


     

    posted @ 2009-06-23 21:14 JGAO編程隨筆 閱讀(7420) | 評論 (1)編輯 收藏

    Timer.schedule和Timer.scheduleAtFixedRate的區(qū)別

    schedulescheduleAtFixedRate的區(qū)別在于,如果指定開始執(zhí)行的時間在當(dāng)前系統(tǒng)運(yùn)行時間之前,scheduleAtFixedRate會把已經(jīng)過去的時間也作為周期執(zhí)行,而schedule不會把過去的時間算上。

    posted @ 2009-06-23 21:13 JGAO編程隨筆 閱讀(1000) | 評論 (0)編輯 收藏

    cxf找不到類org.apache.axis.soap.MessageFactoryImpl出錯

     

    錯誤信息如下:

    Caused by: java.lang.ClassNotFoundException: org.apache.axis.soap.MessageFactoryImpl

        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

        at javax.xml.soap.MessageFactory.newInstance(MessageFactory.java:50)

        ... 10 more

    處理:

    原因是調(diào)用了axis soap.MessageFactoryImpl,cxf應(yīng)該用的是sun
         在注冊安全攔截器之前執(zhí)行下面代碼就可以了

    System.setProperty("javax.xml.soap.MessageFactory", "com.sun.xml.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl");

    posted @ 2009-06-23 21:10 JGAO編程隨筆 閱讀(1275) | 評論 (0)編輯 收藏

    2008年11月23日

    瀏覽器下載txt文件問題

    我們寫程序的時候可能會想用open或者<a>來下載一個txt文件,但我們會發(fā)現(xiàn)我們用瀏覽器下載這個txt文件的時候老是在瀏覽器里面直接打開了,而不是提示下載,這樣的話如果txt文件的內(nèi)容非常多的話肯定是不行的,可能就會導(dǎo)致瀏覽器掛掉,客戶機(jī)器死機(jī)的問題
    現(xiàn)整理了個解決辦法,代碼如下:

    1.下載頁面
    open(action執(zhí)行頁面,'iframeName','');
    2.action執(zhí)行頁面
    <id="tempB" style="display:none" href="#" onclick="">&nbsp;</a>
    <iframe width=0 height=0 id="hideIframe" name="hideIframe"></iframe>
    <script>
        
    var n=0;
        
    function go(url){
            
            n
    ==0?new function()
            
    {
                frames(
    "hideIframe").location=url,n=1
            }
    :null;
            
            document.all(
    "hideIframe").readyState!="complete"?setTimeout(go,10):so();
            
            
    function so()
            
    {
                frames(
    "hideIframe").document.execCommand("SaveAs"),n=0
            }
    ;
        }

        
        
    var tempB = document.getElementById("tempB");
        
    <%
            
    if(path.toLowerCase().indexOf(".txt")>=0){
        
    %>
        tempB.attachEvent('onclick',
    function(){go('<%=request.getContextPath()+"/tempfile/1.txt">');});
        
    <%
            }
    else{
        
    %>
        tempB.attachEvent('onclick',
    function(){open('<%=request.getContextPath()+"/tempfile/1.xls">','','');});
        
    <%
            }

        
    %>
        tempB.click();
    </script>


    posted @ 2008-11-23 19:28 JGAO編程隨筆 閱讀(752) | 評論 (0)編輯 收藏

    2008年8月23日

    websphere部署war應(yīng)用失敗

    websphere部署war應(yīng)用失敗正常原因是web.xml的節(jié)點(diǎn)定義循序問題,或者一些空格,字符原因造成的
    可能先定義完所有的servlet后再定義所有的servlet mapping就沒問題了

    posted @ 2008-08-23 15:27 JGAO編程隨筆 閱讀(636) | 評論 (0)編輯 收藏

    2008年6月26日

    通過jsf事件轉(zhuǎn)向后的頁面中文亂碼

    那個轉(zhuǎn)向后的頁面已經(jīng)有用gb2312的編碼了
    可能原因是在java類里面調(diào)用了((HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse()).getWriter().write("");
    然后再轉(zhuǎn)向某個頁面,這樣可能導(dǎo)致編碼格式?jīng)_突,導(dǎo)致亂碼
    可以先給resonse設(shè)置下編碼格式,然后在write
    HttpServletResponse httpServletResponse = (HttpServletResponse)FacesContext.getCurrentInstance().getExternalContext().getResponse();
    httpServletResponse.setContentType("text/html; charset=gb2312");
    httpServletResponse.setCharacterEncoding("gb2312");
    httpServletResponse.getWriter().write("");
    這樣應(yīng)該就可以解決了

    posted @ 2008-06-26 23:46 JGAO編程隨筆 閱讀(587) | 評論 (0)編輯 收藏

    僅列出標(biāo)題  下一頁
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    導(dǎo)航

    統(tǒng)計

    常用鏈接

    留言簿(1)

    隨筆檔案

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲国产精品久久久久婷婷软件| 亚洲国产精品无码久久九九| 亚洲AV无码国产精品麻豆天美| 全部在线播放免费毛片| 国产高清免费的视频| 亚洲精品中文字幕无码A片老| 白白国产永久免费视频| 国产午夜亚洲精品不卡电影| 国产成人免费一区二区三区| 美女露100%胸无遮挡免费观看| 四虎精品亚洲一区二区三区| 美女露隐私全部免费直播| 在线观看亚洲成人| 国产成人久久AV免费| 麻豆亚洲av熟女国产一区二| 100000免费啪啪18免进| 亚洲人成网站999久久久综合| 国产成人啪精品视频免费网| 岛国岛国免费V片在线观看| 久久精品亚洲中文字幕无码网站 | 四虎影视在线看免费观看| 亚洲另类激情专区小说图片| 最近更新免费中文字幕大全| 亚洲嫩草影院在线观看| 日本免费v片一二三区| www免费黄色网| 久久久无码精品亚洲日韩京东传媒 | 亚洲免费观看网站| 一区二区亚洲精品精华液| 婷婷亚洲天堂影院| 免费视频成人片在线观看| 亚洲日韩一区精品射精| 国产偷国产偷亚洲高清日韩| h片在线免费观看| 粉色视频成年免费人15次| 日韩亚洲一区二区三区| 毛片A级毛片免费播放| 丝袜足液精子免费视频| 亚洲Av无码一区二区二三区| 亚洲女人被黑人巨大进入| 国产91色综合久久免费分享|