8 Temmuz 2014 Salı

REP-0495 UNABLE TO TOKENIZE THE QUERY


10.1.6 Opening / Running an encoded JSP report

If your JSP report's character encoding (for example, EUC-JP) differs from the character set portion of the NLS_LANG environment variable (for example, JA16SJIS), then you will get the following errors:
  • when running the JSP file:
    REP-6106 or 6104 with javax.servlet.jsp.JspException  (multibyte)
    REP-0495 Unable to tokenize the query (singlebyte)
    
    
  • when opening the JSP file using Reports Builder:
    REP-0069 Internal Error or REP-6106
Workaround
To work around this issue, you must ensure that your JSP report's character encoding matches the IANA encoding corresponding to Reports Builder's character set portion of the NLS_LANG variable.
For example, the JSP report encoding
<%@ page contentType="text/html;charset=EUC-JP" %>
<META http-equiv="Content-Type" content="text/html;charset=EUC-JP">

uses the IANA character encoding EUC-JP. For this report, you should use the NLS_LANG setting
NLS_LANG=JAPANESE_JAPAN.JA16EUC.
The JSP report's encoding (EUC-JP) will then correspond to the character encoding part of the NLS_LANG environment variable (JA16EUC).

10.1.7 Dynamically Embedding a Character Set in a JSP file

In Oracle Reports, Web-report templates are configured by default for Western European character encoding. For other languages, you must specify the character encoding for a JSP file by using both the charsetattribute of the <meta> tag and the <%@page%> page directive.
To dynamically associate the appropriate character encoding with the JSP file, you can make the following modifications:
  1. In the directory oracle_home/reports/templates/, edit the files rw*.html and blank_template.jsp:
    1. Modify the page directive to read
      <%@ page contentType="text/html;charset=yourIANAencoding" %>
      
      
      where
      yourIANAencoding is the IANA character encoding that corresponds to the character encoding part of your NLS_LANG environment variable.
    2. Modify the <meta> tag inside the <head> tag to read:
      <meta http-equiv="Content-Type"
      content="text/html;charset=yourIANAencoding" />
      
      
  2. In the directory oracle_home/reports/templates/, edit the file template.xsl:
    1. Modify the <xsl:output> tag to read:
      <xsl:output
           method="jsp"
           indent="yes"
           encoding="yourIANAencoding"
         />
      
      
      where
      yourIANAencoding is the IANA encoding that corresponds to the character encoding part of your NLS_LANG environment variable.
    2. Add the following page directive:
      <%@ page contentType="text/html;charset=yourIANAencoding" %>
      
      
    3. Add or modify the <meta> tag inside the <head> tag:
      <meta http-equiv="Content-Type"
      content="text/html;charset=yourIANAencoding" />
      
      
      where
      yourIANAencoding is the IANA encoding that corresponds to the character encoding part of your NLS_LANG environment variable.

There was an explanation in oracle documentation website about the error written in title and it helped me out a lot to overcome it.
As much as i analyzed i came up with a result showing me that one file which is necessary to call IANA Encoding to match with NLS_LANG variable was not even able to be found at remote computer. I did the same search for these files on my own computer. I found them out. 

You have to look at your own oracle files path first. Here mine was;

C:\oracle\BIToolsHome_1\reports\

Template.xsl file path;

C:\oracle\BIToolsHome_1\reports\templates.xsl

blank_template.jsp

C:\oracle\BIToolsHome_1\reports\blank_template.jsp


HERE THE PICTURES ARE AND THE DETAILS WHICH HAS TO BE CHECKED OUT
                                                                blank_template.jsp




template.xsl



TO SOLVE IT FOR REMOTE COMPUTER I TRIED MORE THEN ONE NLS_LANG VARIABLES FROM REGISTRY. IT IS IN 

HKEY_LOCAL_MACHINE/SOFTWARE 
LOOK IT UP BY CTRL+F TYPE NLS_LANG 

I TRIED TWO OF THEM. IT ALL WORKED

1-AMERICAN_AMERICA.UTF8

AND

2-TURKISH_TURKEY.TR8MSWIN1254 



THERE YOU GO!


Hiç yorum yok:

Yorum Gönder