如何读取blob数据?
小渔村
|
1#
小渔村 发表于 2008-12-27 20:01
如何读取blob数据?
mysql
往外读取的时候不好控制啊 比如说有这样的数据,LOG_MESSAGE和LOG_KEYWORD是blob型。 select LOG_NAME,LOG_SUBJECT,LOG_MESSAGE,LOG_KEYWORD,INPUT_DATE from LOG\G; 有很多行:
[Copy to clipboard] [ - ]
CODE:
*************************** 1. row ***************************
LOG_NAME: 10.9.1.1 moblie.log LOG_SUBJECT:Log at 200812262250 [ERROR(1)] LOG_MESSAGE: 2008-1-2 22:46:28,199 WARN [authority.service.LoginService#compareLeverageGroup:63] : 00019663 Deal LeverageGroup pass time :14 ms 2008-1-6 22:46:28,200 INFO [lib.security.CheckLogin#insertLoginLog:45] : insert login info...customerId:00019663 userAgent:DoCoMo/2.0 P904i(c100;TB;W24H15;ser352880015552747;icc8981100010543834700F) channel:mob 2008-12-26 22:46:28,240 INFO [info.dao.SessionDAO#saveSessionData:91] : insert Session data table Jhf_Customer_Session with customerId:00019663 sessionID: 990247304395527628 date:Fri Dec 26 22:46:28 JST 2008,channelID:MOB 2008-12-26 22:46:28,242 INFO [authority.action.QuickLoginAction#dologinquick:366] : quicklogin sucess, , phoneUID=icc8981100010543834700F, customerID=00019663 2008-12-26 22:46:28,901 INFO [info.position.PositionReceiver#onMessage:70] : ======================get JMS message:===================00037538 2008-12-26 22:46:30,969 ERROR [lib.util.CurrencyUtil#getCurrencyPairInfo:81] : no data found according to the codeOrName!000000 2008-12-26 22:46:34,736 INFO [dispatch.listener.DispatchListener#onMessage:39] : Receive Info For RealTime !!! 2008-12-26 22:46:34,737 INFO [dispatch.listener.DispatchListener#onMessage:40] : Receive message !!!OrderResponseInfo:[priceId=20081226DBPD71d2e82c-02ea-460d-aa86-e12c6d7608df,currencyPair=null,productId=null,orderId=20081226ORD06070198,tradeId=null,fxOrderId=null,customerId=null,side=0,amount=null,executionPrice=null,tradeDate=null,valueDate=null,timequoteId=null,timequoteFlag=false,routeFlag=0,successFlag=false,errorCode=4088,errorMsg= RealTime Order Is Invalid!] 2008-12-26 22:46:35,013 INFO [info.position.PositionReceiver#onMessage:70] : ======================get JMS message:===================00041095 2008-12-26 22:46:35,885 INFO [common.util.BeanUtil#getRate:763] : checkPrice start 2008-12-26 22:46:35,886 INFO [common.util.BeanUtil#getRate:767] : pairCode = USD/JPY LOG_KEYWORD: ERROR ERROR [lib.util.CurrencyUtil#getCurrencyPairInfo:81] : no data found according to the codeOrName!000000 INPUT_DATE: 2008-12-26 22:50:05 *************************** 2. row *************************** LOG_NAME: 10.9.1.31 web.log LOG_SUBJECT: Log at 200812262251 [ERROR(3)] LOG_MESSAGE: 2008-12-26 22:51:16,951 INFO [core.custtrade.WriteOrderServiceImpl#abortOrder:1300] : abortOrder->obean.getOrderStatus() = 2 2008-12-26 22:51:16,952 INFO [core.custtrade.WriteOrderServiceImpl#abortOrder:1302] : abortOrder->obean.getTradeType() = 1 2008-12-26 22:51:16,954 INFO [core.dao.ContractDao#abortSettleOrderToContract:195] : contract.AmountSettling:20000.00 2008-12-26 22:51:16,955 INFO [core.dao.ContractDao#abortSettleOrderToContract:196] : order.getOrderAmount:20000.00 2008-12-26 22:51:16,958 INFO [core.dao.OrderDao#cancelOrder:4357] : cancelOrder->order number 0 2008-12-26 22:51:16,958 ERROR [core.dao.OrderDao#cancelOrder:4381] : problem e r r cn.bestwiz.jhf.core.bo.exceptions.DaoException: order status is not (0,1) ,so can not cancel ,orderId:20081226ORD06070028 at cn.bestwiz.jhf.core.dao.OrderDao.cancelOrder(OrderDao.java:4359) at cn.bestwiz.jhf.core.custtrade.WriteOrderServiceImpl.abortOrder(WriteOrderServiceImpl.java:1298) at cn.bestwiz.jhf.core.custtrade.WriteOrderServiceImpl.abortOrder(WriteOrderServiceImpl.java:1549) at cn.bestwiz.jhf.frontdesk.agent.OrderAgent.abortOrder(OrderAgent.java:423) -- at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) 2008-12-26 22:51:16,959 ERROR [core.custtrade.WriteOrderServiceImpl#abortOrder:1322] : abortOrder failed cn.bestwiz.jhf.core.bo.exceptions.DaoException: Exception error at cn.bestwiz.jhf.core.dao.OrderDao.cancelOrder(OrderDao.java:4382) at cn.bestwiz.jhf.core.custtrade.WriteOrderServiceImpl.abortOrder(WriteOrderServiceImpl.java:1298) at cn.bestwiz.jhf.core.custtrade.WriteOrderServiceImpl.abortOrder(WriteOrderServiceImpl.java:1549) at cn.bestwiz.jhf.frontdesk.agent.OrderAgent.abortOrder(OrderAgent.java:423) at cn.bestwiz.jhf.frontdesk.trade.biz.logic.OrderChangeHandler.buildOrderResponseData(OrderChangeHandler.java:189) -- at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) Caused by: cn.bestwiz.jhf.core.bo.exceptions.DaoException: order status is not (0,1) ,so can not cancel ,orderId:20081226ORD06070028 at cn.bestwiz.jhf.core.dao.OrderDao.cancelOrder(OrderDao.java:4359) ... 32 more 2008-12-26 22:51:16,961 WARN [core.custtrade.WriteOrderServiceImpl#abortOrder:1579] : abortOrder failed code:4090 message: cn.bestwiz.jhf.core.bo.exceptions.DaoException: Exception error 2008-12-26 22:51:16,962 WARN [frontdesk.agent.OrderAgent#abortOrder:444] : code:4090 message: cn.bestwiz.jhf.core.bo.exceptions.DaoException: Exception error 2008-12-26 22:51:16,963 INFO [core.custtrade.WriteOrderServiceImpl#abortOrder:1561] : abortOrder send AlertFrontInfo Start 2008-12-26 22:51:16,979 INFO [core.custtrade.WriteOrderServiceImpl#abortOrder:1563] : abortOrder send AlertFrontInfo End 2008-12-26 22:51:16,980 INFO [info.position.PositionReceiver#onMessage:70] : ======================get JMS message:===================00032907 2008-12-26 22:51:16,988 INFO [core.custtrade.WriteOrderServiceImpl#checkAccountStatusIfCancel:1227] : checkAccountStatusIfCancel->cts.getId() = 00032907 2008-12-26 22:51:16,988 INFO [core.custtrade.WriteOrderServiceImpl#checkAccountStatusIfCancel:1229] : checkAccountStatusIfCancel->cts.getAccountStatus() = 0 LOG_KEYWORD: ERROR ERROR [core.custtrade.WriteOrderServiceImpl#abortOrder:1322] : abortOrder failed ERROR [core.dao.OrderDao#cancelOrder:4381] : problem e r r INPUT_DATE: 2008-12-26 22:52:02 想弄出如下效果:
[Copy to clipboard] [ - ]
CODE:
LOG_NAME LOG_SUBJECT LOG_MESSAGE LOG_KEYWORD INPUT_DATE
10.9.1.1 moblie.log Log at 200120050 [ERROR(1)] ........................... ............... 2008-12-26 22:50:05 10.9.1.31 web.log Log at 200812262251 [ERROR(3)] ........................... ......... 2008-12-26 22:52:02 blob数据 blob数据 请教各位高手 |