[AS] Set every character leading to auto

I can't seem to get this to do what I expect.
tell application "Adobe InDesign CS5.5"
tell every text frame of page 1 of active document
  set leading of properties of every character of every paragraph to auto
end tell
end tell
The script I am working on imports text. Everything works except the leading, it comes in with "0 pt" leading and I need the script to basically check every character on the page and if the leading is 0 set it to auto.... I put this together as a quick and dirty test to try and make it work and in no way represents the final code.
Everything I have tried has either done nothing or gives me an error saying "Expected number, string or auto" when I give it auto.
I don't care if it is AS or JS as long as it works.

The problem is that some text comes in with the leading set properly and some doesn't. Only when the leading is set to 0 should it adjust it to auto.
I also need the 'do script' because this is a single line in a very large script written almost entirely in Applescript.
The project I am working on takes documents made in MultiAd Creator and migrates them to Indesign. We are phasing out the other product and using only Adobe. The entire archive of old documents needs to be migrated over to indesign.
The script currently will get about 80% of that correct. The leading was one of the minor issues. There is something like 4000 documents to be migrated over and the script needs to pretty much do it without interaction and get the new document to be 100% exact to the old document.
It works like this:
The script navigates the entire server finding Creator documents.
Opens each in turn in Creator.
Creates a new InDesign document of the same dimensions.
Every color in the Creator document is add to the swatches in InDesign.
Then every shape object is recreated point by point in the InDesign document. (this includes the placed graphics)
All text flows in the Creator document are recreatedas text frames in the InDesign document.
Everything is adjust so that layering is correct.
The new Indesign document is then saved in the same location as the Creator document using the same name.
Creator handles fonts differently than Indesign. Instead of using italics or bold from the font family it would apply stroke or skew the text. I have that nearly sorted out so that it works nearly perfectly, but the leading was not coming over properly 100% of the time.
What I thought should work wasn't and that was bugging me as one of those "I'll come back to it later" things I hadn't come back to yet.

Similar Messages

  • How come I'm not asked for password for every app purchase, app auto downloads once I tap install, not good when my kids start buying apps because they are not asked for password, help!!

    How come I'm not asked for password for every app purchase, app auto downloads once I tap install, not good when my kids start buying apps because they are not asked for password, help!!

    Thank you for the help, have sorted it through Restrictions in General settings now : )
    No more mysterious app purchases on my c.card now thank god !!
    You would think they would set as default that Password was required - Imediatly . But they know there likely to get more purchases the way the default set it..
    Thanks again for prompt reply!!!

  • How to set the character set to default

    Hi All,
    How to set the character set default to Simplified Chinese(GB2312), current we need change it every time.
    Thanks in advance.

    Hello Michael,
    when we log in SAP in ZH language the character set is getting defaulted to Simplified Chinese(GB2312). But currently the log in Language is in EN and hence the character set to be defaulted to Simplified Chinese(GB2312).
    Also please let me know where is the option for GUI setting?
    Thanks Again in Advance.

  • Printing a Crystal Report changes the printers default tray setting every

    Hey,
    Hopefully someone have experienced this in the past,
    I am printing a Crystal Report, and in windows the printer has the tray auto as the setting. When I print from word, mspaint, or notepad, works perfect.
    But when I print via Crystal Report, it changes the deafult printers tray setting every time.
    Anyone have any idea, if there's a hotfix or something for this, I have problems at the client machine.
    Best Regards,
    Love

    I dont have much idea about CR 8.
    I would suggest you to try with No printer option.
    Try with this also:
    On Page setup click on printer ->Properties->Apply settings for default printer.
    Regards,
    Shweta

  • E-mail from Outlook via Echange 2007 - wraps line at every character...

    Has anyone seen e-mail sent from Outlook via Exchange that displays the e-mail one or two characters per line...
    So a message like - Help me: would show up like
    H
    e
    l
    p
    m
    e
    On the phone. The formatting is intact, if you 'forward' the message it pops up formatted just as it was sent. The wrap isn't exactly every character, it looks like it might be a certain pixel width, as sometimes two characters fit on a line. We have tried several phones, all have the same issues.
    A solution would be really nice...its kind irritating
    Thanks

    How does it look in Outlook? Or via OWA? Is it all messages, or just those from a specific sender?
    The general symptom is that the line length is set too short (or zero). This can be in Outlook or in the sender's mail client.

  • How can I set the insert date to auto update in Pages 5.2.2

    how can I set the insert date to auto update in Pages 5.2.2
    I am attempting to have the date in header auto update in a Pages file.
    I can insert it, but where is the AUTO UPDATE selection
    OS10.9.4
    thank you

    Apple never included the auto-update feature for dates in Pages v5.2.2. You would have to single-click the date, and deliberately update it.
    If you have Pages ’09 v4.3 in /Applications/iWork '09, then it will allow you to configure auto-update of the date field. Right-click on the date, set the format, and click the selection for automatically update on open.

  • Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Auto-Capitalization: How can I set Pages v5.01 to auto-capitalize the first letter of the first word in a sentence and to automatically change lower case "i" to "I" appropriately. I'm unable to find a menu that offers me these.

    Gavin Lawrie wrote:
    Once it had been established that the iWork rewrite had resulted in some features being lost and others broken, and once Apple had acknowledged the concerns* and suggested they are working on fixes**, I'm not sure what else there is to achieve.
    You are writing that in the perspective of having read about it here already. Repeated often enough that you encountered it somewhere in the posts.
    Users are flooding in here and don't know any of this. Of course we have to repeat everything endlessly.
    Because I like to give precise, understandable and workable answers to repeated questions, and Apple doesn't allow sticky posts here, I created a separate forum which users can consult to look up real answers, and contribute for themselves if they have something valuable to add:
    http://www.freeforum101.com/iworktipsntrick/
    There is a section purely devoted to Pages 5. Add whatever answers you feel will lighten the problems of Apple's 'upgrades'.
    Peter
    * Where have they acknowledged anything?
    ** They have barely anything listed, compared to the massive list of deleted features, and nothing but an extraordinarily long time frame considering they created the problems here and now. Apple has not said they will do anything at all about fixing the real issues, the biggest of which is that the new iWork apps break virtually all the work of existing users.

  • Hi, I want to have my phone "on ring" so my alarm will go off (have one set every night) but I DON'T want it to ring (just vibrate). It seems like there is no "none" option of Ringer. Anything I can do?

    Hi, I want to have my phone "on ring" so my alarm will go off (have one set every night) but I DON'T want it to ring (just vibrate). It seems like there is no "none" option of Ringer. Anything I can do? So basically it seems my options are 1. silence the entire phone therefore also silencing my alarms OR 2. Leaving the ringer on low, putting all other notifications to vibrate, yet the ringer is STILL on. That's annoying!

    The alarm will ring even if the switch is on Silent.

  • How to get a set of character within a string?

    Hi,
    I need to cut a set of character within a string. I have tried everthing but I need help.
    Example.
    Database Version 11.2.0.3
    create table tst_string (message varchar2(600));
    insert into tst_string values ('ANR0166I Inventory file expiration finished processing for node OSOGBO, filespace OSOGBO\SystemState, copygroup BACKUP and object type GROUP BASE with processing statistics: examined 43, deleted 43, retrying 0, and failed 0. (SESSION: 1506, PROCESS: 2)');
    insert into  tst_string values ('ANE4175I Starting Full VM restore of VMware Virtual Machine ''mfujiwara'' target node name=''VC1_DC1'', data mover node name=''VC1_DC1_DM3''  (SESSION: 3780)');
    commit;
    select * from tst_string;
    MESSAGE
    ANR0166I Inventory file expiration finished processing for node OSOGBO, filespace OSOGBO\SystemState, copygroup BACKUP and object type GROUP BASE with processing statistics: examined 43, deleted 43, retrying 0, and failed 0. (SESSION: 1506, PROCESS: 2)
    ANE4175I Starting Full VM restore of VMware Virtual Machine 'mfujiwara' target node name='VC1_DC1', data mover node name='VC1_DC1_DM3'  (SESSION: 3780)
    ## I want get
    # From first line following values:
    node OSOGBO
    filespace OSOGBO\SystemState
    examined 43
    deleted 43
    retrying 0
    failed 0
    # From second line
    mfujiwara
    VC1_DC1
    VC1_DC1_DM3Any help can be useful...
    Thanks in advance.

    Hi Frank,
    It looks like message can be seen as delimited lsit of sub-messages, where a number of different characters (perhaps ',' amd ':') may serve as delimiters. Each sub-message may or consist (entirely or in part) of something you want to display.Yes. In my first case where is "ANR0166I" I want get the characteres before "," (e.g "OSOGBO," I want get "OSOGBO") excluding "(SESSION: 1506, PROCESS: 2)"
    Would a user-define PL/SQL function be okay for you?Yes.. no problem.
    I'm not good with shell script, but will try show what I want using SHELL commands:
    See this example:
    ### I create a file named "tst_string"
    $ vi tst_string
    ANR0166I Inventory file expiration finished processing for node OSOGBO, filespace OSOGBO\SystemState\NULL\System State\SystemState, copygroup BACKUP and object type GROUP BASE with processing statistics: examined 43, deleted 43, retrying 0, and failed 0. (SESSION: 1506, PROCESS: 2)
    ## So I used a function sed to get my desired values. The command bellow is poor, but My point is the result.
    $ cat tst_string | sed 's/ANR0166I.*node //g' | sed 's/, filespace//g' | sed 's/, copygroup BACKUP and object type GROUP BASE with processing statistics: //g' | sed 's/. (SESSION.*//g' | sed 's/, deleted//g' | sed 's/, retrying//g' | sed 's/, and failed//g'
    OSOGBO OSOGBO\SystemState\NULL\System State\SystemState 43 43 0 0The result was:
    NODE     FILESPACE                              Examined     Deleted     Retrying        Failed      
    OSOGBO      OSOGBO\SystemState\NULL\System State\SystemState     43           43      0           0I will go check the links wich you mentioned.
    Thanks

  • Insert set of character in a string

    hi guys,
    I have created a string of length 19, i need to insert set of character and compare them if its right format or not.That is for barcode i need. i WANT MY PROGRAM TO GENERATE THIS FORMAT BARCODE.
    eg : INV40602007RE000155

    Hi
    SEARCH
    Variants:
    1. SEARCH f    FOR g.
    2. SEARCH itab FOR g.
    Note
    Like all string processsing statements, you can only use character-type operands here.
    If the type of an operand is not STRING, the operand is treated like a type C field, regardless of its actual type, even though no actual conversion takes place.
    See Only character fields allowed in string processing.
    Variant 1
    SEARCH f FOR g.
    Additions:
    1. ... ABBREVIATED
    2. ... STARTING AT n1
    3. ... ENDING   AT n2
    4. ... AND MARK
    Effect
    Searches the contents of f for the string in the field g. This string can have any of the following formats:
    'str'
    a character string (trailing spaces are ignored)
    '.str.'
    any character string between the periods
    '*str'
    a word ending with "str", including "str"
    'str*'
    a word beginning with "str", including "str"
    You can use any non-alphanumeric character as a separator, that is, spaces, punctuation marks and non-printable characters.
    Note
    The search patterns 'str' and '.str.' are identical apart from a few exceptions. You must use '.str.' when the pattern str contains spaces (at the end), the '.' character (at the beginning and end), or the '*' character (at the end). You should also use '.str.' when the contents of the search string str is a variable, since you cannot predict when you write the statement what the contents of the string will be.
    The system does not distinguish between upper and lower case characters.
    The return code is set as follows:
    SY-SUBRC = 0:
    The search string g was found in the field f. SY-FDPOS contains the offset of the found string or the found word within the field.
    SY-SUBRC = 4:
    The search string g was not found in the field f.
    Addition 1
    ... ABBREVIATED
    Effect
    Searches the field f for a word containing the character string specified in the field. Here, the characters specified in g may be separated by other characters in the word. If the string g occurs in a word, the return code in system field SY-SUBRC is set to 0. The first letter of the search string g and of the word must match.
    Example
    DATA F(50).
    MOVE 'Alaska Texas California' TO F.
    SEARCH F FOR 'Clfrn' ABBREVIATED.
    Here, SY-SUBRC is set to 0, since not only does the string 'Clfrn' occur (separated by other characters) in 'California', but 'Clfrn' and 'California' begin with the same letter.
    Addition 2
    ... STARTING AT n1
    Effect
    Searches the field f starting from the position n1. Here, n1 can also be a field containing the corresponding value. The first character in the field f is in position 1.
    When you use the addition STARTING AT, the position specified for the found pattern in SY-FDPOS does not refer to the start of the field, but to the position n1.
    Addition 3
    ... ENDING AT n2
    Effect
    Searches the field f up to the position n2.
    Addition 4
    ... AND MARK
    Effect
    If the search string g is found, all the characters of the search string and all the characters occurring in between (in the case of SEARCH ABBREVIATED) are converted to upper case in the field f.
    Example
    DATA F(20) VALUE 'Peter Paul Mary'.
    SEARCH F FOR '*UL' AND MARK.
    SY-SUBRC is now set to 0, since the search string was found in 'Paul'. SY-FDPOS has the value 6, since the character string found starts at the offset 6. Also, the search string is marked, so that the new contents of f are as follows:
    'Peter PAUL Mary'
    Variant 2
    SEARCH itab FOR g.
    Additions:
    1. ... ABBREVIATED
    2. ... STARTING AT line1
    3. ... ENDING   AT line2
    4. ... AND MARK
    Effect
    Searches the internal table itab for the string in field g. The string can have the same format as in variant 1. The value of SY-SUBRC is set to 0, if the search string is found in the table. The system field SY-TABIX then contains the number of the table line where the string was found. Meanwhile, SY-FDPOS specifies the offset of the found string within the table line.
    Note
    The statement does not search the header line of an internal table itab.
    Addition 1
    ... ABBREVIATED
    Effect
    As with SEARCH ABBREVIATED, searches the internal table itab for a word that contains the character string specified in the field g. Here, the characters specified in g can be separated by other characters in the word. The return code value of the system field SY-SUBRC is set to 0, if the string g occurs in a word. The first letter of the search string g and of the word must match.
    Addition 2
    ... STARTING AT line1
    Effect
    Searches the internal table itab starting from line line1 to the end. line1 can be a field that contains the corresponding values.
    Addition 3
    ... ENDING AT line2
    Effect
    Searches the internal table itab up to the line line2.
    Addition 4
    ... AND MARK
    Effect
    If the search string g is found, all the characters of that search string and all the characters occurring in between (in the case of SEARCH ABBREVIATED) are converted to upper case in the internal table itab.
    Example
    Let T be an internal table which is empty:
    TYPES: BEGIN OF T_TYPE,
            LINE(80),
          END OF T_TYPE.
    DATA: T TYPE STANDARD TABLE OF T_TYPE WITH
                 NON-UNIQUE DEFAULT KEY,
          WA_T TYPE T_TYPE.
    MOVE 'Alaska Texas       ' TO WA_T.
    APPEND WA_T TO T.
    MOVE 'California Arizona ' TO WA_T.
    APPEND WA_T TO T.
    SEARCH T FOR '*ONA' AND MARK.
    SY-SUBRC is now set to 0 because the search string was found in 'Arizona'. SY-TABIX contains the value 2 because 'Arizona' appears in the second line of the table T. SY-FDPOS is set to 11 because the found character string begins at the offset 11. Also, the search string was marked in the second line in such a way that the contents of that line now look as follows:
    'California ARIZONA'
    Note
    Performance:
    Searching generically for a string in an internal table is much more runtime-intensive (approx. 5000 msn (standardized microseconds)) than searching for 'str' (approx. 20 msn). This was measured using a table with 200 entries and 10 fields.
    If you perform a search in a field which is 50 bytes long for 'str' or 'str', the runtime consumption is approx. 300 msn, whereas searching for 'str' takes about 15 msn.
    Regards,
    Raghav

  • Non supported character set: oracle-character-set-41

    Hi everyone,
    I have a issue while passing a VARRAY from my Java Class to Stored Procedure.
    TYPE ERR_DATA_ARRAY AS VARRAY(100) OF VARCHAR2(1000);
    In my code i have used ArrayDescriptor and ARRAY class of oracle.
    When i run my program in eclipse i get following exception:-
    java.sql.SQLException: Non supported character set: oracle-character-set-41
    at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
    at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:171)
    at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:135)
    at oracle.sql.CHAR.<init>(CHAR.java:159)
    at oracle.sql.CHAR.<init>(CHAR.java:183)
    at oracle.jdbc.oracore.OracleTypeCHAR.toDatum(OracleTypeCHAR.java:161)
    at oracle.jdbc.oracore.OracleType.toDatumArray(OracleType.java:166)
    at oracle.jdbc.oracore.OracleTypeCHAR.toDatumArray(OracleTypeCHAR.java:208)
    at oracle.sql.ArrayDescriptor.toOracleArray(ArrayDescriptor.java:1517)
    at oracle.sql.ARRAY.<init>(ARRAY.java:117)
    at com.niit.slims.common.ejb.Array_test.test(Array_test.java:52)
    at com.niit.slims.common.ejb.Array_test.main(Array_test.java:20)
    I have added ojdbc14.jar.And my working jdk is jdk1.4.
    Plz help
    Edited by: user10569173 on Dec 8, 2011 3:58 AM

    I am not an expert here,
    but it seems that since you are using ojdbc14.jar you may actually need the
    nls_charset12.jar
    instead of the one I suggested previously.
    Regards
    Peter

  • BufferedReader Problem (inserting space after every character)

    (This is a message I sent to an Aglet forum, however I thought maybe someone here could help me with the BufferedReader problem...with the spacing...read below)
    -Blake
    ok here's what I'm attempting to do.
    I have a Master Aglet that creates a slave which is dispatched to a remote site. The Slave then opens a log file, reads it, and then is supposed to read the file line by line and send each line as a message back to the Master. As the master receives each line it appends the line to the window it created earlier.
    I don't know what the problem is...it won't display the log file in the master window.
    It does display each line on the console window.I added a println() function to make sure the String array was getting the information. There is a small problem with that as well because it inserts a space after EVERY character (BufferedReader problem??)...what is up with that? for example:
    If the log file looked like: This is a log file entry.
    the console looks like this when it is printed: T h i s i s a l o g f i l e e n t r y .
    .... I had done something in a similiar program...and it worked just fine. here's some source code:
    <b>Master:</b>
    else if (msg.sameKind("Log")) {
    try {
    //println for testing purposes
    System.out.println(msg.getArg());
    appendMessage(" " + msg.getArg() + "test \n");
    } catch (Exception e) {
    System.out.println(e.toString());
    <b>Slave: </b>
    File log = new File("C:\\Aglets2.0.2\\public\\WINDOWSUPDATE.log");
    FileReader fr = null;
    try{
    fr = new FileReader(log);
    } catch (FileNotFoundException e) {
    System.out.println(e);
    BufferedReader br = new BufferedReader(fr);
    //Get filename of log
    try {
    Message msg = new Message("FileName", log.getName());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    //read each line of file and send back to Master as a message
    try{
    int i = 0;
    while ((s = br.readLine()) != null) {
    i++;
    count = i;
    for (int j = 0; j < count; j++)
    System.out.println(s[j]);
    //send message back to Master Aglet with log file information
    try {
    Message msg = new Message("Log", s[j]);
    mProxy.sendMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    //close file reader
    fr.close();
    } catch (IOException e) {
    System.out.println(e.toString());
    }

    actually i did declare s, you just don't see it there because i only posted some of the code....
    I fixed the "spacey" problem by using a FileInputStream instead of a bufferedreader....
    like this (i'll post the whole code here:
    public class Slave extends BlindAglet {
        AgletProxy mProxy = null;
        boolean back = false;
            char[] c = new char[1000];
        BufferedReader br = null;
        int count;
        // Do some tasks when the aglet is created
        public void onCreation(Object init) {
            // Must make a note of the master here
            mProxy = (AgletProxy)init;       
            // Add our own listener and adapter
            addMobilityListener(
                new MobilityAdapter() {
                    // Using this as a safety check in case we get caught in a loop in the same host
                    public void onArrival(MobilityEvent event) {                   
                        try {
                            mProxy.sendMessage(new Message("NewSlaveProxy", getAgletContext().getAgletProxy(getAgletID())));                                                            
                        } catch (InvalidAgletException iae) {
                            System.out.println(iae);
                        } catch (NotHandledException ex) {
                            System.out.println(ex);
                        } catch (MessageException ex) {
                            System.out.println(ex);
                        //Are we back to origin?
                            if(back) {         
                                 back = false;     
                                try{
                                     FileWriter fw = new FileWriter("test.txt");                                                                  
                                 for (int i = 0; i < count; i += 2){ 
                                           fw.write(c);
                             fw.close();
                        } catch (IOException e) {
                                  System.out.println(e);
                                  dispose();
                             dispose();
    ); /* End of Adapter */
    public void run() {
         // Are we at home base?
    if (atHome()) {
    try {
    dispatch(new URL("atp://darklord:4434"));
    } catch (Exception e) {
    System.out.println(e.toString());
         try{
         File log = new File("C:\\Aglets2.0.2\\public\\WINDOWSUPDATE.log");
         FileInputStream f0 = new FileInputStream(log);
    //Get filename of log
    try {
         System.out.println(log.getName());
    Message msg = new Message("FileName", log.getName());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
              //read each line of file and send back to Master as a message
              try{               
         int size = f0.available();
         int i = 0;
         for (i = 0; i < size; i++) {
              c[i] = (char) f0.read();
    //send message back to Master Aglet with log file information
                             try {
                        Message msg = new Message("Log", c[i]);
                        mProxy.sendOnewayMessage(msg);
              } catch (InvalidAgletException iae) {
                             System.out.println(iae.toString());
                        } catch (Exception e) {
                             System.out.println(e.toString());
    count = i;
              } catch (IOException e) {
                   System.out.println(e.toString());
                   } catch (FileNotFoundException e) {
                   System.out.println(e);
         back = true;      
         returnHome();
    * Returns true if the current host is our origin
    public boolean atHome() {
    if (getAgletInfo().getOrigin().equals(getAgletContext().getHostingURL().toString()))
    return true;
    else
    return false;
    * Allows a slave to contact it's master and ask for a retraction.
    public void returnHome() {
    try {
    Message msg = new Message("RetractMe");
    msg.setArg("url", getAgletContext().getHostingURL());
    msg.setArg("id", getAgletID());
    mProxy.sendOnewayMessage(msg);
    } catch (InvalidAgletException iae) {
    System.out.println(iae.toString());
    } catch (Exception e) {
    System.out.println(e.toString());
    * Return a reference to our Master's proxy
    public AgletProxy getMasterProxy() {
    return mProxy;
    } /* End of Class

  • How to set my character coding to 'Western ISO-8859-1' permanently?

    I am having a REALLY annoying problem here. I want to set my character encoding to 'Western ISO-8859-1' permanently. I am able to successfully change it for a while but a couple of minutes barely pass and it reverts back to 'Unicode', even if I am on the same page and idle. I need immediate help here, as I am not able to do an urgent task that requires my encoding to be set at 'Western'.

    Go to Tools -> Options, click on the tab Content. In the group "Fonts & Colours" click the button Advanced. In the windows that pops up, set the Default Character Encoding to Western (ISO-8859-1).

  • How set maximum character length in Fxml

    Hey can any body help me set Maximum character length in Fxml.
    thanx in advance

    I wrote my own TextField.
    I can't give you the code right now, but it's easy to create it by yourself.
    0 - create a private method that deletes any unwanted char/s: restoreRightLength();
    1 - Add a listener on the textProperty of your TextField/TextArea that calls restoreRightLength() method.
    2 - Override  the following methods:
    @Override
    public void replaceText(int start, int end, String text) {
    super.replaceText(start, end, text);
    restoreRightLength();
    @Override
    public void replaceSelection(String text) {
    super.replaceSelection(text);
    restoreRightLength();

  • Java.sql.SQLException: Non supported character set: oracle-character-set-17

    Hi,
    i am trying to execute an Oracle procedure from JDBC. The procedure accepts a Nested table as an input parameter. Definition of the nested table is given below.
    Database – Oracle 10g.
    Application Server – JBOSS 4.2.1
    I get the following exception._
    java.sql.SQLException: Non supported character set: oracle-character-set-178
    at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
    I.  JDBC  Code_
    Session s = HibernateUtil.getSession();
    Transaction tr = s.beginTransaction();
    con=s.connection();
    oraConn = (OracleConnection) con.getMetaData().getConnection();
    TableObject obj=new TableObject();
    obj.setId(new Integer(123));//Tested ok, stroing in DB
    obj.setDescr("test"); // this line throwing error
    obj.setCre_user(new Integer(456));
    obj.setUpd_user(new Integer(789));
    obj.setXfr_flag("Y");
    ArrayList al=new ArrayList();
    al.add(obj);
    Object[] objAray = al.toArray();
    ArrayDescriptor arrayDescriptor =ArrayDescriptor.createDescriptor("T_TEST_SYN", oraConn);
    ARRAY oracleArray = new ARRAY(arrayDescriptor, oraConn, objAray);
    cs = (OracleCallableStatement)oraConn.prepareCall("call PKG_OBJ_TEST.accept_ui_input(?) ");
    cs.setArray(1, oracleArray);
    cs.execute();
    tr.commit();
    public class TableObject implements SQLData{
    private String sql_type = "T_OBJ_TEST";
    private int id;
    private String descr;
    //private Date cre_date;
    private int cre_user;
    //private Date upd_date;
    private int upd_user;
    private String xfr_flag;
    public TableObject()
    public TableObject (int id,String descr,int cre_user,int upd_user,String xfr_flag)
    // this.sql_type = sql_type;
    this.id = id;
    this.descr = descr;
    // this.cre_date=cre_date;
    this.cre_user=cre_user;
    //this.upd_date=upd_date;
    this.upd_user=upd_user;
    this.xfr_flag=xfr_flag;
    public String getSQLTypeName() throws SQLException {
    return "T_OBJ_TEST";
    public void readSQL(SQLInput stream, String typeName) throws SQLException {
    //sql_type = typeName;
    id=stream.readInt();
    descr=stream.readString();
    //cre_date=stream.readDate();
    cre_user=stream.readInt();
    //upd_date=stream.readDate();
    upd_user=stream.readInt();
    xfr_flag=stream.readString();
    public void writeSQL(SQLOutput stream) throws SQLException {
    try {
    stream.writeInt(this.id);
    System.out.println("Iddddd");
    stream.writeString(this.descr);
    System.out.println("Desccccccccccccccc"+":"+descr);
    //stream.writeDate(cre_date);
    stream.writeInt(this.cre_user);
    System.out.println("userrrrrrrrrrrr");
    //stream.writeDate(upd_date);
    stream.writeInt(this.upd_user);
    System.out.println("upd uiserrrrrrrrrrr");
    stream.writeString(this.xfr_flag);
    System.out.println("flagggggggggggggggggggg"+xfr_flag);
    }catch (SQLException se) {
    System.out.println("Table object sql exception");
    se.printStackTrace();
    catch (Exception e) {
    System.out.println("Table object exception");
    * @return the id
    public int getId() {
    return id;
    * @param id the id to set
    public void setId(Object obj) {
    Integer iobj= (Integer)obj;
    this.id =iobj.intValue();
    * @return the descr
    public String getDescr() {
    System.out.println("getDescr "+descr);
    return descr;
    * @param descr the descr to set
    public void setDescr(Object obj) {
    System.out.println("setDescr "+obj);
    String sobj = (String)obj;
    this.descr=sobj.toString();
    System.out.println("setDescr "+obj);
    * @return the cre_user
    public int getCre_user() {
    return cre_user;
    * @param cre_user the cre_user to set
    public void setCre_user(Object obj) {
    Integer iobj=(Integer)obj;
    this.cre_user = iobj.intValue();
    * @return the upd_user
    public int getUpd_user() {
    return upd_user;
    * @param upd_user the upd_user to set
    public void setUpd_user(Object obj) {
    Integer iobj=(Integer)obj;
    this.upd_user = iobj.intValue();
    * @return the xfr_flag
    public String getXfr_flag() {
    return xfr_flag;
    * @param xfr_flag the xfr_flag to set
    public void setXfr_flag(Object obj) {
    this.xfr_flag = (String)xfr_flag;
    II.  Oracle database object details
    Details of Object and Nested table created in the database.
    T_TEST_SYN is a public synonym created for t_tab_obj_test
    CREATE OR REPLACE TYPE t_obj_test as object (
    id number(10),
    descr varchar2(100),
    --cre_date  date,
    cre_user number(10),
    --upd_date  date,
    upd_user number(10),
    xfr_flag varchar2(1),
    CONSTRUCTOR FUNCTION t_obj_test ( id IN NUMBER DEFAULT NULL,
    descr IN varchar2 default null,
    --cre_date  in date      default null,
    cre_user in number default null,
    --upd_date  in date      default null,
    upd_user in number default null,
    xfr_flag in varchar2 default null ) RETURN SELF AS RESULT ) ;
    CREATE OR REPLACE TYPE BODY t_obj_test as
    CONSTRUCTOR FUNCTION t_obj_test ( id IN NUMBER DEFAULT NULL,
    descr IN varchar2 default null,
    --cre_date  in date      default null,
    cre_user in number default null,
    --upd_date  in date      default null,
    upd_user in number default null,
    xfr_flag in varchar2 default null ) RETURN SELF AS RESULT IS
    BEGIN
    SELF.id := id ;
    SELF.descr := descr ;
    --SELF.cre_date  := cre_date ;
    SELF.cre_user := cre_user ;
    --SELF.upd_date  := cre_date ;
    SELF.upd_user := cre_user ;
    SELF.xfr_flag := xfr_flag ;
    RETURN ;
    END ;
    END ;
    CREATE OR REPLACE TYPE t_tab_obj_test AS TABLE OF t_obj_test ;
    CREATE OR REPLACE PACKAGE BODY PKG_OBJ_TEST AS
    PROCEDURE accept_ui_input ( p_tab_obj_test in T_TAB_OBJ_TEST ) IS
    BEGIN
    FOR row IN p_tab_obj_test.First .. p_tab_obj_test.LAST
    LOOP
    INSERT INTO OBJ_TEST ( ID,
    DESCR,
    CRE_DATE,
    CRE_USER,
    UPD_DATE,
    UPD_USER,
    XFR_FLAG )
    VALUES ( p_tab_obj_test(row).ID,
    p_tab_obj_test(row).DESCR,
    NULL,
    p_tab_obj_test(row).CRE_USER,
    NULL,
    p_tab_obj_test(row).UPD_USER,
    p_tab_obj_test(row).XFR_FLAG ) ;
    END LOOP ;
    COMMIT ;
    END accept_ui_input ;
    END PKG_OBJ_TEST;
    /

    Check your CLASSPATH enviroment variable. Try to add something like c:\Ora10g\jlib\orai18n.jar.
    From "JDBC Developer’s Guide and Reference":
    orai18n.jar
    Contains classes for globalization and multibyte character sets support
    This solved the same error in my case.

Maybe you are looking for