Tomcat unable to read accented characters from MySQL

Folks,
Can anyone help with me this problem?
It seems that my version of Tomcat is unable to read accented characters from my MySQL Database.
I've checked in the Database and the characters are all correctly represented there. But when, in my servlet code, I do:
String author = results.getString("author_surname");If the String contains any accented character then the character shows as a '?'. (Even before it gets to the JSP - I'm writing the results straight to catalina.out).
Looking around these forums I found that some people suggested adding
?useUnicode=TRUE&characterEncoding=UTF-8;to the end of my jdbc url. As in:
<ResourceParams name="jdbc/connection">
//a whole load of other params
  <parameter>
    <name>url</name>
     <value>jdbc:mysql://localhost:3306/bookshop?useUnicode=TRUE&characterEncoding=UTF-8</value>
  </parameter>
</ResourceParams>inside my server.xml
But it doesn't seem to make any difference. In addition, I doubt I even need to use Unicode as the accents I need are only: ����� etc.
(Incidentally, writing that line into my server.xml, tomcat complains that it should finish with a semi-colon. Is that correct? Even if I put in the semi-colon, it still complains!!)
Any suggestions on this would be much appreciated. Thank you.

user13109986 wrote:
HI,
From http://download.oracle.com/docs/cd/B10501_01/server.920/a96529/ch9.htm
My understanding is the JDBC Api converts the string from the database to UTF-16.. If so is there any way to disable the UTF-16 encoding at JDBC API?That's exactly what it's supposed to do. There isn't even any concept of what it would mean to disable that: Java characters are UTF-16 representations of Unicode code-points, so there isn't anything else it could do.
I still suspect the JDBC part is working correctly and your writing-to-file isn't. I found this quote in the Wikipedia article on Windows-1256:
Windows-1256 is a code page used to write Arabic (and possibly some other languages that use Arabic script, like Persian) under Microsoft Windows. This code page is not compatible with ISO 8859-6 and MacArabic encodings.So was there a particular reason you chose Cp1256 and not ISO-8859-6 as the charset to write to the file with?

Similar Messages

  • XSL-FO unable to read special characters from the XML file

    Team,
    please help on issue, when trying to read the text from XML file (Special characters like bullet). It is displaying as Question mark(?) in output in place of bullet..please proved any soultion.

    The "?" signals a character set mismatch issue - http://www.oracle.com/technetwork/database/globalization/nls-lang-099431.html - between client and database software

  • How can I disable the accented characters from popping up on the iPad?

    Hello all,
           I work with clients who are unable to talk due to various developmental delays. We use the Proloquo2go app which uses the regular iPad keyboard for communication. Is there a way to disable the accented characters from popping up when typing on the keyboard? This is very distracting for some of our clients. Thanks in advance for any advice.
    Nikki

    I don't use an external keyboard but I wonder if you would have any different functionality with one. I'm sorry that I cannot recommend anything but have you thought about that approach?
    http://mashable.com/2012/05/11/ipad-special-needs/

  • Unable to read SEARCH response from backend server

    Currently we have problem when searching huge amounts of users against new SunOne Directory Server v6.3
    in production and acceptance.
    [17:12:43] root@ecdiala03-2[!]# /opt/app/sun/ds6/bin/dsadm -V
    [dsadm]
    dsadm : 6.3 B2008.0311.0058 NAT
    [slapd 64-bit]
    Sun Microsystems, Inc.
    Sun-Java(tm)-System-Directory/6.3 B2008.0311.0058 64-bit
    ns-slapd : 6.3 B2008.0311.0058 NAT
    Slapd Library : 6.3 B2008.0311.0058
    Front-End Library : 6.3_MTR_5087249_1_20081209 B2008.1210.1821
    ==============================================================
    It’s not working while searching huge amounts of users against DPS.However, It’s working while searching huge amounts of users against DS.
    Below is the error from access log of DPS when the problem occurred.
    ==================================
    31/Mar/2009:14:08:17 +0200] - CONNECT - INFO - conn=4565433 client=153.88.247.15:2719 server=ecdiala03-1:389 protocol=LDAP
    [31/Mar/2009:14:08:17 +0200] - PROFILE - INFO - conn=4565433 assigned to connection handler cn=default connection handler, cn=connection handlers, cn=config
    [31/Mar/2009:14:08:17 +0200] - OPERATION - INFO - conn=4565433 op=0 BIND dn="uid=itimadm1,ou=system accounts,o=ericsson" method="SIMPLE" version=3
    [31/Mar/2009:14:08:17 +0200] - SERVER_OP - INFO - conn=4565433 op=0 BIND dn="uid=ITIMADM1,ou=system accounts,o=Ericsson" method="SIMPLE"" version=3 s_msgid=17 s_conn=ecditna03-2:72725
    [31/Mar/2009:14:08:17 +0200] - SERVER_OP - INFO - conn=4565433 op=0 BIND RESPONSE err=0 msg="" s_conn=ecditna03-2:72725
    [31/Mar/2009:14:08:17 +0200] - PROFILE - INFO - conn=4565433 assigned to connection handler cn=BindDone,cn=connection handlers,cn=config
    [31/Mar/2009:14:08:17 +0200] - OPERATION - INFO - conn=4565433 op=0 BIND RESPONSE err=0 msg="" etime=0
    [31/Mar/2009:14:08:17 +0200] - OPERATION - INFO - conn=4565433 op=1 msgid=2 SEARCH base="ou=External,o=Ericsson" scope=2 filter="(objectclass=inetorgperson)" attrs="*"
    [31/Mar/2009:14:08:17 +0200] - SERVER_OP - INFO - conn=4565433 op=1 SEARCH base="ou=external,o=ericsson" scope=2 filter="(objectclass=inetorgperson)" attrs="*" s_msgid=18 s_conn=ecditna03-2:72725
    [31/Mar/2009:14:12:25 +0200] - OPERATION - INFO - conn=4565433 op=1 SEARCH RESPONSE err=1 msg="Unable to read SEARCH response from backend server : Timeout when waiting to read from input stream" nentries=33959 etime=248309
    [31/Mar/2009:14:17:25 +0200] - DISCONNECT - INFO - conn=4565433 reason="other" msg="Exception caught while polling client connection LDAP.153.88.247.15.2719 -- java.io.IOException: Connection reset by peer"
    ================================
    >>
    > > [15:12:29] root@ecdiala03-1[!]# ./dpadm -V
    > >
    > > [dpadm]
    > >
    > > dpadm :
    > >
    6.3_PD_COMBO_CUMULATIVE_VIRTUAL_15112008_ED2.0+6774589+6780423+6778308+6782659_2
    > > B2008.1212.0459 NAT
    > >
    > >
    > >
    > > [DPS]
    > >
    > > Sun Microsystems, Inc.
    > >
    > >
    Sun-Java(tm)-System-Directory-Proxy-Server/6.3_PD_COMBO_CUMULATIVE_VIRTUAL_15112008_ED2.0+6774589+6780423+6778308+6782659_2
    > > B2008.1212.0436
    > >
    > > =================

    We have changed the value of data-source-read-timeout in DPS from 20s to 30m.As per application test, the "time out" error has gone, but we get a new error as following.
    ==========================
    [27/Apr/2009:05:28:36 +0200] - SERVER_OP - INFO - conn=209469 op=8 SEARCH base="ou=internal,o=ericsson" scope=2 filter="(objectclass=ericssonInternal)" attrs="EriCA-AttesterNL EriCA-EmploymentForm EriCA-KeyRecoveryNL-Auth EriCA-NL-Auth EriCA-NLOTP-Admin EriCA-NLOTP-User EriCA-accountExpires c cn departmentNumber description displayName eriCompanySynch eriCountry eriCountryCode eriEmployeeStatus eriExpired eriIsManager eriMasterDomain eriOpOrgUnitAbbreviation eriOpOrgUnitIdentifier eriOpOrgUnitName eriOperationalManager eriPartner eriPartnerTrigram eriPwSynchDate eriSignType eriSignum eriSignumStatus facsimileTelephoneNumber givenName isMemberOf l mail memberOf mobile objectClass ou sametimebrowseldap sametimehomeserver sametimeuser smChallResp smDisabled smXauthRADIUSServer sn telephoneNumber title uid uidNumber " s_msgid=27 s_conn=ecditna03-2:8645
    [27/Apr/2009:06:06:23 +0200] - SERVER_OP - INFO - conn=209469 op=8 SEARCH RESPONSE err=0 msg="" nentries=236367 s_conn=ecditna03-2:8645
    [27/Apr/2009:06:06:23 +0200] - OPERATION - INFO - conn=209469 op=8 SEARCH RESPONSE err=0 msg="" nentries=236367 etime=2266483
    [27/Apr/2009:06:11:27 +0200] - DISCONNECT - INFO - conn=209469 reason="other" msg="Exception caught while polling client connection LDAP.153.88.247.15.4862 -- java.io.IOException: Connection reset by peer"
    ================
    Each time while application client (153.88.247.15) connecting DPS to read, they will exit with “connection reset” error.
    Could you please kindly give us some suggestion if this error is realted to the DPS?

  • ASDM is unable to read the configuration from ASA.

    Earlier today I was configuring the Cisco ASA (7.2(2)) using the ASDM, but after a reboot of the appliance I now get the following:
    ASDM is unable to read the configuration from ASA.
    This happens shortly after ?Loading running configuration from the device? appears in the ASDM status window.
    I have tried restarting both the appliance and my workstation, but the issue persists. I have also tried clearing the ASDM cache, but that doesn?t help either. The issue occurs whether I used the Cisco ASDM Launcher or the web interface.
    SSH access to the appliance works fine.
    Thanks for any assistance (why is it that Cisco?s GUIs always have issues?!?).

    I have exactly the same issue , SSH works fine but ASDM and Web interface reply with that error message "ASDM is unable to read the configuration from ASA".
    My ASA is a 5520 ver 7.1(2) with ASDM 5.1(2)
    Could it be something related to Java ?
    Thanks for any hint.

  • Reading Japanese Characters from Properties File

    I am running on Windows 2000 (English). Can any one suggest on how to read Japanese Characters from a ".properties" file.
    TIA

    look at ResourceBundle and unicode encoding,
    Jim

  • PDS - XML format, unable to read special characters in a string.

    Hi All,
    I've been using XML files to create my report with Oracle9i's new featue of PDS.
    Now, I'm unable to read a file if it contains '&' or '<' in the string. In fact, the xml file itself not able to crate a xml page in the browser, if these special characters are present.
    Is there any way to solve this problem ?
    I can't tell the users to remove &, < from the description data. Is there any way to workaround for this ?
    Thanks in advance,
    Satya.

    Hi Rohit and Rajesh
    Thanks for your reply.
    In fact, my problem is like this:
    I'll get data in .txt file and save that as a .xml file in the network before calling Oracle report ,which gets data from the .xml.
    The contents are like this:
    <Comapy name> Ford Motors UK & Europe</Company name>
    <Department> HR & Pensions</Depatrment>
    <Salary>Grad4 < 25000 </Salary>
    As per XML entity character representation, I need to replace '&' with '&amp;' and '<' with '<lt;'
    I'm wondering is there any other way to solve this problem as it is difficult to replace '<' and '>' generically.
    Honestly, I couldn't understand what Mr. Rajesh was trying to tell.
    'for & use & ( with semicolon at the end)'
    'for < use <'
    'for > use >'
    Can you shed some light on this ?
    Many thanks
    Satya.

  • Unable to read french characters

    Im trying to reach data from an excel (using the Apache software's excel reader code) but my java code is not recognizing words like "D�cor". It is replacing '�' with '?'(All my columns are in English , it is just a couple of data entires like D�cor or caf� that bother me) . I use FileInputStream to read data-i cannot change that as it is required input for apache excel file reader. I thought java uses Unicode by default, but when i printed
    (new OutputStreamWriter(new ByteArrayOutputStream())).getEncoding()
    i got 'ASCII' as output. Could anyone help me out with this please?
    -Aarthi

    Just to add to it: this is the code I'm using
    FileInputStream fis = new FileInputStream(fileName);
    Workbook wb = new Workbook(fis);
    Sheet sh = wb.getSheetAt(0);
    Row row =null;
    String strDesc = null;
    for (int i = (firstRow + 1); i < lastRow; i++)
    row = sh.getRow(i);                
    // line below is unable to read D�cor
    strDesc = row.getCell((short) col1).getStringCellValue();
    System.out.println("Desc -> "      +strDesc );
    }

  • How to read in data from MySQL to Authorware?

    Hi,
    I am trying to read in values from my database (MySQL) to
    authorware, but the best I am able to get is true or false.
    I would like to be able to get some data from the database
    and return it to AW as a string. Does anyone have any experience
    with this? Can anyone lend a helping hand in this endeavor?
    Thanks in advance for your help,
    Brad

    "Paul Swanson" <[email protected]>
    wrote in message
    news:[email protected]...
    > Kevin, you shouldn't need to worry about ODBC or OLEDB.
    Your PHP script
    > needs to handle the database connection, and you can use
    PHP's
    > mysql_connect() function for that. You really don't need
    to do anything
    > different for Authorware than you do for any PHP/MySQL
    application in
    > terms
    > of connecting to the database.
    >
    > My PHP script returns data to AW in the form of
    name=value pairs delimited
    > by the ampersand character. I then use the following
    code in AW to convert
    > them into lists:
    >
    > =========================
    > -- Use this routine to break queryString into name /
    value arrays.
    > -- Assumes a database query returns a string of
    name=value pairs
    > -- delimited by the ampersand (&) character.
    >
    > -- strip leading & from queryString
    > queryString := SubStr(queryString, 1,
    CharCount(queryString))
    >
    > -- break into list of individual lines
    > tempList := Replace("&", Return, queryString)
    >
    > listLength := LineCount(tempList)
    >
    > -- create empty arrays for name and value
    > name := Array("", listLength)
    > value := Array("", listLength)
    >
    > repeat with counter := 1 to listLength
    > singleLine := GetLine(tempList, counter)
    > name[counter] := GetWord(1, Replace("=", " ",
    singleLine))
    > value[counter]:= GetWord(2, Replace("=", " ",
    singleLine))
    > end repeat
    >
    > -- now you will need to add a separate calc icon with a
    routine to
    > -- read the data from the arrays. name[counter] matches
    value[counter]
    > =========================
    >
    > I follow this with another Calc icon (I could have done
    it all in one
    > calc)
    > that parses the names and assigns the values to my
    custom AW variables:
    >
    > =========================
    > -- get just the info we want, and store in variables
    >
    > repeat with counter := 1 to listLength
    > if name[counter] = "Lesson1Complete" then
    > Lesson1Complete := Number(value[counter])
    > else if name[counter] = "Lesson2Complete" then
    > Lesson2Complete := Number(value[counter])
    > else if name[counter] = "Lesson3Complete" then
    > Lesson3Complete := Number(value[counter])
    > else if name[counter] = "Lesson4Complete" then
    > Lesson4Complete := Number(value[counter])
    > else if name[counter] = "Lesson5Complete" then
    > Lesson5Complete := Number(value[counter])
    > else if name[counter] = "Lesson6Complete" then
    > Lesson6Complete := Number(value[counter])
    > else if name[counter] = "Lesson7Complete" then
    > Lesson7Complete := Number(value[counter])
    > else if name[counter] = "Lesson8Complete" then
    > Lesson8Complete := Number(value[counter])
    > else if name[counter] = "OverviewComplete" then
    > OverviewComplete := Number(value[counter])
    > else if name[counter] = "grade" then
    > score := Number(value[counter])
    > else if name[counter] = "passed" then
    > passed := Number(value[counter])
    > end if
    > end repeat
    I'd like to point out here that any time you have a series of
    variables that
    all have identical names except for a number in the variable
    name, you
    should be looking at lists. I'm surprised, Paul, that you
    have lists used
    to the extent that you're able to use Value[counter] on the
    right side of
    the equation, yet you're not using lists on the left side of
    the equation.
    Let's look at how this code could be made super simple by
    having ONE list
    variable, LessonComplete, instead of Lesson1Complete through
    Lesson8Complete.
    -- Assumes a database query returns a string of name=value
    pairs
    -- delimited by the ampersand (&) character.
    -- strip leading & from queryString
    --(note you could also not add this ampersand on the PHP
    side)
    queryString := SubStr(queryString, 1, CharCount(queryString))
    -- break into list of individual lines
    tempList := Replace("&", Return, queryString)
    listLength := LineCount(tempList)
    -- create empty arrays for name and value
    name := Array("", listLength)
    LessonComplete := []
    repeat with counter := 1 to listLength
    singleLine := GetLine(tempList, counter)
    name[counter] := GetWord(1, Replace("=", " ", singleLine))
    LessonComplete[name[counter] * 1] := GetWord(2, Replace("=",
    singleLine))
    end repeat
    -- now you will need to add a separate calc icon with a
    routine to
    -- read the data from the arrays. name[counter] matches
    value[counter]
    --No you don't...You're DONE :-)
    Also note that this is extensible...you can have Lesson 9,
    10, etc. and not
    have to change the code. You can also lower the amount of
    data being
    transmitted, because now instead of Lesson8Complete=1 all you
    need is 8=1.
    This lowers the server load and speeds the response. It has
    advantages on
    the Authorware side as well, because if, for instance, you
    had a series of
    buttons that were checked or not based on the completion, you
    could do the
    same type of loop. Separate variable names do not allow for
    that type of
    loop unless you use Eval (ugh).
    HTH;
    Amy

  • Unable to pick unicode characters from input file using "outside in"

    Hi,
    I am using your product "Outside in" to read unicode text from input
    source file. For reading text I am using TReadFirst and TReadNext even
    though "It is not picking unicode characters from input source file
    and also it is giving zunk character to the buffer". How can I
    retrieve unicode character from input source using "outside in"
    product. Your help makes me learn more stuff.
    Regards,
    Naresh.D

    I am trying to use CAReadFirst and CAReadNext to read unicode characters. Even it is not picking, I think is there any flags we need to set. can any one help to this.

  • Why am I now unable to read RAW files from 5dmk2 camera.

    I have had a H/D rebuild and reloaded Elelemts.  Now I find I am unable to read any of my Canon5Dmk2 raw files . Any suggestions please.

    Download and install Adobe Camera Raw 5.4

  • Unable to read net files from Nikon D800

    purchased Nikon D800
    have cs5
    updated Adobe manager as suggested
    closed all adobe products
    Tried installing Adobe patch installer- Adobe 7.1 update,  
    Update Failed- not applicable for me
    Still cannot read NEF files, 
    I would like to read NEF files from Nikon D800 in bridge and photoshop.
    Any suggestions?  
    Thank you
    Karla Chouhan

    The D800 is supported in Camera Raw 7.1 and higher
    http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html
    CS5 is not compatible with Camera Raw 7 and higher. You need CS6 (paid for upgrade or join the Adobe Cloud).
    http://helpx.adobe.com/x-productkb/global/camera-raw-compatible-applications.html
    Or stay with CS5 and use the free DNG converter to convert all D800 Raw files to DNG then edit the DNGs in Bridge and Photoshop
    http://www.adobe.com/products/photoshop/extend.displayTab2.html

  • Unable to read field value from main table - unexpected socket read error

    Hi Friends,
    While executing the below code, I am able to get the value of the field 'id' but i am unable to get the value for the 'materialnumber' field. i am getting the below exception
    +com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ProtocolException: java.io.IOException: Unexpected socket read.  Result is -1.
         at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute(AbstractRetrieveLimitedRecordsCommand.java:158)
         at com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand.execute(RetrieveLimitedRecordsCommand.java:157)
         at updaterecords.main(updaterecords.java:126)
    Caused by: com.sap.mdm.internal.protocol.manual.ProtocolException: java.io.IOException: Unexpected socket read.  Result is -1.
         at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:100)
         at com.sap.mdm.data.commands.AbstractRetrieveLimitedRecordsCommand.execute(AbstractRetrieveLimitedRecordsCommand.java:146)
         ... 2 more
    Caused by: java.io.IOException: Unexpected socket read.  Result is -1.
         at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:59)
         at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:417)
         at com.sap.mdm.internal.net.ConnectionImpl.nextMessage(ConnectionImpl.java:501)
         at com.sap.mdm.internal.net.ConnectionImpl.receiveMessage(ConnectionImpl.java:472)
         at com.sap.mdm.internal.net.ConnectionImpl.send(ConnectionImpl.java:209)
         at com.sap.mdm.internal.net.ReservedConnection.send(ReservedConnection.java:105)
         at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:97)
         ... 3 more+
    import com.sap.mdm.commands.AuthenticateUserSessionCommand;
    import com.sap.mdm.commands.CommandException;
    import com.sap.mdm.commands.CreateUserSessionCommand;
    import com.sap.mdm.commands.DestroySessionCommand;
    import com.sap.mdm.commands.GetRepositoryRegionListCommand;
    import com.sap.mdm.data.Record;
    import com.sap.mdm.data.RegionProperties;
    import com.sap.mdm.data.ResultDefinition;
    import com.sap.mdm.data.commands.RetrieveLimitedRecordsCommand;
    import com.sap.mdm.ids.TableId;
    import com.sap.mdm.net.ConnectionException;
    import com.sap.mdm.net.ConnectionPool;
    import com.sap.mdm.net.ConnectionPoolFactory;
    import com.sap.mdm.schema.FieldProperties;
    import com.sap.mdm.schema.RepositorySchema;
    import com.sap.mdm.schema.commands.GetFieldListCommand;
    import com.sap.mdm.schema.commands.GetRepositorySchemaCommand;
    import com.sap.mdm.search.Search;
    import com.sap.mdm.server.DBMSType;
    import com.sap.mdm.server.RepositoryIdentifier;
    public class updaterecords {
         public static void main(String[] args) {
              try {               
                    String serverName = "159.112.6.26";
                    ConnectionPool connections = null;
                    try {
                         connections = ConnectionPoolFactory.getInstance(serverName);
                    } catch (ConnectionException e) {
                         e.printStackTrace();
                         return;
                   // specify the repository to use
                   // alternatively, a repository identifier can be obtain from the GetMountedRepositoryListCommand
                   String repositoryName = "DEMO";
                   String dbmsName = "MDMD";
                   RepositoryIdentifier reposId = new RepositoryIdentifier(repositoryName, dbmsName, DBMSType.ORACLE);
                   // get list of available regions for the repository
                   GetRepositoryRegionListCommand regionListCommand = new GetRepositoryRegionListCommand(connections);
                   regionListCommand.setRepositoryIdentifier(reposId);
                   try {
                        regionListCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   RegionProperties[] regions = regionListCommand.getRegions();
                   // create a user session
                   CreateUserSessionCommand sessionCommand = new CreateUserSessionCommand(connections);
                   sessionCommand.setRepositoryIdentifier(reposId);
                   sessionCommand.setDataRegion(regions[0]); // use the first region
                   try {
                        sessionCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   String sessionId = sessionCommand.getUserSession();
                   // authenticate the user session
                   String userName = "meter1";
                   String userPassword = "meter1";
                   AuthenticateUserSessionCommand authCommand = new AuthenticateUserSessionCommand(connections);
                   authCommand.setSession(sessionId);
                   authCommand.setUserName(userName);
                   authCommand.setUserPassword(userPassword);
                   try {
                        authCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   GetRepositorySchemaCommand cmd=new GetRepositorySchemaCommand(connections);
                   cmd.setSession(sessionId);
                   try{
                        cmd.execute();               
                   }catch(CommandException e){
                        System.out.println(e.getLocalizedMessage());
                   RepositorySchema repsch=cmd.getRepositorySchema();
                   // the main table, hard-coded
                   TableId mainTableId = new TableId(1);     
                   // specify the result definition (what to retrieve); in this example, nothing
                   ResultDefinition rd = new ResultDefinition(mainTableId);
                   // select all records
                   Search search = new com.sap.mdm.search.Search(mainTableId);
                   //get fields
                   GetFieldListCommand getFieldListCommand = new GetFieldListCommand(connections);
                   getFieldListCommand.setSession(sessionCommand.getUserSession());
                   getFieldListCommand.setTableId(mainTableId);
                   try {
                        getFieldListCommand.execute();
                   } catch (CommandException e) {
                        System.out.println(e);
                   FieldProperties[] lookupFields = getFieldListCommand.getFields();
                   // add fields to records to retrieve
                   rd.addSelectField(repsch.getFieldId("Products","Id"));
                   rd.addSelectField(repsch.getFieldId("Products","MaterialNumber"));                              
                   // retrieve the records
                   RetrieveLimitedRecordsCommand limitingCommand = new RetrieveLimitedRecordsCommand(connections);
                   limitingCommand.setSession(sessionId);
                   limitingCommand.setResultDefinition(rd);
                   limitingCommand.setSearch(search);
                   //limitingCommand.setPageSize(2000);
                   try {
                        limitingCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
                   System.out.println("Record count is " + limitingCommand.getRecords().getCount()+"\n");
                   Record[] records=limitingCommand.getRecords().getRecords();
    System.out.println(records[0].getFieldValue(repsch.getFieldId("Products","Id"))+ " \n");
    System.out.println(records[0].getFieldValue(repsch.getFieldId("Products","MaterialNumber"))+ " \n");
                   // finally destroy the session
                   DestroySessionCommand destroySessionCommand = new DestroySessionCommand(connections);
                   destroySessionCommand.setSession(sessionId);
                   try {
                        destroySessionCommand.execute();
                   } catch (CommandException e) {
                        e.printStackTrace();
                        return;
              } catch (Exception e) {
                   System.out.println(e.getLocalizedMessage());
                   e.printStackTrace();
    Kindly let me know where i am going wrong. MaterialNumber field is a TEXT not a lookup table field.  Above fields are from the main table.
    Thanks,
    Raags

    Hi Friends,
    I got the solution. It was the error because of not having a the below statement.
    limitingCommand.setPageSize(1);
    As i havent used that statement, it was trying to get 1000 records, and i dont know exactly what makes this to get that error. Anyhow., As i want to use for updation, i cn live with one record.
    Thanks,
    Raags

  • Reading special characters from a flat file and inserting into DB

    I'm reading data with special characters like . etc from a flat file , assigning the data to variable in my anonymous block and inserting into my DB. But the show up as inverted ? s. Any clues about how to do this?
    If i try to do the insert directly it works. It seems like the error occurs when reading this data into a variable
    thanks for the help
    Lalit Bhatia

    lalit, this is probably an character set problem, the default on Database creation tends to be 7bit Ascii which does not support special characters, it's been a while since I set up a db in this way, but you need to change settings in oracle.ini. The db will need to be restarted for this. Also, to check current settings try:
    select * from NLS_DATABASE_PARAMETERS
    You want an 8bit, unicode or multibyte character set. Sorry I cannot remember moer off the top of my head, try searching on NLS or character set

  • Unable to read chinese characters in a flat file to external table

    Hi All,
    We have a flat file containing data in chinese. We are using external table to read data in files. When i do select <coulmn-name> from <table> it displays box for the chinese characters. The column is of type varchar2.
    The NLS_LANGUAGE is AMERICAN and NLS_CHARACTERSET is AL32UTF8.
    The character set is mentioed as UTF8 in external table defnition.
    Is the external table not reading these charcters properly? Should any patch be installed or some settings should be changed for sql developer to to display chinese character?

    The NLS_LANG environment variable/registry string variable (You are just one of the 1000s of 'anonymous' users refusing to post platform and version), so NOT NLS_LANGUAGE, on the server hosting the file, should be set to anything ending in .AL32UTF8
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • TS1388 Garageband has several intermitent problems

    1.  I sometimes can not play many tracks.  Either I can play six tracks (maybe more), or I am just limited to one track.  For  the time being this problem seems to have cleared up. 2.  This morning when starting a new file, when I selected a loop to

  • Crashes on launch iTunes 12.1

    Recently updated my version of iTunes from the automatic update tool and whenever I launch it, it stops working with the error message; Problem signature:   Problem Event Name: APPCRASH   Application Name: iTunes.exe   Application Version: 12.1.0.71

  • Upon starting lightroom i am getting a error message that reads

    "Lightroom encountered an error when reading from its preview cache and needs to quit" i have followed other instructions by adding old to the program file names i have also deleted and reinstalled the entire program desperatley needing to get this p

  • Rsync script - ignore some files, include others?

    I am using an rsync script to backup files from one Mac to another. I have the "--ignore-existing" flag set to avoid copying files that haven't changed. However, there are certain files that I ALWAYS want to sync, regardless of whether or not they've

  • ME05:  default varaint for selection screen

    Hello All,  I am trying to display a variant as a default variant for the selection screen in ME05. To achieve that, I went into SE93 and tried to give a variant name in Start with variant field and tried to save it. Then I am getting the error "No s