ITPub博客

首页 > Linux操作系统 > Linux操作系统 > xml report finished with error

xml report finished with error

原创 Linux操作系统 作者:susie0409 时间:2011-10-07 22:44:17 0 删除 编辑
Caused by: java.io.UTFDataFormatException: Invalid UTF8 encoding.
The xml page cannot be displayed
an invalid character was found in text content
 
When we run the report, only part of the data in showed in the xml file.
 
After we spend a long time tested and found there have special char in item description.
so we applied this script. to remove the special char, then the report works well
 
declare
  s  varchar2(4000);
  s1 varchar2(4000);
  s2 varchar2(4000);
  a  number;
  b  number;
  cursor cur_desc IS
    SELECT MSI.DESCRIPTION, segment1
      FROM APPS.mtl_system_items_b MSI
     WHERE segment1 IN(....)
 AND ORGANIZATION_ID = 100;
begin
  for cur1 in cur_desc Loop
 
    a := 0;
    a := length(cur1.description);
    s := substr(cur1.description, 1, 1);
 
    for i in 2 .. a loop
   
      b := ascii(substr(cur1.description, i, 1));
      -- dbms_output.put_line('Value of b is :: ' || b || ':: for value :: ' ||substr(cur1.description,i,1) );
   
      if b not in (49855, 55328, 176, 150, 189, 190, 248) then
     
        s := s || substr(cur1.description, i, 1);
     
      end if;
   
    end loop;
    --dbms_output.put_line('for item :: ' || cur1.segment1 || ' :: ' || 'Description is :: ' || s);
 
    INSERT INTO apps.mtl_system_items_interface
      (segment1,
       organization_id,
       transaction_id,
       process_flag,
       set_process_id,
       transaction_type,
       description)
    values
      (cur1.segment1, 100, NULL, 1, xxxx, 'UPDATE', s);
 
  end loop;
end;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15225049/viewspace-708741/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: aviable onhan qty
请登录后发表评论 登录
全部评论

注册时间:2009-09-30

  • 博文量
    115
  • 访问量
    305727