Nvarchar2 written incorrectly

We use JSF with ADF BC and want to enable unicode support. We changed the varchar2 columns to nvarchar2 and updated entities to this datatype, but national data are stored as question marks. As a test, I want to store the Cyrillic character "Й" (\u0419). I have this character in a string, populate a Row attribute with that String, but a question mark is stored to DB:
String s = "\u0419";
r.setAttribute("Lirscl", s);
byte[] b = ((String)r.getAttribute("Lirscl")).getBytes("utf-16");
for (int i = 0; i < b.length; i++)
  System.out.println(i+": " + b);
b = s.getBytes("utf-16");
for (int i = 0; i < b.length; i++)
System.out.println(i+": " + b[i]);
am.getTransaction().commit();
r.refresh(r.REFRESH_WITH_DB_FORGET_CHANGES);
b = ((String)r.getAttribute("Lirscl")).getBytes("utf-16");
for (int i = 0; i < b.length; i++)
System.out.println(i+": " + b[i]);
The output is:
0: -2
1: -1
2: 4
3: 25
0: -2
1: -1
2: 4
3: 25
0: -2
1: -1
2: 0
3: 63Character "/u0063" is a question mark.
When this character is found in DB, it displays correctly:
update my_table set lirscl=unistr('\0419') where ...;What's confusing me is that eastern european characters (like \u010d: "č") are stored correctly to nvarchar2 (as they were to varchar2). Our database character set is iso-8859-2, I tested with thin as well as oci driver.
What could be the problem?
Thanks in advance,
Viliam

I have searched the docs and the web and found out several ways to do it. You have to either call setFormOfUse for each NCHAR column or set defaultNChar property (on system or connection level).
First is not possible, as I don't have access to Statement object (btw, why ADF BC does not handle it automatically, it could determine the column type at design time...). Using defaultNChar is possible, but with "substantial performance impact" (see http://download-uk.oracle.com/docs/cd/B14117_01/java.101/b10979/global.htm#sthref931). And it even can cause problems to CLOB (not NCLOB) columns, see Issues with defaultNChar in http://www.nwsummit.com/tech/oracle.html
I'd like to ask:
* is there a way to make ADF BC call setFormOfUse?
* is there a way to set defaultNChar=true as a connection property (to isolate impact only to one application on the server)?
* is there any other good generic way to work with NCHARs?
I use JDeveloper 10.1.3.0.4 (SU5), ADF BC and JSF.
Thanks a lot, Viliam

Similar Messages

  • Problem with Join Queries using PHP and an Orcale Database

    Ok, I am trying to build a simple php querying tool for my oracle database and for the most part it is working however I am having a problem getting data from my join queries. If I run the following query :
    QUERY:
    SELECT lastfirst,EnteredBy,Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    Lastfirst     EnteredBy     Debit
    caiu, test      204     1
    But when I run the query correctly I get no results
    QUERY:
    SELECT sts.lastfirst,gl.EnteredBy,gl.Debit FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    sts.lastfirst     gl.EnteredBy     gl.Debit
    and if I run the query combining the two above methods and adding a field (schoolid) that has the same name on both table I get the following result sets
    QUERY:
    SELECT lastfirst,EnteredBy,Debit,sts.schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    lastfirst     EnteredBy     Debit     sts.schoolid
    caiu, test      204     1     
    QUERY:
    SELECT lastfirst,EnteredBy,Debit,schoolid FROM students sts JOIN GLDetail gl ON gl.studentid=sts.id
    RESULT SET:
    NONE
    Therefore, I have to have something written incorrectly in my php code and I just can not figure it out. My entire code is pasted below please provide me with an assistance you might have to offer. I have change the odbc_connec line so I could post it to this forum. In addition, I had to phrase out the column headers there for when you write the column headers you have to use ~ instead of , as the separator and then I turn back into the correct format for sql.
    //These scripts just open help windows if somone clicks on the icon
    <script>
    function submit()
    {document.sqlform.submit();}
    </script>
    <script>
    function colwin(){
    window.open("colnames.php",null,"height=300,width=400,scrollbars=1");}
    </script>
    <script>
    function tabwin(){
    window.open("tablenames.php",null,"height=300,width=400,scrollbars=1");}
    </script>
    <script>
    function help(){
    window.open("http://www.w3schools.com/sql/default.asp",null,"height=500,width=700,scrollbars=1");}
    </script>
    <form method="post" action="<?php echo $PHP_SELF;?>" name="sqlform">
    <?php
    //Cookie to check for authorization to the site
    if($_COOKIE['cookie']=="CheckCookieForAuth")
    //These get the values of the textareas after the form has been submitted
    $sqlSELECT = $_POST["SELECT"];
    $sqlFROM = $_POST["FROM"];
    $sqlJOIN = $_POST["JOIN"];
    $sqlWHERE = $_POST["WHERE"];
    $sqlOTHER = $_POST["OTHER"];
    $sqlSELECTTYPE = $_POST["SELECTTYPE"];
    //This is the variable used to parse out my headers the user entered
    $sqlColNames = split('~',$sqlSELECT);
    //This converts the ~ separator to , so I can actually use it as part of my sql string
    $search = array('~');
    $replace = array(',');
    $mystring = $sqlSELECT;
    $sqlString = str_replace($search, $replace, $mystring);
    //These are the textareas and the drop down options that the end users has to create queries
    echo "<table border=0>";
    echo "<tr><td valign='top'>";
    echo "<B>SELECT TYPE</B> <BR><SELECT NAME=SELECTTYPE>
    <OPTION VALUE='SELECT' SELECTED>SELECT</OPTION>
    <OPTION VALUE='SELECT DISTINCT'>SELECT DISTINCT</OPTION>
    <OPTION VALUE='INSERT'>INSERT</OPTION>
    <OPTION VALUE='UPDATE'>UPDATE</OPTION>
    <OPTION VALUE='DELETE'>DELETE</OPTION>
    </SELECT>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=SELECT wrap=physical>$sqlSELECT</textarea>";
    echo "</td><td valign='top'>";
    echo "<img src='images/sqlC.jpg' width='25' height='25' onclick='colwin()'>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>FROM</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=FROM wrap=physical>$sqlFROM</textarea>";
    echo "</td><td valign='top'>";
    echo "<img src='images/sqlT.jpg' width='25' height='25' border=0 onclick='tabwin()'>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>JOIN</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=JOIN wrap=physical>$sqlJOIN</textarea>";
    echo "</td></tr>";
    echo "<tr><td valign='top'>";
    echo "<b>WHERE</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=WHERE wrap=physical>$sqlWHERE</textarea>";
    echo "</td></tr>";
    //This is where the end user would enter group by, having, order by, etc..
    echo "<tr><td valign='top'>";
    echo "<b>OTHER</b>";
    echo "</td><td>";
    echo "<textarea rows=2 cols=75 name=OTHER wrap=physical>$sqlOTHER</textarea>";
    echo "</td></tr>";
    This is a run query icon and a help icon
    echo "<tr><td colspan=2 align=right>";
    echo "<img src='images/RunQuery.jpg' width='30' height='28' onclick='submit()'> <img src='images/qm.jpg' border=0 width='25' height='25' onclick='help()'>";
    echo "</td></tr></table>";
    echo "<br>";
    echo "<br>";
    //This is where I connect to my remote oracle database
         $conn=odbc_connect('ODBC_ConnectionName','USERNAME','PASSWORD');
    //This is the sql string created by the end users
         $sql="$sqlSELECTTYPE $sqlString FROM $sqlFROM $sqlJOIN $sqlWHERE $sqlOTHER";
    //This executes the connection string and the sql string
         $rs=odbc_exec($conn,$sql);
    //This will display the query or a message if the query is empty
         if($rs!=NULL){
         echo "<table border=1>";
         echo "<tr>";
    //This loops through the string array the end user enter the field name text area to get column headers
         for($i=0; $i<count($sqlColNames); $i++)
         echo "<td>";
         print_r($sqlColNames[$i]);
         echo "</td>";
         echo "</tr><tr>";
    //This actually fetchs the rows from the statement and then display the data based on the column names the end user speificed
         while (odbc_fetch_row($rs))
              for($i=0; $i<count($sqlColNames); $i++)
                   $results=odbc_result($rs,$sqlColNames[$i]);
                   echo "<td>$results</td>";
              echo "</tr>";
         odbc_close($conn);
         echo "</table>";}else{echo "Results will be displayed here";}
    echo "<br><br>";
    echo $sql;
    else
    echo "Not logged in";
    ?>
    </form>

    This looks more like a SQL question than a PHP issue. There are a couple of JOIN examples at http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10002.htm#i2066611 that might you work through the problem.

  • Undo,redo not working properly with JPopupMenu

    if i use JButton for undo ,redo it is working fine. but the same code is not
    working properly if i add it in JPopupMenu.
    what could be the problem.
    thanks

    what could be the problem.Your code is different or written incorrectly and since you didn't post any we can't help.
    [url http://java.sun.com/docs/books/tutorial/uiswing/misc/action.html]How to Use Actions
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • This method should not be called anymore. The client was already released i

    Hi,
    while configuring Business Packager for Projects 50.3 fo, we made few changes in R/3 side as per the documentation. after that we are getting following error in portal
    "This method should not be called anymore. The client was already released into the pool or the pool entry was deleted"
    all the chages were reverted in R/3 system still we are getting the same error.
    Can any one help on this issue....
    Thanks in advance and for early responce higher marks would be awarded!!!..     
    Regards
    Ravi Sankar Karri

    Hi,
    Well there were errors in how stop works:
    "Stopping a thread with Thread.stop causes it to
    unlock all of the monitors that it has locked (as a
    natural consequence of the unchecked ThreadDeath
    exception propagating up the stack). If any of the
    objects previously protected by these monitors were in
    an inconsistent state, the damaged objects become
    visible to other threads, potentially resulting in
    arbitrary behavior. "
    I do understand that you want to have something like
    killTheTreadIDontCareAboutConcequences-method, but
    it's better to let all your methods that you want to
    be able to terminate take a timeout argument, and deal
    with the termination in the method. (Close the
    sockets/streams etc that you are blocking on).
    /KajThe point is, it is not always possible to make those blocking methods stop, via some magic "timeout" thingamabob. The bottom line is still that the blocking methods were written incorrectly to begin with (to possibly block indefinitely), so one cannot come up with an across-the-board solution, other than getting the root cause fixed in the first place. However, one is not always in control of fixing the root cause.

  • Why are some of the things I write in Notes underlined in red dashes?

    When I type something in Notes, sometimes a word or phrase will get red dashed lines under the word.  I assume it believes the word or phrase is written incorrectly.  How do I get these lines to go away?

    Means the word is misspelled. You could turn off Auto-Correction, but that turns if off everywhere, or tap on the word to see suggestions & then reject the suggestions.

  • Not Yet Documented Array Example as JSP doesn't work.

    Example:
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    Steve, in the Not yet documented examples, you have an Array of String Domain Example. We tried to modify this to create a simple struts flow that sets up the view with some parameters and then shows a datapage of the results.
    When run in batch mode, you get:
    Validation Error
    You must correct the following error(s) before proceeding:
    JBO-28302: Piggyback write error
    oracle.sql.CharacterSet1Byte
    JBO-29000: Unexpected exception caught: oracle.jbo.InvalidOperException, msg=JBO-25063: Operation getCurrentRowSlot cannot be performed because the working set object is not bound.
    JBO-25063: Operation getCurrentRowSlot cannot be performed because the working set object is not bound.
    the 28302 and 25063 errors are undocumented.
    If you switch to Immediate mode, it works.
    Similarly, we tried to use a numeric Array in our current project to filter a view of records to a specific client list (client and his associations). The view renders OK the first time, but when you click a setCurrentRowWithKey hyperlink, the view ends up getting "refreshed" so that our JSTL expressions that point back to this "master page" bindings, i.e. ${data.MasterPageUIModel.ViewPfRptsDueView1} show incorrect data.
    Normally, if you drop a view object on the page, and have a setCurrentRowWithKey, then navigate to a detail set, it RETAINS the row selected when you return to this view. Without changing ANYTHING else, other than the where clause to read: client_id in (' || my_client_list ||')', it worked perfectly. It also worked perfectly if we switched our sync mode to: Immediate instead of batch.
    Can you/anyone elaborate why it works in one mode and not in another?

    Repost.
    Here's a section of the batch mode bc4j.log:
    [221] Array.getInternalArray(281) Warning:No element type set on this array. Assuming java.lang.Object.
    [222] RuntimeViewRowSetIteratorInfo.rangeRefreshed(1266) [RangeRefreshEvent: EmpArrayView1 start=0 count=3]
    [223] Diagnostic.printStackTrace(405) java.io.NotSerializableException: oracle.sql.CharacterSet1Byte
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    =====> at oracle.jbo.domain.Array.writeObject(Array.java:748)
    ... [ much removed ] ...
    NOTE [221] and [223].
    It appears to work in batch mode, if you make a call to the array method: useElementType, i.e.
    arr = new Array(descriptor,conn,names);
    arr.useElementType( java.lang.String.class);
    However, this method appears to be written incorrectly. IF I just change the array.java useElementType method to read:
    public void useElementType( Class claz )
    if ( mElemType == null )
    mElemType = claz;
    instead of:
    public void useElementType(Class claz)
    if (mElemType != null)
    mElemType = claz;
    it works.
    I'm just trying to get some closure on this.

  • VCAP5-DCD Experience

    Hello,
    Last week i passed my VDCD550 exam and got VCAP5-DCD certification, so i guess i have some experience to share.
    Last few years i worked at PM/management positions at various integrators but recently decided to go more technical again. So i updated my VCP4 to VCP5 in february and was ready to study for VCAP exams. I decided to go with VCAP-DCD, as, to be honest, i didn't have much hand-on implementation/administration expirience last few years. On other hand, i have pre-saled and designed some environments, so choose design path was obvious decision.
    My studing materials were:
    VMware Press – Official VCAP5-DCD Certification Guide
    VMware vSphere Design by Forbes Guthrie & Scott Lowe
    VMware vSphere 5.1 Clustering Deepdive by Duncan Epping & Frank Denneman
    Managing and Optimizing VMware vSphere Deployments  by Sean Crookston and Harley Stagner
    vSphere Design Pocketbook eBook by Frank Dennenman
    My notes from VCP5 preparations (lifehack: i use Microsoft OneNote for various work and personal life related notes and it just awesome, it has really nice Windows desktop app, plus it stores data in the cloud, so you can always use mobile apps to check on content and alter it a little bit, if necessary)
    Articles and white papers from exam blueprint
    Great series of "Architectural Decisions" posts by Josh Odgers http://www.joshodgers.com/architectural-decisions/
    It was obviously overkill, as you don't need so much data to pass exam (and to be honest, deep technical knowledge isn't needed to pass it), but as i plan to pursue this field of work futher (and may be even continue to VCDX certification), more knowledge won't hurt.
    When studying it's better to pay close attention to definitions of requirements, assumptions, constraints, risks and differences between them. Sometimes they are close to each other and phrasing matters very much. Good thing to do is review design you have previously completed at work and write down requirements, assumptions, constraints and risks.
    Another point to pay attention to is how exactly are example designs in VMware documentation drawn, something like that will be expected from you. For example, during my exam there was one design 'visio like' question about storage. I've drawn all the objects and almost all connections and then was stuck with ALUA optimized/unoptimized paths. I mean i knew how it would work in real life but i just couldn't figure out how design tool was expecting me to draw it. Design tool kept on giving me error message that i cannot use this connector this way.
    Critical skill for this exam is ability to map customers words and wishes to specific features and configurations. Descriptions might sound very unspecific and sometimes even cryptic, but hey, in real world customer very rarely give you structured and well-thought requirents either.
    Apart from reading, it's very useful to complete some designs just to arrange your mind in proper way I used this:
    Review of previously completed customer desings. Try to use same approach as Josh Odgers in previously mentioned article series: determine requirements, justify your decision, think about alternatives.
    Paul McSharry's practice DCD scenarios: http://www.elasticsky.co.uk/practice-questions/. Use same approach.
    On-line practice exam http://www.virtualtiers.net This tool is absolutely fantastic, as it gives you look and feel of actual exam. It considerably lowered my stress level
    Prepartions took about 1,5 months and i thought i was ready.
    Now to the exam itself. First, there is no test center certified for VCAP exams in my town, so i had to wake up at 4:00 in the morning and drive 5 hours to certified test center. On the bright side i had additional 30 minutes to exam time, as i live in Russia there is time bonus for non-native English speakers.
    So, it was 42 questions and 4 hours to go for me. And it's when funny thing happened. I either misread exam description or it was written incorrectly (though i guess it was the first ), but at that point i was sure, that after that 42 questions i will have another 8 design question and exam description strongly recommended to reserve at least 2 hours and 15 minutes for those 8 questions. In fast, those 8 questions was included in total exam question count.
    As you see, at the moment it seemed to me i had to complete 42 questions in less than 2 hours and then take hardest part of exam. Luckily i was wrong, but as i've seen clock ticking, i became more and more nervous. Due to that i didn't gave some of the questions much thought (maybe for the better, as overthingking something sometimes worse then underthinking). Anyway, i was done with 42 questions,there was still hour and half left, and, to my (very pleasant!) surprise it was all, i passed with 346 score. Well, it may have been higher, if not my description reading mistake, but a pass is a pass.
    To summ it up:
    Know requirements, assumptions, constraints and risks. Practice determining them from practice tasks and real world situations.
    Know differences between conceptual, logical and physical design
    Know how logical and physical design diagrams should be drawn from VMware point of view
    Try to think as an architect, always justify your design decisions, think about possible alternatives
    Design some enviroments (even completely imaginary), or review designs you did at work. View this as a little mind game for spare time, if you have to sit in the car and wait 15 minutes for your girlfriend - why not design a cluster meanwhile?
    Hope it helps.
    As for me, i'm now studying NSX and it's definitely amazing piece of tech. When VCIX6-DCV will be available, i'll try to pass implementation exam and yearn this certification.

    Hi Yak
    Thanks for the write up, I'm planning to have a first shot within a week or so.
    Though I'm a little puzzled, the 3.4 blueprint states 46 questions, including 6 using the design tool (Visio like), plus 1 master design item, for which a MINIMUM of 30 minutes should be allocated.
    Wasn't it clear which was the master item?
    When you mentioned "one" visio that gave you problems, you mean one of the 6 visio type questions I asume

  • Noob question: How to update very basic as2 code to as3.

    I've been asked to update a web banner with old as2 code, and not being a coder or a regular Flash user, I'm stuck with what I'm sure is a simple problem. The code in the opening frame is;
    function timeOut(pauseTime) {
      stop();
      pauseTimer = setInterval(this, "goPlay", pauseTime);
    function goPlay() {
      play();
      clearInterval(pauseTimer);
    After that there are a few frames that include timeOut(500); code, which seems basic enough, so I imagine my problems are all in the opening code.
    I get 4 errors that all refer to Frame 1;
    1120: Access of undefined property pauseTimer.
    1067: Implicit coercion of a value of type CapOne_MM_648x480b_fla:MainTimeline to an unrelated type Function.
    1067: Implicit coercion of a value of type String to an unrelated type Number.
    1120: Access of undefined property pauseTimer.
    Can anyone help or point me in the right direction? Thanks.

    For the code you show there would be no need to convert to AS3 since between AS2 and AS3 it hasn't changed.  One thing you do need to do is declare variables and since pauseTimer is used in mutliple functions it needs to be declared outside any functions.  Another thing you need to do is specify the variable types, including the arguments passed into function.  As for the setInterval call itself it appears to be written incorrectly....
    var   pauseTimer:Number;
    function timeOut(pauseTime:Number) {
          stop();
         pauseTimer = setInterval(goPlay, pauseTime);

  • Why this weird opinion on firefox 12 etc. ?

    ddepietro asked this:Please let me know if Mozilla will work on Windows XP after Microsoft stops their support of XP in April 2014?
    The answer was: Helpful Reply
    Diego Victor said this below.
    Firefox will work in Windows XP, but doesn't work in windows with Service Pack 1 and 2(Service Pack i'm not 100% sure), but in Service Pack 3 yes.
    Seems incorrect. Seems the opposite of the firefox website info! I am honest! Look at it yourself.
    Why the wrong answer written incorrect?
    Previous scholars on firefox including their own website said:
    Mozilla says: Firefox 3.6.28 and Firefox 12 are the last versions of Firefox that will work with the original version of Windows XP and Windows XP Service Pack 1.
    Is Firefox saying that firefox 9 and earlier will not work?
    I tried firefox 9 and it works well. Why did firefox lie? It says they are the last versions that will work. What does last versions of Firefox will work mean? Last versions!
    jscher2000 said:
    I'm not sure I understand your question. Firefox 12 being the last version to support XP without SP2 implies that Firefox versions 4-11 would also work on XP without SP2.
    cor-el said:
    The last version means that version released after Firefox 12 i.e Firefox 13 and later, including the current Firefox 24 release won't work. All older Firefox versions will still work on Windows XP SP1.
    http://www.mozilla.org/en-US/firefox/13.0/system-requirements/
    http://www.mozilla.org/en-US/firefox/12.0/system-requirements/
    http://www.mozilla.org/en-US/firefox/11.0/system-requirements/
    last question.
    Will firefox 12 work with windows xp and windows xp sp1?

    I guess you missed my reply in
    https://support.mozilla.org/en-US/questions/987005 for ddepietro.
    '''michael1thehistorian wrote:''' ''last question. Will firefox 12 work with windows xp and windows xp sp1? ''
    This is what cor-el and jscher2000 said so '''Yes'''.
    You should continue in your original thread if you had questions still. https://support.mozilla.org/en-US/questions/975060

  • Swing EDT

    I'm working on a project where we have problems with deadlock due to incorrectly executing code outside of the EDT. I'm just trying to understand what exactly happens when code is written incorrectly like this. Does the entire code including the painting get executed on the non-EDT thread or does the EDT ultimately try take over at some point to do the actual painting?

    Thanks for the replies everyone. To get things back on topic, a couple of follow up questions
    Aephyr wrote:
    I'm working on a project where we have problems with deadlock due to incorrectly executing code outside of the EDT.I'm sure the execution as performed by the JVM is executing the code correctly. Maybe you mean incorrectly coded execution?
    Yes you are correct.. i meant incorrectly coded execution
    Also, I've been experimenting with the CheckThreadViolationRepaintManager described on [Alexander Potochkin's blog|http://weblogs.java.net/blog/alexfromsun/archive/2006/02/debugging_swing.html]. This utility provides a nice simple means of detecting coding violations of the EDT rules. I realize that the best solution is to fix any code that violates the EDT rules. However, I'm wondering if it is possible to extend this CheckThreadViolationRepaintManager beyond just detecting violations and to try 'fix' them at runtime..
    e.g. something like this      public synchronized void addInvalidComponent(JComponent component) {
              if (checkThreadViolations(component)) {
                   SwingUtilities.invokeLater(new EDTRunner(component, this));
              else{
                   super.addInvalidComponent(component);
    class EDTRunner implements Runnable {
              private JComponent component;
              private CheckThreadViolationRepaintManager repaintManager;
              public EDTRunner(JComponent component,
                        CheckThreadViolationRepaintManager repaintManager) {
                   this.component = component;
                   this.repaintManager = repaintManager;
              public void run() {
                   repaintManager.callSuperInvalidComponent(component);
    }Or at this point is it too late in the call to make it thread safe?
    Edited by: oochie on Mar 17, 2010 5:04 PM

  • Error #1006 Problem

    Hi I'm getting this error and can't figure out why.
    error#1006 addEventListener is not a function -at the following class.
    Here's the class where it says I'm having the problem, it's one of 4 classes I'm working with:
    package mvc
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    public class PlayerShipView extends MovieClip
    private var _model:Object;
    private var _controller:Object;
    private var _playerShip:PlayerShip;
    public function PlayerShipView(model:Object, controller:Object):void
    _model = PlayerShipModel;
    _model.addEventListener(Event.CHANGE, changeHandler);
    _controller = PlayerShipController;
    _playerShip.x = _model.xPos;
    _playerShip.y = _model.yPos;
    _playerShip = new PlayerShip;
    addChild(_playerShip);
    addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    public function onAddedToStage(event:Event):void
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyUp);
    removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    public function onKeyDown(event:KeyboardEvent):void
    _controller.processKeyDown(event);
    public function onKeyUp(event:KeyboardEvent):void
    _controller.processKeyUp(event);
    public function changeHandler(event:Event):void
    _playerShip.rotation = _model.rotationValue;
    If anyone knows why I'm getting the error please let me know. Thanks

    sorry I had the code written incorrectly, Ifixed it and now get this error, error#1009 cannot access a property or method of null object reference
    package mvc
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    public class PlayerShipView extends MovieClip
    private var _model:Object;
    private var _controller:Object;
    private var _playerShip:PlayerShip;
    public function PlayerShipView(model:Object, controller:Object):void
    _model = model;
    _model.addEventListener(Event.CHANGE, changeHandler);
    _controller = controller;
    _playerShip.x = _model.xPos;
    _playerShip.y = _model.yPos;
    _playerShip = new PlayerShip;
    addChild(_playerShip);
    addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    public function onAddedToStage(event:Event):void
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
    stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyUp);
    removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
    public function onKeyDown(event:KeyboardEvent):void
    _controller.processKeyDown(event);
    public function onKeyUp(event:KeyboardEvent):void
    _controller.processKeyUp(event);
    public function changeHandler(event:Event):void
    _playerShip.rotation = _model.rotationValue;
    Thanks, sorry about the screwup

  • No mapping at the fault address error while accessing the string variable

    Hi
    we have a application which runs fine on AIX and HP but is throwing error on SOLARIS.
    the application runs well (and use of string variables are also working fine ) till it hits Zone.cpp file
    where the string variable is not getting initialized and throws no mapping at the fault address
    the code snippet is as follows
    #include <string>
    #include <vector>
    const string ZONE_ATTR_TYPE_ZN("ZN");
    const string ZONE_ATTR_TYPE_FC("FC");
    const string ZONE_ATTR_TYPE_ST("ST");
    void Zone::AddAttributeValueAndCountryCode(const string &attributeValue,
                                                      Int attribSeq,
                                                      const string &countryCode,
                                                      ZoneSearchLocMap& zoneSearchLocMap)
         string key = "";
         if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
              (_attributeType == ZONE_ATTR_TYPE_CT))
              key = _attributeType+DELIM+attributeValue;
    we are running it on
    CC: Sun C++ 5.9 SunOS_sparc Patch 124863-04 2008/04/16
    compiled with these option
    -g0 -xspace -KPIC -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL
    and the created the execuatble with these option
    -i -z rescan -g0 -xspace -mt -D_XPG5 -m32 -xarch=sparcvis -mt -DNCURSES -DEXC_HANDLING -DRW_NO_BOOL -lpthread -lsocket -lnsl -ldl -lposix4 -lCrun -lCstd -lc -lm -lnsl -lsocket
    the dbx output
    t@1 (l@1) program terminated by signal SEGV (no mapping at the fault address)
    where -h
    Current function is Zone::AddAttributeValueAndCountryCode
    56 if ((_attributeType == ZONE_ATTR_TYPE_FC) ||
    (dbx) where -h
    current thread: t@1
    =>[1] Zone::AddAttributeValueAndCountryCode(this = 0x194c088, attributeValue = CLASS, attribSeq = 1, countryCode = CLASS, zoneSearchLocMap = CLASS), line 56 in "Zone.cpp"
    [2] ZoneLoader::Load(trans = CLASS, zoneList = CLASS, prZoneList = CLASS, zoneSearchLocMap = STRUCT, planningCompany = 0x1890f20), line 90 in "ZoneLoader.cpp"
    [3] ZoneManager::ZoneManager(this = 0x1933e28, shipperId = 1000, consDBConnection = CLASS), line 24 in "ZoneManager.cpp"

    I see you are compiling with -KPIC. Is the code going into a shared library?
    Run "ldd" on all the C++ shared libraries you create, and on the main program. You should see a dependency on /usr/lib/libCrun.so.1 and /usr/lib/libCstd.so.1, and no dependency on any other libCrun or libCstd.
    Do you have a particular reason for using -D_XPG5? Changing the Unix version presented by the system headers in /usr/include can sometimes create incompatibilities with the C++ headers and runtime libraries that are intended for the default Unix version.
    Are all of the object files created with the same options, especially the -mt option?
    If none of the above considerations raise any red flags, you might have run into a bug in the compiler or the C++ runtime libraries, or you might have a bug in your code that by accident does not show up in other environments.
    There is no way to evaluate whether you have a compiler or runtime library bug without a test case that demonstrates the problem.
    You might have heap or other data corruption in your program due to invalid pointer use, use of an uninitialized variable, reading or writing outside the bounds of an object, double deletion of an object, use of an object after it has been deleted. You might also have an MT programming error where a critical region is not properly guarded, or where a shared variable is not declared volatile.
    By accident, data can be read or written incorrectly, or a data-race condition can exist, but without causing program failure. A program containing these errors can appear to run successfully on one platform and fail on another, or on the same platform under other conditions.
    Running the program under dbx with Run-Time Checking enabled will show many of these errors.
    The Thread Analyzer can find data race conditions.
    If you think you have found a problem with the compiler or libraries, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to show the problem.

  • Best way to ensure combinations from the ValidationSet parameter attribute are processed correctly in PowerShell without using multiple IF statements?

    I have an advanced function I have been working on that looks something like this:
    Function Do-Something
    [cmdletbinding()]
    Param
    [Parameter(Mandatory=$true,
    [ValidateSet('Yes', 'No', 'Y', 'N', IgnoreCase = $true)]
    [string[]]$Param1,
    [Parameter(Mandatory=$true,
    [ValidateSet('Yes', 'No', 'Y', 'N', IgnoreCase = $true)]
    [string[]]$Param2,
    [Parameter(Mandatory=$true,
    [ValidateSet('Yes', 'No', 'Y', 'N', IgnoreCase = $true)]
    [string[]]$Param3
    Begin {}
    Process
    My question is, how do I get the values such as "Yes", "Y", "No", and "N" that's located in the [ValidateSet()] validation attribute processed correctly without having to use multiple "If" and "ElseIf"
    statements. 
    For instance, I want to avoid the following, because I know there is a faster and more efficient way (less typing) to do it:
    If ($param1 -match "Yes" -or "Y" -and $param2 -match "Yes" -or "Y" -and $param3 -match "Yes" -or "Y")
    #Do something here
    ElseIf  ($param1 -match "No" -or "N" -and $param2 -match "Yes" -or "Y" -and $param3 -match "Yes" -or "Y")
    #Do something
    I was reading that splatting may help me here, but I am new to the splatting technique and need some help with this one.
    I appreciate any help that anyone can offer. 
    Thanks

    Is this what you are trying to ask how to do?  Your posted script is written incorrectly and will not work at all. 
    Function Do-Something{
    [cmdletbinding()]
    Param (
    [Parameter(Mandatory=$true)]
    [ValidateSet('Yes','No','Y','N')]
    [string]$p1,
    [Parameter(Mandatory=$true)]
    [ValidateSet('Yes','No','Y','N')]
    [string]$p2
    Begin{
    Process{
    # parse the strings to booleans
    $p1a=if($p1 -match 'Yes|Y'){$true}else{$false}
    $p2a=if($p2 -match 'Yes|Y'){$true}else{$false}
    if($p1a){Write-Host 'P1 is good' -ForegroundColor green}
    if($p2a){Write-Host 'P2 is good' -ForegroundColor green}
    if($p1a -and $p2a){
    Write-Host 'All conditions met' -ForegroundColor green
    }else{
    Write-Host 'Conditions not met' -ForegroundColor red
    PS C:\scripts> Do-Something Y n
    P1 is good
    Conditions not met
    PS C:\scripts> Do-Something n n
    Conditions not met
    PS C:\scripts> Do-Something y y
    P1 is good
    P2 is good
    All conditions met
    This handles case and creates a tracking Boolean fo reach parameter so you can just build simple logic.
    ¯\_(ツ)_/¯

  • ICal doesn't install correctly when reinstalling Mac Tiger OS X

    I have been trying to help my dad with his Mac. This weekend we went ahead and wiped out the hard drive and reinstalled Mac Tiger OS X. When it came to installing Disk 2 (he doesn't have a DVD) it said error installing iCal, and we had to restart and install Disk 2 again. This happened about 7 times and we gave up. In the Log Viewer Mac say the iCal files are too big, and the second line mentions that some iCal file are written incorrectly.
    I was wondering if we can start all over again and begin with Disk 1 or skip installing iCal.
    Can someone help us please?!?
    Thanks!
    Bernie

    If the computer isn't connected to the Internet, download the Pacifist dmg file on another machine and then transport it to the computer where you are trying to install iCal to. If you download it on a PC, don't attempt to open the downloaded file on the PC.
    (14604)

  • CS 6; jQyery UI, and Spry

    Greetings.   I have recently installed Dreamweaver CS6 and in the insert panel I see jQuery Mobile, and Spry.   I thought Spry had been replaced with jQuery UI starting version 5.5, but jQuery UI is not anywhere in the insert panel.    Can someone eplain the error in my assumption?
    Thanks in advance.

    jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. It is open source and everyone is invited to create plugins for it. jQuery is also a real pain. If you didn't write the plugin, you're on your own for future compatibility with the jQuery API. If something is written incorrectly or if something doesn't work, you really have no guaranteed place to go for help or technical support. Also, jQuery is more than mobile—it works on desktop computers as well.
    The Spry Framework is an open source Ajax framework developed by Adobe Systems which is used in the construction of Rich Internet applications. It's designed for designers, not developers. Adobe abandoned it and gave it over to Github, where it's a lot like jQuery: supported on an ad-hoc basis by people who are writing the code.
    Adobe dropped jQuery support after adopting it. So I'm not sure which way they are going to jump here.
    Both are valid and both work. But the best way to work with these tools is to learn how to call the code and learn how to call the plugins.
    -Mark

Maybe you are looking for

  • Post Cost of Sales in PS after Result Analysis

    Hi SAP experts, I'm testing SAP EC&O best practice solution at this moment. I executed KKAJ (results analysis) and both Cost of Sales and WIP were calculated correctly. COS: for a TECO WBS, which already have billing document WIP: for other WBS which

  • SALES/PUR Register

    Dear Sir, we have implimented SAP in our organisation recently,, we nee Help for how to download VAT Register for Out Put Tax & Also for Input VAT Register. Pl help us out as we need to submit return as on 22.02.2011 Thanks. Rajan Bhatt.

  • User exits For Vl01n

    i want to block the delivery aftercycle closing in VL01N for shipping point 1103 selection date not more that 3 days after closing. For Order Type Is 2873 1901 2902 A popup Message Will Apper If Delivery Is After  Day's . So How Can I Solve This Issu

  • If I buy an iPhone5 in Canada and add Applecare in the US, can I use and get my phone serviced in the US?

    If I buy an iPhone5 in Canada and add Applecare in the US, can I use and get my phone serviced in the US?

  • Secondary monitor does not work after OS X install

    My secondary monitor does not work well after OS X install. The image on my secondary monitor is different even the screen svaer image is different and the mouse can not be seen.