Problem in deep cloning

Hai Friends,
I am trying to use deep cloneing for copying objects and then setting the appropriate values to the properties of copied object. When we make deep clone copy, it is supposed to retain original property values. But in the example I tried, it shows only zeros. The source code and the output is given below. i seek your expertise and my advance thanks for any help to resolve my problem.
* This class extends the class of Javas Point2D.Double
import java.awt.geom.Point2D;
import java.awt.Rectangle;
import java.io.Serializable;
import java.awt.Graphics2D;
import javax.swing.JFrame;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.geom.AffineTransform;
import java.util.ArrayList;
import java.io.Serializable;
import java.io.ObjectInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectOutputStream;
import java.io.ByteArrayInputStream;
import java.lang.ClassNotFoundException;
import java.io.IOException;
public class point2D extends Point2D.Double implements Cloneable, Serializable{
// Properties
     Color drawColor =Color.red;
* Constructor
point2D(){ }
point2D( double xx, double yy){ super(xx,yy); }
public void setLocation( double xx, double yy){
     super.setLocation(xx,yy);}
public void setDrawColor( Color drawColor){
     drawColor = this.drawColor;}
* Draw a rectangle around through point.
public Rectangle getPointRect(){
int width = 4;
return new Rectangle( (int)x-width/2,(int)y-width/2, width, width);
* Check for a given point coinciding with point2D
* location check is true, if it contains the point
public boolean locationCheck( double x, double y){
     return getPointRect().contains((int)x,(int)y);
* Draw method.
public void draw( Graphics2D g2d ){
     g2d.setColor(drawColor);
g2d.fill( getPointRect());
public Object deepClone()
try{
ByteArrayOutputStream b = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream(b);
out.writeObject(this);
out.close();
ByteArrayInputStream bIn = new ByteArrayInputStream(b.toByteArray());
ObjectInputStream oi = new ObjectInputStream(bIn);
oi.close();
return oi.readObject();
catch (IOException e)
{ System.out.println("exception:"+e.getMessage());
e.printStackTrace();
return null;
catch( ClassNotFoundException cnfe){
System.out.println("exception:"+ cnfe.getMessage());
cnfe.printStackTrace();
return null;}          
public static void main( String[] args){
     point2D pp = new point2D();
     pp.setLocation( 100.,150.);
     System.out.println( pp.locationCheck(100.5, 149.5));
System.out.println( pp.getX() + " " + pp.getY());
     point2D ppp = (point2D)pp.deepClone();
System.out.println( ppp.getX() + " " + ppp.getY());
The output:
true
100.0 150.0
0.0 0.0

Hai sztejkat,
I tried with adding methods to save and restore the state of the non-serializable class and it works.
What is the reason to implement deep clone in point2D - this class does not contain any references >except Color, which is an immutable class and can be safely shared by multiple objects. In this case the >shallow copy will work fine. In my opinion the method you have choosen to implement deep copy is one >of the worst possible, looking from performance point of view. Shallow copy makes a new reference but pointing to the same object. My intension of deep copying was to create a new object. However, I fully agree with you that for simple instances of Point2D.Double, it is better to create a new onject using " new" operator than deepcopying.
With best regards,
Chinnaswamy

Similar Messages

  • Deep Cloning problem

    I am having problems deep cloning a LinkedList object which contains serializable objects. I have tried using hand coded deep cloning and using the byteArray output and input streams.
    But nothing is working :(.
    My code currently looks like this:
    public LinkedList clones(LinkedList list){
       LinkedList deepCopy = new LinkedList();
       for(int x = 0; x < list.size(); x++){
          myClasstemp = new myClass((materials)list.get(x));
          deepCopy.add(new myClass(temp));
       return deepCopy;
    }cloning using just new myClass works when I am using individual objects, but when I try applying this to the new linkedlist, nothing happens. Is my error in the fact I am using .get? Or is it somewhere else in my code?
    My problem is that when I remove an object from the original LinkedList, the deepclone is changed as well.
    Message was edited by:
    DocterJ0208

    to be as detailed as possible, my problem is that I actually have 2 classes. One class is a structure object which contains basic properties like doubles and strings. And the other has doubles and strings as well and includes a LinkedList containing objects from the first class. To for an example, I have a student and School class where a School object contains a LinkedList holding all the students at the school.
    What I am trying to do is make a Cancel button. So, what I want is to make a copy of the original school, so if while editing the school, I decide I want to revert back to my original settings, I can by pressing the cancel button. So far, I can only accomplish this with the student class but not the School class. Does that make sense?

  • Deep Cloning of resultset object

    Hi, Is it possinble? Deep Cloning of resultset object?
    Resltset rs = pstmt.execute()
    Anyway to assign rs2 = rs1
    Because I am passing my resulset to a legacy application's method, that does a rs.close(). I need to use the same resultset later. JDK 1.4

    Write a dynamic proxy to the ResultSet where theclose() method does >nothing.
    What if the OP discovers that the app does a rs=null
    as well?How can that affect your code? Presumably the ResultSet is passed as an argument to a legacy method so the legacy method might set it's local reference to null it will not affect the reference held by the caller of the method.
    The op then runs thru hoops to get permission to
    modify a line in legacy code and is too distressed to
    post.He does not need to! You need to learn about Java argument passing.
    Anyway, thanks for the classrom solution. but i cant
    create another class file for extending rs.You have not presented any reason why not! This can be an inner class in the code you are writing and has no influence what so ever on the legacy application.
    >
    If you are too distressed by the posts here, you are
    under no obligation to reply to every one. Anyway , i
    found the postI replied because I had a viable solution to a problem you were having. Nothing you have said so far stops it being viable. Look at my posting history - I do not try to reply to everyone.
    >
    A Resultset is mainly a Java front end for adatabase
    cursor (which exists on the database server). When
    the ResultSet is closed, the cursor will be closed
    too so, even if you could copy everything in the
    ResultSet object, the handle for the cursor wouldno
    longer be valid.
    Which is why you use a Proxy so that you can control exactly what happens.
    >>
    To truely "deep copy" a resultset the depth would
    have to extend accros the database connection to
    cloning the cursor.I still don't see why you need to clone the ResultSet rather than use a proxy!
    >
    very much useful than the self pity expressed by
    you.No self pity! I just expressed annoyance at the lack of feedback from you and many others.
    No offence, none taken and none dealt.I still find it offensive when people don't bother with a simple acknowledgement. I don't ask many questions myself but when I do I make sure I track the responses and acknowledge those who try to help.
    I still think you should re-think your solution but you are free to totally ignore my very simple solution. I expect you will ignore it so the best of luck.

  • Generic class for deep cloning

    How can I write generic class for deep cloning instead of implementing cloneable for each and every object

    Yes, probably you'd need to use reflection. Though, generic deep copy brings up some issues not readily resolvable at run-time, such as, for example, does the object you want to copy refer to a shared or synchronized resource, such as a db connection? If so, by making a new, say, DBConnection object, you then take up a db connection that you really don't need or want to take up (db conns being scarce in many I.T. shops that own a limited number of Oracle or SQL Server, etc. db conn. licenses). Also, many classes these days are getting written that use "obj = classname.newInstance()" (with their constructors made private so you can't use "new SomeObject()") instead of the more commonsense and traditional "obj = new SomeObject()". [Hey, can anyone explain why it might be preferable to use "classname.newInstance()" at times over "new SomeObject()"?  I can't to this day tell why it might be better or why some hacks have started doing this.]
    I am not saying either that you couldn't do it or that you shouldn't. In fact, if you wrote a really good generic deep copy class, it may very well suit your needs 95+% of the time. It'd be a great programming exercise that would likely result in something very useful to someone somewhere (yourself included), and would get you to really learn the reflect package, time generally well-spent. I also can see how it'd be a great exercise in writing recursive calls (if for example you'd like no limit to the depth of objects created within your deep-copied object). You may need to supply a few caveats for use, such as that there's no guarantee that objects within the object to be copied that don't have public constructors can be copied, and that objects that hold other objects that are limited in availablity due to their very natures, such as db connections, may not get fully copied. Another one may be that no object can be copied as long as a thread created and run from it is executing at the time the copy is done (because you couldn't guarantee the to-be-copied object instance's data or object reference state), or that perhaps in some cases, certain kinds of method-level (ie, what's officially called by Sun, "automatic") variables declared and used within, for example, blocks of code within methods, may not have their values copied correctly if they are not visible to the reflect pkg objects (though I'd have to look into that one myself to be sure it would be an issue).
    Doing a search on "deep copy" or "deep clone" on java.sun.com as well as on the 'net reveals surprisingly little except suggestions for using object serialization to do all the dirty work for you.
    I am surprised there isn't a kind of virtual working group trading ideas on the topic and trying collaboratively to come up with a good, solid generic deep copy class as a public service for all the Java brethren. Does anyone know of one? And if not, wanna start one?

  • Deep cloning

    Hi i need to know how can I make deep cloning of own created array which will store the same array as well as other objects like Integer class and then array at element of array will again store another array or some other objects and then again at any element store array can store objects or array . I need to know how should i make deep cloning recuresively . and how should i write hash code and equals method for that class . please help me. I m feeling fustrated

    As a supplementary issue on this subject I am interested how to choose between the Arrays and the
    ArrayList classes. This thread suggests that Arrays is more versatile, although I usually use an
    ArrayList. Should I review this practice?Sorry. You read the thread incorrectly. :-)
    Arrays and ArrayList are completely different. java.util.Arrays has static methods for dealing with arrays. java.util.ArrayList is like a resizable array. java.util.Collections has static methods that can be used on java.util.ArrayList. Read the APIs, and you will see the difference.

  • Deep cloning a Binary Tree

    Hi, I have a class called DigitalTree that acts like a binary tree, storing nodes that each have a "key" which is a long value, and then puts each node into the tree in its correct place, binary tree style. I am trying to deep clone the tree, but for some reason my recursive cloning method isn't working. If anyone can see a problem in my code or has any tips for me, it would be greatly appreciated. Thanks.
    public Object clone()
           DigitalTree<E> treeClone = null;
           try
               treeClone = (DigitalTree<E>)super.clone();
           catch(CloneNotSupportedException e)
               throw new Error(e.toString());
           cloneNodes(treeClone, this.root, treeClone.root);
           return treeClone;
       private void cloneNodes(DigitalTree treeClone, Node currentNode, Node cloneNode)
           if(treeClone.size == 0)
               cloneNode = null;
               cloneNodes(treeClone, currentNode.left, cloneNode.left);
               cloneNodes(treeClone, currentNode.right, cloneNode.right);
           else if(currentNode != null)
               cloneNode = (Node<E>)currentNode.clone();
               cloneNodes(treeClone, currentNode.left, cloneNode.left);
               cloneNodes(treeClone, currentNode.right, cloneNode.right);
       }In the Node class:
    public Object clone()
              Node<E> nodeClone = null;
              try
                   nodeClone = (Node<E>)super.clone();
              catch(CloneNotSupportedException e)
                   throw new Error(e.toString());
              return nodeClone;
           }

    Hello jssutton
    Your question inspired me to try my own binary tree and cloning. My cloning algorithm is similar to yours but with one difference.
    In my class Tree defined as:
    class Tree<T extends Comparable>
    I have:
        private void deepCopyLeft(TreeNode<T> src, TreeNode<T> dest) {
            if (src == null) return;
            dest.mLeft = new TreeNode<T>(src.mValue);
            deepCopyLeft(src.mLeft, dest.mLeft);
            deepCopyRight(src.mRight, dest.mLeft);
        private void deepCopyRight(TreeNode<T> src, TreeNode<T> dest) {
            if (src == null) return;
            dest.mRight = new TreeNode<T>(src.mValue);
            deepCopyLeft(src.mLeft, dest.mRight);
            deepCopyRight(src.mRight, dest.mRight);
        public Tree<T> deepCopy() {
            if (root == null) return new Tree<T>();
            TreeNode<T> newRoot = new TreeNode<T>(root.mValue);
            deepCopyLeft(root.mLeft, newRoot);
            deepCopyRight(root.mRight, newRoot);
            return new Tree<T>(newRoot);
        }Its a similar recursive idea, but with 2 extra functions. I hope that helps. I don't have time right now to pinpoint the problem in your routine. Good luck.

  • Problem with deep structure in Adobe Forms

    Hi ,
    I am converting smartform into adobe forms. While converting the program code in the code initialization of the smart forms also get transformed to adobe forms the problem is my internal table is of type deep structure while passing it through the tables parameter i am getting error in adobe forms .But while passing the internal table through import parameter its not giving error.The same code works fine with smartforms. I dont know why its not taking the structure of internal table in adobe forms properly .It happens only for deep strucure formal normal tables it works fine in table parameters .If any one has come across this scenario please share your ideas.
    Best Regards,
    Sreeram

    If I were you, I would never do this through any program. The only secure, reliable way is to rewrite everything by your own hands. Even if we could argue, your way works as well (and could be faster at the beginning), at the firt moment you will be asked to perform any tiny change in this "imported" thing, you will cry your eyes out (and understand why it is the only useful way to rewrite everything manually).
    regards Otto

  • Problem in opening cloned database

    i have cloned database with name test to test1 in the same oracle home.My problem is that i can't able to open the cloned database
    c:\>set oracle_sid=test1
    c:\>sqlplus /nolog
    SQL>conn sys/oracle as sysdba;
    ORA-12560 TNS:Protocol adapter Error.
    But if i use the folowing procedure i can able to open the cloned database
    c:\>set oracle_sid=test(NOte test is the source database not clonned database)
    c:\>Sqlplus /nolog
    SQL>conn sys/oracle as sysdba
    SQl>startup nomount pfile='c:\oracle\pfile\inittest1.ora'(this is the location of init.ora file for cloned database)
    SQL>alter database mount;
    SQL>alter database open;
    Now cloned database is up and running.
    Now if i try to open the original database (TEST) then i am getting the error
    c:\>set oracle_sid=play
    c:\>sqlplus "/nolog
    SQL>conn sys/oracle as sysdba
    SQL>startup
    ERROR:database is already up and running
    SQL>select name from v$database;
    name
    Play1
    Can any one help me to open two databases at same time.
    Thankx...

    1) ordim
    Create an instance by specifying the following options:
    -NEW -SID sid | -SRVC srvc | -ASMSID sid | -ASMSRVC srvc [-SYSPWD pass]
    [-STARTMODE auto|manual] [-SRVCSTART system|demand] [-PFILE file | -SPFILE]
    [-SHUTMODE normal|immediate|abort] [-TIMEOUT secs] [-RUNAS osusr/ospass]
    expample
    oradim -NEW -SID orcl2
    2) Password creation
    orapwd file=orapwd<SID> password=oracle entries=5
    Virag

  • Charging Problem after Deep Sleep

    Hey
    All works fine but, when i wake up my MacBook from the Deep Sleep Mode, it seems, that my MacBook doesn´t know, if the MacSafe is plugged in or not.
    Normally, when you plug in the MacSafe, in the menu bar the batterie status goes to "charging". But after the Deep Sleep Mode, my MacBooks doesn´t know, that i turn off the MacSafe. All the time, it shows the status, "charged" in the menu bar.
    So the Problem is, that my MacBook doesn´t show the right charging status in the menu bar. So i
    don´t know, how the batterie status is.
    That´s very strange.
    Somebody who can help me?
    MacBook 2,1
    3Gb Ram
    950 gma

    if you haven't already try listing your problem in the Powerbook forum. Sounds like its most likely an issue with the PB.
    Also, have you tried putting the ipod in different settings? As in;
    Enable Disk Mode
    ->itunes open
    ->itunes closed
    Open itunes when this ipod is connected
    ->itunes open
    ->itunes closed
    and then combining the two...

  • Problem Mapping Deep Structure to Flat Structure

    Hello,
    I hope someone can help me.  My scenario is idoc to file.  I am collecting many idocs with a bpm and writing them out to one file.  My bpm is working great, but my mapping program is not working properly.  My source message is a deep structure and my target message is a flat structure. 
    See my example message formats below.
    Source message:
    zmessage (1..1)
    +zidocmessage (0..unbounded)
    ++zidoc       (1..1)
    +++zidocheader (1..1)
    ++++zidocitem  (0..unbounded)
    Target Message:
    zmessage (1..1)
    +zfilemessage   (1..1)
    ++zfilefirstrec (1..1)
    ++zfileheader (1..unbounded)
    ++zfileitem   (1..unbounded)
    I need to map zidocheader to zfileheader and zidocitem to zfileitem. 
    The Source Data:
    <zmessage>
      <zidocmessage>
        <zidoc>
          <zidocheader>
             <hfield1>hf1</hfield1>
             <hfield2>hf2</hfield2>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
          </zidocheader>
        </idoc>
      <zidocmessage>
        <zidoc>
          <zidocheader>
             <hfield1>hf1</hfield1>
             <hfield2>hf2</hfield2>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
             <zidocitem>
               <ifield1>if1</ifield1>
               <ifield2>if2</ifield2>
             </zidocitem>
          </zidocheader>
        </idoc>
    </zmessage>
    The Target Data:
    <zmessage>
      <zfilemessage>
        <zfilefirstrec>
          <firstrecfield1>ff1</firstrecfield1>
          <firstrecfield2>ff2</firstrecfield2>
        </zfilefirstrec>
        <zfileheader>
          <hfield1>hf1</hfield1>
          <hfield2>hf2</hfield2>
        </zfileheader>
        <zfileitem>
           <ifield1>if1</ifield1>
           <ifield2>if2</ifield2>
        </zfileitem>
        <zfileitem>
           <ifield1>if1</ifield1>
           <ifield2>if2</ifield2>
        </zfileitem>
        <zfileheader>
          <hfield1>hf1</hfield1>
          <hfield2>hf2</hfield2>
        </zfileheader>
        <zfileitem>
          <ifield1>if1</ifield1>
          <ifield2>if2</ifield2>
        </zfileitem>
        <zfileitem>
           <ifield1>if1</ifield1>
           <ifield2>if2</ifield2>
        </zfileitem>
      <zfilemessage>
    </zmessage>
    Can someone advise me on how to map this correctly?
    Thank you,
    Rhonda

    Hello,
    Can someone please help me with this problem?
    I am at the point where all of the records in my source message are being written out, however, all of the header records are together and all of the line item records are together.  So, the target message is not in the proper sequence.  It should contain the header record, then item records, header record, then item records, etc. 
    Is there anyone that can help me with this issue?
    Thank you,
    Rhonda

  • Deep Cloning of Arrays

    Hello, I am stuck with this problem...
    I am trying to clone an Array object of type MajorCat. Each MajorCat contains another Array of type MinorCat.
    MajorCat[] contains n MajorCat
    MajorCat[0] contains MinorCat[], of length m
    I wanna clone MajorCat[], which will in turn clone MinorCat[] embedded within it.
    Tried the method given in Section "CloneDemo5" within:
    http://developer.java.sun.com/developer/JDCTechTips/2001/tt0306.html
    The result is strange, and I need a solution...
    Result:
    1) MajorCat[] after cloning gives another copy
    2) MinorCat[] after cloning gives another copy
    3) the orginal MajorCat[] remains the same Object
    4) BUT THE ORIGINAL MinorCat[] points to the Object at 2) !!!!!!!
    Please see this System.out:
    Original MAJORCAT starting off is [LMajorCat;@59ac7b [LMinorCat;@e2ae8   <--- 1)
    Minor Cat before cloning: [LMinorCat;@e2ae8
    Minor Cat after cloning:  [LMinorCat;@489bb6
    New MAJORCAT afterward is  [LMajorCat;@487a3a [LMinorCat;@489bb6
    Original MAJORCAT is   [LMajorCat;@59ac7b [LMinorCat;@489bb6
    Here is the code:
    MajorCat[] tempcat = (MajorCat[])(majorcat.clone());
    for ( int i=0; i<majorcat.length; i++ ) {
    if ( majorcat.minorcat != null ) {
    tempcat.minorcat = (MinorCat[])(majorcat.minorcat.clone());
    What have I done wrong? A million thanks in advance!!!!

    Hello, I put the overloading clone() method back into MajorCat and MinorCat. Again, they are never called...
    Here is the code:
    public class CatelogueSingleton extends ConnectionBase {
        protected MajorCat[] majorcat = null;
        public MajorCat[] getCatelogue() {
            if ( majorcat == null ) {
                renewAllObjects();
                System.out.println("majorcat erased!");
            MajorCat[] tempcat = (MajorCat[])(majorcat.clone());
            System.out.println("original object is   " + majorcat + " " + majorcat[0].minorcat + " " + majorcat[0].minorcat[0].itemgroup + " " + majorcat[0].minorcat[0].itemgroup[0].item);
    // clone each Object in majorcat[]
            for ( int i=0; i<majorcat.length; i++ ) {
                if ( majorcat.minorcat != null ) {
    tempcat[i].minorcat = (MinorCat[])(majorcat[i].minorcat.clone());
    for ( int j=0; j<majorcat[i].minorcat.length; j++ ) {
    if ( majorcat[i].minorcat[j].itemgroup != null ) {
    tempcat[i].minorcat[j].itemgroup = (ItemGroup[])(majorcat[i].minorcat[j].itemgroup.clone());
    for ( int k=0; k<majorcat[i].minorcat[j].itemgroup.length; k++ ) {
    if ( majorcat[i].minorcat[j].itemgroup[k].item != null ) {
    tempcat[i].minorcat[j].itemgroup[k].item = (Item[])(majorcat[i].minorcat[j].itemgroup[k].item.clone());
    System.out.println("cloned object is " + tempcat + " " + tempcat[0].minorcat);
    System.out.println("after cloning the original object is " + majorcat + " " + majorcat[0].minorcat);
    return tempcat;
    Here is the code for MajorCat...
    public class MajorCat extends ConnectionBase implements java.io.Serializable, Cloneable {
        public MinorCat[] minorcat = null;
        public Object clone() {
            try {
                System.out.println("Cloning majorcat");
                MajorCat aobj = (MajorCat)super.clone();
                aobj.minorcat = (MinorCat[])(this.minorcat.clone());
                return aobj;
            catch (CloneNotSupportedException e) {
                throw new InternalError(e.toString());
        public MajorCat() {
    }here is the code for MinorCat...
    public class MinorCat extends ConnectionBase  implements java.io.Serializable, Cloneable {
        public ItemGroup[] itemgroup = null;
        public Object clone() {
            try {
                MinorCat aobj = (MinorCat)super.clone();
                aobj.itemgroup = (ItemGroup[])(this.itemgroup.clone());
                return aobj;
            catch (CloneNotSupportedException e) {
                throw new InternalError(e.toString());
        public MinorCat() {
    }The result is:
    original object is [LMajorCat;@572085 [LMinorCat;@180b94
    cloned object is     [LMajorCat;@148656 [LMinorCat;@180b94
    after cloning the original object is  [LMajorCat;@572085 [LMinorCat;@180b94
    The original MinorCat within MajorCat now points to the new clone, and the clone() within MajorCat and MinorCat aren't called.... as there is no System.out statements.
    What have I done wrong in clone() within MajorCat and MinorCat?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with Stamp Cloning Tool in CS5?

    Hello,
    I am having the darndest problem that I've never encountered before. I am using the cloning tool in CS5 and I am trying to stamp clone one part of the photo and clone it to another part of the photo. The problem is that after I option click and then drag it to the part I need, dark spots show up instead? What is wrong here? Below is an example. Thanks.
    I am running Photoshop CS5 for Mac with the latest updates.

    We can't quite see it in your image, but have you got the Blend mode for the clone tool set for Difference perhaps?  Otherwise go to the dropdown top let of Options bar, and see if you have any presets for that tool, and reset it.  If none of that helps, time to reset the Preference file (Shift Cmd Opt as you open Photoshop)

  • Problems after failed cloning

    Hello. I was stupid enough to make a clone of the disk in my Powerbook G4 with Super Duper before checking it was compatible with Leopard. I wasnt. I got several errors on the new larger drive after boot like:
    system extension was installed the wrong way and must be reinstalled.
    The files are in:
    /system/Library/Extensions/System.kext/PlugIns/
    Libkern.kext , Mach.kext , BSDKernel.kext and IOKit.kext ,
    The others are in:
    /system/Library/Extensions/
    autofs.kext , IOFireWireFamily.kext and IOFirewireSBP2.kext
    The powerbook boots but there is several probs. Mail wont start, Bluetoot is not there, Photoshop wont start and more.
    I still have the old drive with the previous system, but that drives is not visible as a boot drive in startup disk control panel. Anything I can do beside swap disks and use carbon copy cloner? Install Leopard from the DVD?
    Thanks for any advice
    Message was edited by: eflaten

    Sorry. I cloned my internal 10.5.1 80 gig disk to external 250 gig in a firewire cabinette. Then I replaced the original one inside my powerbook G4 with this clone. I made the clone with latest Super Duper, which I later found out was not compatible. So it is the 250 gig now inside my mac that doesnt work. Thanks for asking for clarifying

  • Problems with deep request structure in web service

    I'm having problems when trying to consume an Enterprise Service-like web service in my Web Dynpro application. The web service FindXByElements has a request-structure as follows:
    XByElementsQuery
    -ProcessingConditions
    -QueryHitsMaximumNumberValue
    -QueryHitsUnlimitedIndicator
    -XSelectionByElements
    -ID
    -Year
    Regarding the structures on level two, the structure ProcessingConditions are of the global data type "WITHOUT_LASTRETURNED_QueryProcessingConditions" and are therefore typed. The structure XSelectionByElements on the other hand are just a "level" in the request structure and are therefore not typed. Both structures have occurrence 1 so they have to be filled with input data.
    The code in wdDoInit in the Component Controller looks like this:
    QueryXInModel model = new QueryXInModel();
    wdContext.nodeRequest_FindXByElements().bind(wdContext.createRequest_FindXByElementsElement(new Request_FindXByElements(model)));
    wdContext.currentRequest_FindXByElementsElement().modelObject().setXByElementsQuery(new XByElementsQuery_Sync(model));
    //Processing structure
    wdContext.currentXByElementsQueryElement().modelObject().setProcessingConditions(new WITHOUT_LASTRETURNED_QueryProcessingConditions(model));
    //Selection structure
    wdContext.currentXByElementsQueryElement().modelObject().setXSelectionByElements(new XSelectionByElements(model));
    The last row generates the following exception:
    java.lang.IllegalArgumentException: Cannot perform write operation 'setRelatedModelObject' on target role: Class 'XSelectionByElements' is not compatible to class '$002fWsdlDefinitions$002fWsdlTypes$002fXsdSchema$002fXsdComplexType$005b3$005d$002fXsdSequence$002fXsdElement$005b2$005d$002fXsdComplexType' of target role 'XSelectionByElements' in model class 'XByElementsQuery_Sync'
    There seems to be a problem to bind a non-typed structure element to a context node since the processing structure is working fine but the selection structure are not.
    What am I doing wrong, anyone got any clues?
    /Oskar

    Hi
    QueryXInModel model = new QueryXInModel();
    wdContext.nodeRequest_FindXByElements().bind(wdContext.createRequest_FindXByElementsElement(new Request_FindXByElements(model)));
    wdContext.currentRequest_FindXByElementsElement().modelObject().setXByElementsQuery(new XByElementsQuery_Sync(model));
    //Processing structure
    wdContext.currentXByElementsQueryElement().modelObject().setProcessingConditions(new WITHOUT_LASTRETURNED_QueryProcessingConditions(model));
    //Selection structure
    wdContext.currentXByElementsQueryElement().modelObject().setXSelectionByElements(new XSelectionByElements(model));
    XByElementsQuery
    ProcessingConditions
    QueryHitsMaximumNumberValue
    QueryHitsUnlimitedIndicator
    XSelectionByElements
    ID
    Year
    as
              QueryXInModel model = new QueryXInModel();
               Request_FindXByElement  request = new Requst_FindXByElement();
                ProcessCondition   processCond  = new  ProcessCondition(model);
                QueryHitsMaximumNumberValue  qhMaxNumValues = QueryHitsMaximumNumberValue(model);
          QueryHitsUnlimitedIndicator  qhUnLimind = new QueryHitsUnlimitedIndicator(model);
            XSelectionByElements  selecByEle = new XSelectionByElements(model);
                     processCond.set....();                         
                     qhMaxNumValues .set...();
               and so on
                    request.set....();
    wdcontext.nodeReqestFindX..bind(request);
      in the above during the values you will automatically get the set values .

  • Problem with deep structure in OO Context

    Dear All
    As we know deep structures with occurs 0 cannot be declared in Object Oriented context (will give a syntax error). Can some1 please suggest a workaround. I need to declare the following structure in a BADI implementation. But it is a deep structure & gives a syntax error.
    BEGIN OF WI
    OCCURS 0,
    MINDX LIKE SY-INDEX, "Index Merkmal
    WINDX LIKE SY-INDEX, "Index in Datentabelle
    WSELE TYPE C, "Kz. selektiert
    WOHNE TYPE C, "Kz. ohne Wertedefinition
    WWERT TYPE C, "Kz. weitere Werte vorhanden
    ATSON TYPE C, "Kz. Sonderwerte erlaubt
    ESWRT TYPE C, "Kz. Eingeschränkter Wertebereich
    SSTRG TYPE C, "Kz. Stringsuche
    STATU TYPE C, "Status
    ATWRT LIKE CAWN-ATWRT, "Wert sprachneutral
    ATFLV LIKE CAWN-ATFLV, "intern von
    ATFLB LIKE CAWN-ATFLB, "intern bis
    ATAWE LIKE CAWN-ATAWE, "abw. Einheit
    ATAW1 LIKE CAWN-ATAW1, "abw. Einheit bis
    ATCOD LIKE CAWN-ATCOD, "Operator-Ident.
    ATTLV LIKE CAWN-ATTLV, "Toleranz von
    X TYPE C,
    ATTLB LIKE CAWN-ATTLB, "Toleranz bis
    ATPRZ LIKE CAWN-ATPRZ, "Angabe in %
    ATINC LIKE CAWN-ATINC, "Schrittweite
    ATAUT LIKE AUSP-ATAUT, "Author
    WSDEF LIKE CAWN-ATSTD, "Kz. Std.-Wert
    ATZHL LIKE AUSP-ATZHL, "Zähler AUSP
    TXTNR LIKE CAWN-TXTNR, "Text-Nr.
    WTZHL LIKE CAWN-ATZHL, "Zähler CAWN
    AENNR LIKE CAWN-AENNR, "Änderungsnr.
    DATUV LIKE CAWN-DATUV, "Datum von aus Änderungsnr.
    ATZHH LIKE CAWN-ATZHH, "Hierarchie: ATZHL des Parent
    ATWHI LIKE CAWN-ATWHI, "Hierarchie: ATZHL ist Parent
    ATVPL LIKE CAWN-ATVPL, "Kz. Vorplanung
    NATWRT LIKE CAWN-ATWRT, "Sprachneutraler Wert
    CATWRT LIKE CAWN-ATWRT, "CHAR-Wert in DDB
    CATFLV LIKE CAWN-ATFLV, "NONCHAR-Wert in DDB
    KNOBJ LIKE CAWN-KNOBJ, "Beziehungswissen
    KNPRE TYPE C, "KNART: Precondition
    KNACT TYPE C, "KNART: Action
    KNPRO TYPE C, "KNART: Procedure
    VL TYPE VALUE_DESCRIPTION OCCURS 5,
        est_atwrt like ausp-atwrt,      "Eingabestring    (für EH&S) 4.0c
    END   OF WI.
    Help needed urgently!!
    Regards
    Sudhir

    Declare TYPES statement.
    types: BEGIN OF WI,
    MINDX LIKE SY-INDEX, "Index Merkmal
    WINDX LIKE SY-INDEX, "Index in Datentabelle
    WSELE TYPE C, "Kz. selektiert
    WOHNE TYPE C, "Kz. ohne Wertedefinition
    WWERT TYPE C, "Kz. weitere Werte vorhanden
    ATSON TYPE C, "Kz. Sonderwerte erlaubt
    ESWRT TYPE C, "Kz. Eingeschränkter Wertebereich
    SSTRG TYPE C, "Kz. Stringsuche
    STATU TYPE C, "Status
    ATWRT LIKE CAWN-ATWRT, "Wert sprachneutral
    ATFLV LIKE CAWN-ATFLV, "intern von
    ATFLB LIKE CAWN-ATFLB, "intern bis
    ATAWE LIKE CAWN-ATAWE, "abw. Einheit
    ATAW1 LIKE CAWN-ATAW1, "abw. Einheit bis
    ATCOD LIKE CAWN-ATCOD, "Operator-Ident.
    ATTLV LIKE CAWN-ATTLV, "Toleranz von
    X TYPE C,
    ATTLB LIKE CAWN-ATTLB, "Toleranz bis
    ATPRZ LIKE CAWN-ATPRZ, "Angabe in %
    ATINC LIKE CAWN-ATINC, "Schrittweite
    ATAUT LIKE AUSP-ATAUT, "Author
    WSDEF LIKE CAWN-ATSTD, "Kz. Std.-Wert
    ATZHL LIKE AUSP-ATZHL, "Zähler AUSP
    TXTNR LIKE CAWN-TXTNR, "Text-Nr.
    WTZHL LIKE CAWN-ATZHL, "Zähler CAWN
    AENNR LIKE CAWN-AENNR, "Änderungsnr.
    DATUV LIKE CAWN-DATUV, "Datum von aus Änderungsnr.
    ATZHH LIKE CAWN-ATZHH, "Hierarchie: ATZHL des Parent
    ATWHI LIKE CAWN-ATWHI, "Hierarchie: ATZHL ist Parent
    ATVPL LIKE CAWN-ATVPL, "Kz. Vorplanung
    NATWRT LIKE CAWN-ATWRT, "Sprachneutraler Wert
    CATWRT LIKE CAWN-ATWRT, "CHAR-Wert in DDB
    CATFLV LIKE CAWN-ATFLV, "NONCHAR-Wert in DDB
    KNOBJ LIKE CAWN-KNOBJ, "Beziehungswissen
    KNPRE TYPE C, "KNART: Precondition
    KNACT TYPE C, "KNART: Action
    KNPRO TYPE C, "KNART: Procedure
    VL TYPE table of VALUE_DESCRIPTION,est_atwrt like ausp-atwrt, "Eingabestring (für EH&S) 4.0c
    END OF WI.
    types: t_wi type standard table of wi.
    data: wa type wi,
            t_itab type t_wi.

Maybe you are looking for

  • Installing Windows 7 Bootcamp Drivers after OSX has been overwritten

    I previously overwrote my OSX+Win7 bootcamp installation in favor of Linux Mint 15. There were some video driver incompatibilities with my Macbook Pro 7,1 (Mid-2010), so I have re-installed Windows 7. Because I no longer have OSX, Bootcamp is not ava

  • Help! iMac hard drive failure No Backups

    I bought iMac in 2011 and worked perfectly fine until 4 days ago. The first sign was everything became so slow. Every task took about 2 minutes to finish or the mouse cursor spinning forever. Then I started reboosting the system. The problem remained

  • A report to see the consolidated invoices

    Hi, Are there any standard reports which would display the consolidated invoices for a customer who can carry out consolidated billing? Appreciate your help. Thank you.

  • Itunes quit working on my MacBook Air.

    I was listening to itunes on my way to work on my computer.  I paused what I was listening to while I walked from my car to my office.  Once I set up my Macbook Air on my desk, I wanted to resume listening, but now nothing works.  I can't get anythin

  • ERROR: Wi-Fi has the self-assigned IP address

    I'm having an issue with both my MacBook Pros at my home.  If I try to connect to the Time Capsule after coming home from work, I receive the exclamation point in my wifi status icon and this error message in my network preferences pane: "Wi-Fi has t