Cloning of vectors

Hi all,
I have a java.util.Vector v which I would like to pass a clone as a parameter in a recursive routine.
The routine is defined as:
boolean find(int, int, int, java.util.Vector)
However, when I call using
find(i,j,k, v.clone());
it gives me the following message:
C:\Maze.java:369: find(int,int,int,java.util.Vector) in MazeClass cannot be applied to (int,int,int,java.lang.Object)
if(find(x+1,y,step,v.clone()))foundSolution=true;
The object returned by clone() is supposed to respect the property:
x.clone().getClass() == x.getClass()
I have also tried casting the result
(java.util.Vector)v.clone()
to get around the problem, but java complains
Note: C:\Maze.java uses unchecked or unsafe operations.
I suppose I am missing something here. Could someone shed some light on this?
Many thanks.

Thanks for the assurance.
I guess I will live with it, although I am still not
convinced why clone() does not return the copy as a
class of the original.It does. Just the reference is of type Object. Because that's what clone() is defined to return by the API.

Similar Messages

  • Cloning a Vector String causes warning: unchecked

    I have a Vector<String> that I want to clone and store in another Vector<String>. I can't figure out why I get a warning.
    Vector<String> DATA = new TestData1().getData();
    Vector<String> nuDATA;
    //@SuppressWarning( "unchecked" )
    nuDATA = (Vector<String>) DATA.clone();The warning i get is "warning: [unchecked] unchecked cast"
    found: Object
    required: Vector<String>
    So I understand the clone() function returns an Object. But why on earth can't I cast it into a Vector<String>?
    Also, the SuppressWarning line of code causes its own error when uncommented...
    Message was edited by:
    pfhat

    True, and due to the fact that it always will be a Vector<String> and never anything else, there really is no need to "fix" this.
    BUT
    that being said, it's not 'graceful' the way it is now, and that annoys me. Plus maybe in the future i'll need to know how to do this the right way.

  • Vector clone references the same objects??

    Hi all
    I'm developing a simple chess program.
    Obviously, each move the user tries must be checked against the following sets of chess rules:
    1.) Whether it is that colour player's turn to move
    2.) Whether this move is valid for this specific piece (eg. 3 forward for a King --> invalid of course)
    3.) Whether this move will jeopardize the player's king (put it in check)
    If from any of the above the move is found to be invalid, the move is not executed.
    My program structure is briefly this:
    A. abstract super class 'ChessPiece' - subclassed by the various specific Chess Piece classes.
    Each of the specific ChessPiece subclasses must implement an abstract method to check if a
    proposed move is valid, and also a method to actually do the move...
    B. 'PieceManager' class - has a Vector of ChessPieces:
    This class checks whether the given move is valid:
    For the piece: by calling the checking method (see A above)
    For the general game: by making sure the given move doesn't put the player's king in check.
    NOTE: In chess (for those who don't know), it is illegal to move any piece if, at the end of
    the move, your king will be in check [possible to be captured by any enemy piece]
    This last check I want to do in the following way:
    1) copy/clone the entire PieceManager object
    2) in this copied object, actually do the move
    3) still in the copied/cloned object, see if the moving player's king is now in check
    4) based on this evaluation, execute the move in the original PieceManger object or don't...
    The Problem:
    When I clone this PieceManager object, its 'pieces' Vector is obviously also cloned.
    BUT it seems that the cloned 'pieces' Vector references the same ChessPiece objects
    as those referenced by the original 'pieces' Vector; ie the 2 Vectors are sharing the same Objects.
    Thus, when I actually execute the move in the test/cloned PieceManager object,
    the original PieceManager's corresponding piece is moved too (well, it seems it is the same piece...).
    I am pretty stuck with this.
    I've tried the Vector clone method; it doesn't seem to copy the objects, but create another reference
    to the same objects, as I've said.
    I've tried cloning the entire object ; also not helping......
    I'd love any comments, helpful pointers, suggestions.
    Also any comments on my program structure... is a Vector the best tool for this job?
    Thanks very much -
    lutha

    Hi all, OP here.
    Ok thanks guys for all your posts...
    two points:
    1) I have tried the "copy constructor", and it seems to be doing the same thing. (ie 'shallow clone')
    What's really frustrating me is that nothing I do seems to actually physically copy the Vector's objects
    to new, separate copies of those objects...
    I had my PieceManager class implement Cloneable (just in case - not too sure on that one; in fact I
    commented that out later), and I overrode the clone method like this:
    public Object clone ()
            PieceManager pm = new PieceManager ();
            Vector pcs = new Vector ();
            // Enumeration e = pieces.elements ();
            //while (e.hasMoreElements ())
            //    ChessPiece p = (ChessPiece) e.nextElement ();
            //pcs.add ();
            //}  // still references the same objects!!
            pieces.trimToSize ();
            int size = pieces.size ();
            Object[] arr = new Object [size];
            Object[] initial = pieces.toArray ();
            System.arraycopy (initial, 0, arr, 0, size);
            for (int i = 0 ; i < size ; i++)
                ChessPiece p = (ChessPiece) arr ;
    pcs.add (p);
    pm.pieces = pcs;
    return pm;
    This all still does the same 'shallow cloning'...
    2) m.winter, my ChessPiece objects are not immutable - they have a co-ordinate field that
    changes as they are moved. This is for getting as called by another object, and for checking in
    the ChessPiece's own internal method for checking whether the passed-in square co-ordinate
    is a valid destination.
    Anyway, I don't think that's the main issue here. How can I properly clone/copy a Vector, resulting
    in :
    a) the original Vector
    b) a new, totally unrelated Vector.
    Thanks again all for your input.
    regards,
    lutha

  • Easy way to clone a Vector and its Content?

    I have a Vector containing String Arrays. I would like to clone the vector an all it's content.
    Just cloning the vector doesn't work, because just the vector gets cloned whereas the references to the StringArrays in the vector stay the same.
    So i guess i have to clone all the StringArrays too? This would be a very "expensive" process, so i'd like to ask first, if there is another methode to clone a vector and it's content?
    Thanks for your help!

    No. Clone gives you a shallow copy. What you want is a deep copy. However, since Strings are immutable, you only need to deeply copy the string arrays, not the strings themselves. If you were working with mutable objects, this would not be the case and you would need to copy the items in the array as well as the array itself.

  • Problem with cloning a DataSource

    Hello!!
    I have cloned a DataSource and used the cloned DataSource(not the original DataSource which i used for cloning) for transmitting via RTP. I don get any exception or any error but the audio isn't getting transmitted.
    (I tried receiving the transmitted audio stream using JMF.. But JMF doesn't detect any)
    However when i use the DataSource(which i used for cloning) it worked..
    dl=CaptureDeviceManager.getDeviceList(new AudioFormat(AudioFormat.LINEAR));
    ml=((CaptureDeviceInfo)dl.firstElement()).getLocator();
    +staticsource=Manager.createCloneableDataSource(Manager.createDataSource(ml));             //staticsource has been declared as static and i tried to clone it to produce new DataSources whenever i need+
    source=((SourceCloneable)staticsource).createClone();
    +p=Manager.createProcessor(source);           
    // I tried using staticsource and it worked but i need to get it right using the cloned one..+
    I think i have explained my problem pretty clearly.. Sorry if i din..
    Thanks!!
    Edited by: s.baalajee on Jun 2, 2009 9:08 AM

    Thanks for the help sir.. I read a previous post of yours which helped me to track down the mistake.. It was a small mistake in my logic.. I had not used the DataSource I used for cloning to create the processor(which means I din use it)..
    When I used that also to create processor the clones produced from that DataSource worked.. I have posted the modified code below..
    Edited by: s.baalajee on Jun 3, 2009 11:02 PM
    /*This program is to capture audio and send it to another system*/
    //package AudioChat;
    import java.awt.*;
    import java.net.*;
    import javax.media.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.media.format.*;
    import javax.media.protocol.*;
    import javax.media.control.*;
    import java.util.*;
    public class ATransmit extends JDialog implements ControllerListener
         Processor p=null;
         DataSink sink;
         MediaLocator ml;
         static DataSource staticsource=null;     
         DataSource source;          
         String cip,cun;
         Panel panel;
         int port;
         static boolean audioinuse;
         //     audioinuse will be false for the first time only
         public ATransmit(String c,JFrame f,MediaLocator medialocator,int po,String un,boolean audio)
              super(f,"Audio Chat "+un);
              cip=c;cun=un;
              port=po;
              audioinuse=audio;
              System.out.println("CIP :"+cip);
              setVisible(true);
              setBounds(600,50,300,75);
              setResizable(false);
              setLayout(new GridLayout(1,1));
              panel=new Panel();
              panel.setBackground(Color.BLACK);
              panel.setLayout(new BorderLayout());
              add(panel);
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent we)
                        stopEverything();     //     stops the DataSink and the Processor
              setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    // For the first time alone I create the DataSource(staticsource) from the MediaLocator and use it to create the processor
    //For the subsequent times I create Clones of staticsource and use it to create the Processor
              try
                   if(!audioinuse)
                        System.out.println("Initializing all components");
                        ml=medialocator;
                        Manager.setHint(Manager.LIGHTWEIGHT_RENDERER,true);
                        staticsource=Manager.createCloneableDataSource(Manager.createDataSource(ml));
                        p=Manager.createProcessor(staticsource);          
                   else
                        source=((SourceCloneable)staticsource).createClone();
                        p=Manager.createProcessor(source);     
                   p.addControllerListener(this);
                   p.configure();
                   Thread.sleep(500);
                   p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW_RTP));
                   if(encode(p))
                        p.realize();
                   else
                        System.out.println(“Encoding failed”);
                   Thread.sleep(500);
              catch (Exception e)
                   System.err.println("Got exception "+e);
         public boolean encode(Processor p)
              TrackControl track[] = p.getTrackControls();
              boolean encodingOk = false;
              for (int i = 0; i < track.length; i++)
                   if (!encodingOk && track[i] instanceof FormatControl)
                        if (((FormatControl)track).setFormat( new AudioFormat(AudioFormat.DVI_RTP)) == null)
                             track[i].setEnabled(false);
                        else
                             encodingOk = true;
                   else
                        track[i].setEnabled(false);
              return encodingOk;
         public synchronized void controllerUpdate(ControllerEvent ce)
              try
                   if (ce instanceof RealizeCompleteEvent)
                        Component comp;
                        System.out.println("Realized");     
                        sink=Manager.createDataSink(p.getDataOutput(), new MediaLocator("rtp://"+cip+":"+(15000+port)+"/audio"));
                        if ((comp=p.getControlPanelComponent()) != null)
                             panel.add(BorderLayout.SOUTH,comp);
                        startEverything();     //     start the DataSink and the Processor
                        validate();
                        System.out.println("Updated");
              catch(Exception e)
                   System.out.println("Exception rasied "+e);
         void startEverything()
              try
                   sink.open();sink.start();
                   p.start();
              catch(Exception e)
                   System.out.println("Got Exception :"+e);
         void stopEverything()
              try
                   if(p!=null)
                        p.stop();
                   if(sink!=null)
                        sink.stop();
                        sink.close();
                   if(p!=null)
                        p.deallocate();
                        p.close();
              catch(Exception e)
                   System.out.println("Got Exception :"+e);
         public static void main(String s[])
              Vector dl;
              MediaLocator ml;
              JFrame frame=new JFrame();
              frame.setBounds(400,400,400,400);
              frame.setVisible(true);
              dl=CaptureDeviceManager.getDeviceList(new AudioFormat(AudioFormat.LINEAR));     
              ml=((CaptureDeviceInfo)dl.firstElement()).getLocator();
              new ATransmit("192.192.175.64",frame,ml,0,"s.baalajee",false);               //Note the last argument is false
              new ATransmit("192.192.175.64",frame,ml,100,"s.baalajee",true);     
              new ATransmit("192.192.175.64",frame,ml,200,"s.baalajee",true);     
              new ATransmit("192.192.175.64",frame,ml,300,"s.baalajee",true);     
    Edited by: s.baalajee on Jun 3, 2009 11:04 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I set a unique texture for each cloned 3D model in Director?

    Hi,
    I am using a 3D world built from 3Ds Max, it contains 2 boxes, In Director I have set the boxes to move along a path and when out of camera shot the boxes are reset along the Z axis and a new texture if applied (generated via a text member), so far so good.
    Now if the user clicks a button I would like to clone the boxes and have each box display its own texture from its own text member. At the moment the cloned boxed all use the texture from the last textured box, I assume this is an inheritance issue, but I do not know how to make each texture unique the its box.
    Any ideas?
    Thanks in advance!
    Sherv.

    Hello,
    Im trying to make a number of boxes in a 3D world to move along the Z axis with a unique texture. The start just outside of the cameras field of view, move through the camera and when out of sight their position is moved back to the start with a new texture and the process repeats giving the  illusion of endless boxes. The problem I am having is with the unique textures, I would like to reuse the shaders but without resetting the world. Currently I get the following  message on line “ shad1 = w.newShader("shad1",#standard) “ :
    cid:[email protected]
    Below are snippets of the code for texturing the objects :
      w = member(MyCameraSetup)
      shad1 = w.newShader("shad1",#standard)
      case ANPRcountry of
        "UK" : tex1 = w.newTexture("tex1",#fromCastMember,member("ANPRtext"))
        "Saudi" : tex1 = w.newTexture("tex1",#fromCastMember,member("ANPRSaudi"))
      end case
      shad1.texture = tex1
      shad2 = w.newShader("shad2",#standard)
      case ANPRcountry of
        "UK" : tex2 = w.newTexture("tex2",#fromCastMember,member("ANPRtext2"))
        "Saudi" : tex2 = w.newTexture("tex2",#fromCastMember,member("ANPRSaudi2"))
      end case
      shad2.texture = tex2
      member(w).model(1).shader.texture = tex1
      w.model(1).shader = w.shader("shad1")
      member(w).texture("tex1").quality = #high
      member(w).model(1).shader.transparent = False
      w.shader("shad1").ambient = rgb(255,255,255)
      w.shader("shad1").diffuse = rgb(255,255,255)
      w.shader("shad1").emissive = rgb(0,0,0)
      w.shader("shad1").specular = rgb(0,0,0)
      -- setup the texture for far lane
      member(w).model(5).shader.texture = tex2
      w.model(2).shader = w.shader("shad2")
      member(w).texture("tex2").quality = #high
      member(w).model(5).shader.transparent = False
      w.shader("shad2").ambient = rgb(255,255,255)
      w.shader("shad2").diffuse = rgb(255,255,255)
      w.shader("shad2").emissive = rgb(0,0,0)
      w.shader("shad2").specular = rgb(0,0,0)
    Any help you may provide will be gratefully received!
    Many thanks.
    Vector, the latest generation in ANPR camera technology is coming soon
    Solutions to improve roads, journeys and communities
    Sherwin Wallace
    Research & Development Engineer
    Vysionics ITS Ltd
    Fishponds Close, Wokingham, Berkshire  RG41 2QA
    T:  0118 979 2077
    F:  0118 977 4734
    M: 07880554879
    [email protected]<mailto:[email protected]>
    http://www.vysionics.com<http://www.vysionics.com/>
    cid:[email protected]
    This email message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet emails are not necessarily secure. Vysionics ITS Ltd does not accept responsibility for changes made to this message after it was sent.

  • Object cloning question

    Hello all,
    I have a question about cloning a class. My class is something like this...
    public class Message implements Cloneable
      int id;
      Fields fromClient;
      Fields fromProcessor;
      Fields toClient;
      Fields toProcessor;
      protected Object clone() throws CloneNotSupportedException
        return (super.clone());
    }FYI, the Fields object is another class that contains a Vector of Field objects... A Field is simple class containing three strings, one string named name, one is named value, the other string is named defaultValue.
    At application startup, I create this class and each of the Fields objects are initialized with various Field object stuff.
    Message baseMessage = new Message();Later in the process, when I need to create a new Message object, instead of doing a 'new' I instead do a
    Message msg1 = baseMessage.clone();The newly cloned msg1 object is then processed and manipulated.
    The problem I am having is that on the next call to
    Message msg2 = baseMessage.clone();the newly cloned msg2 object contains the contents of msg1! This is very strange because I thought that msg2 would be a clone of baseMessage which does not contain any of the information found in msg1...
    Any ideas? I hope I explained it well enough...
    Thanks,
    -Jeff

    Also, did you realy intend your clone() method tobe protected?
    I am not really sure why a make the clone()
    protected. I most likely read somewhere that it
    needed to be protected... Is this a bad thing?Not necessarily. It depends on who you want to be able to clone your object. If you want everbody to be able to, make it public. If you want only classes in that package and subclasses of your class to be able to do it, make it protected. I just wondered because public is probably more common.
    As for your other comment about why you weren't using new: You can still use new to make a deep or shallow copy. It's called a copy constructor.
    public class Message {
      public Message(Message orig) {
        field1 = orig.field1; // shallow copy
        field2 = new Field2(orig.field2); // deep copy, assuming Field2 has such a constructor
        etc.
    }

  • Error while cloning R12 instance

    Hi,
    I am trying to clone R12 Production instance to R12 development instance.
    And i got the below error.
    /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/jlib/java:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/jlib/oui/OraInstaller.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/jlib/oui/ewt3.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/jlib/oui/share.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/jlib/oui/srvm.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/jlib/ojmisc.jar oracle.apps.ad.clone.ApplyDBTier -e /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/VIS4_blink4.xml -stage /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone -showProgress
    APPS Password : Log file located at /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/log/VIS4_blink4/ApplyDBTier_11291440.log
    / 50% completed
    RC-50004: Fatal: Error occurred in ApplyDBTier:
    StackTrace -
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:67)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoSuchMethodError: oracle.apps.ad.autoconfig.InstantiateFile.writeReport(Ljava/util/Vector;Loracle/apps/ad/util/LogFile;I)V
    at oracle.apps.ad.clone.ApplyDatabase.checkAutoConfigErr(ApplyDatabase.java:3034)
    at oracle.apps.ad.clone.ApplyDatabase.runAutoConfig(ApplyDatabase.java:2839)
    at oracle.apps.ad.clone.ApplyDatabase.doConf(ApplyDatabase.java:489)
    at oracle.apps.ad.clone.ApplyDatabase.doApply(ApplyDatabase.java:443)
    at oracle.apps.ad.clone.ApplyDatabase.<init>(ApplyDatabase.java:336)
    at oracle.apps.ad.clone.ApplyDBTier.<init>(ApplyDBTier.java:101)
    ... 6 more
    ERROR while running Apply...
    Tue Nov 29 14:42:27 2011
    ERROR: Failed to execute /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/bin/adclone.pl
    Please check logfile.
    [oravis12@blink4 bin]$ ping blink3
    PING blink3.blink.com (192.168.100.178) 56(84) bytes of data.
    64 bytes from blink3.blink.com (192.168.100.178): icmp_seq=0 ttl=64 time=1.18 ms64 bytes from blink3.blink.com (192.168.100.178): icmp_seq=1 ttl=64 time=0.168 ms
    --- blink3.blink.com ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1000ms
    rtt min/avg/max/mdev = 0.168/0.675/1.182/0.507 ms, pipe 2
    Can you please help me........
    Thanks in advance
    Regards,
    Nikunj

    Thanks Kashif,
    Below are the details from my log file. My log file size is very large so i m spiliting it's in 2 part.
    Started ApplyDBTier at Tue Nov 29 18:00:08 GMT+05:30 2011
    Version:
         ApplyDBTier.java     :      120.6
    ApplyDBTier (prog) -1 true true true...
    # Calling ApplyDBTechStack...
    Executing runInstallDriver...
    Started unzipping files...
    Completed runInstallDriver.
    Executing home registration for s_db_oh...
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adouidb.pl
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/ouicli.pl
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/ouicli.pl to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/ouicli0.pl
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/config_ux.tmp
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/rdbms/lib/config.c
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/rdbms/lib/config.c to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/config1.c
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adlnkoh.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/adlnkoh.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/adlnkoh.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/adlnkoh0.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    Executing script in InstantiateFile:
    /d01/oracle/VIS4/db/tech_st/10.2.0/perl/bin/perl -I /d01/oracle/VIS4/db/tech_st/10.2.0/perl/lib/5.8.3 -I /d01/oracle/VIS4/db/tech_st/10.2.0/perl/lib/site_perl/5.8.3 -I /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/perl /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/ouicli.pl
    script returned:
    Beginning OUI CLI cloning for s_db_ohTue Nov 29 18:00:10 2011
    /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/jre/bin/java -classpath /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/java:/d01/oracle/VIS4/db/tech_st/10.2.0/oui/jlib/OraInstaller.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/java/xmlparserv2.jar oracle.apps.ad.clone.util.OracleHomeCloner -OUICLI -e /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/VIS4_blink4.xml -nolink -oaVar s_db_oh -homestub db -log /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/log/VIS4_blink4/ohclone.log
    NON-COMPLIANT: /d01/oracle/VIS4/db/tech_st/10.2.0/oraInst.loc does not point to an inventory inside the current ORACLE_HOME
    Rapid Clone only supports oraInst.loc at that location if its content points to an inventory inside the same ORACLE_HOME
    Please make the necessary changes to the following file:
    /d01/oracle/VIS4/db/tech_st/10.2.0/oraInst.loc
    running OUI CLI home cloning:
    /d01/oracle/VIS4/db/tech_st/10.2.0/oui/bin/runInstaller -clone -silent -force -nolink -waitForCompletion -invPtrLoc /d01/oracle/VIS4/db/tech_st/10.2.0/admin/oui/VIS4_blink4/oraInst.loc ORACLE_HOME=/d01/oracle/VIS4/db/tech_st/10.2.0 ORACLE_HOME_NAME=VIS4_DB__d01_oracle_VIS4_db_tech_st_10_2_0 -J-Doracle.installer.noLink=true
    Finished OUI CLI cloning for s_db_oh with return code: 0Tue Nov 29 18:01:29 2011
    .end std out.
    .end err out.
    Executing script in InstantiateFile:
    /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/adlnkoh.sh
    script returned:
    adlnkoh.sh started at Tue Nov 29 18:01:29 IST 2011
    Log file located at /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/log/VIS4_blink4/make_11291801.log
    Using make file "ins_sysman.mk" for linking SYSMAN utilities...
    Using make file "ins_emdb.mk" for linking COLLECTOR utility...
    adlnkoh.sh completed sucessfully
    .end std out.
    .end err out.
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adouidb.pl
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/ouicli.pl
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/ouicli.pl to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/ouicli1.pl
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/config_ux.tmp
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/rdbms/lib/config.c
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/rdbms/lib/config.c to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/config2.c
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adlnkoh.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/adlnkoh.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/clone/adlnkoh.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/adlnkoh1.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    Completed home registration for s_db_oh
    Executing Technology Stack Configuration...
    Executing runAutoConfig...
    Deleting files of type INSTALL
    Checking for file: /d01/oracle/VIS4/db/tech_st/10.2.0/network/admin/VIS4_blink4/sqlnet.ora
    Processing driver file: /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addbtmpl.drv
    Checking for file: /d01/oracle/VIS4/db/tech_st/10.2.0/dbs/initVIS4.ora
    Checking for file: /d01/oracle/VIS4/db/tech_st/10.2.0/network/admin/VIS4_blink4/listener.ora
    Checking for file: /d01/oracle/VIS4/db/tech_st/10.2.0/network/admin/VIS4_blink4/tnsnames.ora
    Starting CVM in INSTE8_SETUP mode
         Using Context file : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/VIS4_blink4.xml
    Attempting to create a back up of the Context file
    Created back up file of name :
    /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/VIS4_blink4.xml
    ===========================================================================
    Starting synchronization of file system Context file and its templates with those in the database
    Database connection : Failed
    OAM Context editing support feature: Unverified
    OAM Customization support feature : Unverified
    File system template : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adxdbctx.tmp
    Checking for customizations to Context template
    Warning: Unable to connect to Database.
    If the system is OAM enabled, this may result in loss of customizations.
    Looking for custom template at : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/custom/adxdbctx.tmp
    Custom template : Not available
    Customizations found : None
    File system Context file :/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/VIS4_blink4.xml
    Checking the Context file for possible updates from the Database
    Warning: Unable to connect to Database.
    If the system is OAM enabled, this may result in loss of customizations and the Context files in DataBase and in the file system may be unsynchronized
    ===========================================================================
    Starting Updates of Context file Tue Nov 29 18:02:30 GMT+05:30 2011
    found context version : 120.27.12000000.5
    available update version : 120.27.12000000.5
    No updates to apply
    Ending Updates of Context file
    ===========================================================================
    ===========================================================================
    Starting Context Value Management System at Tue Nov 29 18:02:30 GMT+05:30 2011
    Using version 120.8.12000000.4
    Options:
    Force : no
    Contextfile : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/VIS4_blink4.xml
    Templatefile : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adxdbctx.tmp
    ValueUpdateFile : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adcvmdb.xml
    Verifying value management system requirements:
    ContextFile : VALID
    Template File : VALID
    ValueUpdateFile : VALID
    Parsing the ValueUpdateFile
    [ s_contextfile ]
    Action : seed
    Change reason : Setting the location to what has been specified by user
    New value : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/VIS4_blink4.xml
    [ s_tools_oranls ]
    Action : translate
    WARNING : Variable missing - skipping
    ===========================================================================
    [ Config tool : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/bin/adgentns.pl ]
    Command : /d01/oracle/VIS4/db/tech_st/10.2.0/perl/bin/perl -I /d01/oracle/VIS4/db/tech_st/10.2.0/perl/lib/5.8.3 -I /d01/oracle/VIS4/db/tech_st/10.2.0/perl/lib/site_perl/5.8.3 -I /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/perl /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/bin/adgentns.pl PASSWORD contextfile=/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/VIS4_blink4.xml logdir=/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/log/VIS4_blink4
    Action : execute
    SCRIPT RETURNED:
    Generate Tns Names
         Classpath : :/d01/oracle/VIS4/db/tech_st/10.2.0/jdbc/lib/ojdbc14.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/java/xmlparserv2.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/java:/d01/oracle/VIS4/db/tech_st/10.2.0/jlib/netcfg.jar:/d01/oracle/VIS4/db/tech_st/10.2.0/jlib/ldapjclnt10.jar
    Loading ORACLE_HOME environment from /d01/oracle/VIS4/db/tech_st/10.2.0
    Logfile: /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/log/VIS4_blink4/NetServiceHandler.log
    Error generating tnsnames.ora from the database, temperory tnsnames.ora will be generated using templates
    Instantiating templates
    tnsnames.ora instantiated
    listener.ora instantiated
    adgentns.pl exiting with status 25600
    ERRORCODE = 25600 ERRORCODE_END
    .end std out.
    .end err out.
    Result : FAILED
    ===========================================================================
    Ending Context Value Management System.
    ===========================================================================
    ===========================================================================
    No uploading of Context file and its templates to database. Database conection failed
    ===========================================================================
    Finished running CVM.....
    Processing DriverFile = /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addbtmpl.drv
    AutoConfig Profile Phase
    Running Instantiation Drivers for AppsUtil
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/ons_config_db.tmp
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/opmn/conf/ons.config
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/opmn/conf/ons.config to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/ons.config
    setting permissions: 644
    setting ownership: oravis12:dba
    Creation of Directory - /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4 Succeeded.
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adexecsql.pl
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adexecsql.pl
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adexecsql.pl to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adexecsql.pl
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adstopdb.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adstopdb.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adstopdb.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adstopdb.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adstrtdb.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adstrtdb.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adstrtdb.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adstrtdb.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    Creation of Directory - /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4 Succeeded.
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addbccnv.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbccnv.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbccnv.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/addbccnv.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adcrobj.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrobj.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrobj.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adcrobj.sql
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adchknls.pl
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adchknls.pl
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adchknls.pl to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adchknls.pl
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/ad8idbux.env
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/VIS4_blink4.env
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/VIS4_blink4.env to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/VIS4_blink4.env
    setting permissions: 644
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adupdlib_ux.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adupdlib.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adupdlib.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adupdlib.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adsvdb.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adsvdb.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adsvdb.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adsvdb.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adsvdlsn.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adsvdlsn.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adsvdlsn.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adsvdlsn.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adsvdcnv.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adsvdcnv.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adsvdcnv.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adsvdcnv.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addbprf.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbprf.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbprf.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/addbprf.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addbprf.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbprf.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbprf.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/addbprf.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/afdbprf.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/afdbprf.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/afdbprf.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/afdbprf.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/afdbprf.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/afdbprf.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/afdbprf.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/afdbprf.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addbctl.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/addbctl.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/addbctl.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/addbctl.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addlnctl.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/addlnctl.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/addlnctl.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/addlnctl.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adlsnodes_ux.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adlsnodes.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adlsnodes.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adlsnodes.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adcrobj.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrobj.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrobj.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adcrobj.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/txkConfigDbOcm.pl
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/txkConfigDbOcm.pl
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/txkConfigDbOcm.pl to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/txkConfigDbOcm.pl
    setting permissions: 700
    setting ownership: oravis12:dba
    File /d01/oracle/VIS4/db/tech_st/10.2.0/dbs/initVIS4.ora of type INSTALL does not exist, will be instantiated in the current pass
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/afinit_db102.ora
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/dbs/initVIS4.ora
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/dbs/initVIS4.ora to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/initVIS4.ora
    setting ownership: oravis12:dba
    File /d01/oracle/VIS4/db/tech_st/10.2.0/network/admin/VIS4_blink4/listener.ora of type INSTALL already exists, this file will not be instantiated.
    File /d01/oracle/VIS4/db/tech_st/10.2.0/network/admin/VIS4_blink4/tnsnames.ora of type INSTALL already exists, this file will not be instantiated.
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/config_ux.tmp
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/rdbms/lib/config.c
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/rdbms/lib/config.c to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/config.c
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adautocfg_ux.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adautocfg.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adautocfg.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adautocfg.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adlicnse.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adlicnse.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adlicnse.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adlicnse.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adclobconv.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adclobconv.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adclobconv.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adclobconv.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adclobtmp.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adclobtmp.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adclobtmp.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adclobtmp.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adpreclone.pl
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adpreclone.pl
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adpreclone.pl to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adpreclone.pl
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adcrdb.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrdb.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrdb.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adcrdb.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/addbupdgsm.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbupdgsm.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/addbupdgsm.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/addbupdgsm.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adlnkoh.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/adlnkoh.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/adlnkoh.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adlnkoh.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adcrdbrdlg.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrdbrdlg.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcrdbrdlg.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adcrdbrdlg.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/afmkinit.sh
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/afmkinit.sh
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/afmkinit.sh to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/afmkinit.sh
    setting permissions: 700
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adcmclean.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcmclean.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcmclean.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adcmclean.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    instantiate file:
    source : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/template/adcctclean.sql
    dest : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcctclean.sql
    backup : /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/install/VIS4_blink4/adcctclean.sql to /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/out/VIS4_blink4/11291802/adcctclean.sql
    setting permissions: 600
    setting ownership: oravis12:dba
    AutoConfig Setup Phase
    Running Setup Process 1 of 2 for AppsUtil
    Executing script in InstantiateFile:
    /d01/oracle/VIS4/db/tech_st/10.2.0/perl/bin/perl -I /d01/oracle/VIS4/db/tech_st/10.2.0/perl/lib/5.8.3 -I /d01/oracle/VIS4/db/tech_st/10.2.0/perl/lib/site_perl/5.8.3 -I /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/perl /d01/oracle/VIS4/db/tech_st/10.2.0/appsutil/scripts/VIS4_blink4/adchknls.pl

  • Cloning on r12

    Dear all,
    R12 on solaris 10
    I cloned DB tier successfuly,when am cloning application tier , am getting the following error :
    StackTrace -
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
            at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:67)
            at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NoSuchMethodError: oracle.apps.ad.autoconfig.InstantiateFile.writeReport(Ljava/util/Vector;Loracle/apps/ad/util/LogFile;I)V
            at oracle.apps.ad.clone.ApplyApplTop.checkAutoConfigErr(ApplyApplTop.java:590)
            at oracle.apps.ad.clone.ApplyApplTop.runAutoConfig(ApplyApplTop.java:558)
            at oracle.apps.ad.clone.ApplyApplTop.doConf(ApplyApplTop.java:339)
            at oracle.apps.ad.clone.ApplyApplTop.doApply(ApplyApplTop.java:382)
            at oracle.apps.ad.clone.ApplyApplTop.<init>(ApplyApplTop.java:267)
            at oracle.apps.ad.clone.ApplyAppsTier.<init>(ApplyAppsTier.java:105)
            ... 6 more
    ERROR while running Apply...
    Sun Dec 27 23:17:56 2009
    ERROR: Failed to execute /u01/oradec/apps/apps_st/comn/clone/bin/adclone.pllog file doesnt reveal any additional message except messages like
    SQLPLUS Executable : /u01/oradec/apps/tech_st/10.1.2/bin/sqlplus
    SQL*Plus: Release 10.1.0.5.0 - Production on Sun Dec 27 23:09:45 2009
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Enter value for 1: Enter value for 2: Enter value for 3: ERROR:
    ORA-12705: invalid or unknown NLS parameter value specified
    Error encountered while running /u01/oradec/inst/apps/DEC27_medapps01/admin/install/bisdblrp.sql
    ERRORCODE = 256 ERRORCODE_END
    .end std out.
    and this errors remains for many sql scripts like amswebprf.sql,wshadmprf.sqlAny idea ?
    Kai

    Kai,
    Do you have proper entry in the hosts file?
    Did you install all OS pre-req. software/packages before running postclone on this node?
    The same error is reported in these documents, please see if it is applicable.
    Note: 603104.1 - Troubleshooting RapidClone issues with Oracle Applications R12
    Note: 566716.1 - Rapid Clone fails with RC-50004 error Rasing NoSuchMethodError java exception [
    Note: 412044.1 - Application Management Pack for Oracle E-Business Suite Release 2.0 and 2.0.1 Troubleshooting Guide
    Regards,
    Hussein

  • Question on Vector Mask Functionality

    Hello everyone, I'm fairly new to Photoshop CS 5 so I apologize if I am asking the wrong type of questions, here goes:
    When working with Vector Masks can you:
    1) "Link" or "share" one image's vector mask with other images? (ex. If I made "Building A" then duplicated it, but then wanted to change what Building A looked like, I would only have to change the source mask and the copies would be updated.
    2) Move the image independent of the vector mask (it seems like I can only move the vector mask, not the image itself). Or in other words: can I move the image and have the mask follow it, instead of only being able to move the vector mask inside of the image boundaries?
    My application of the question:
    I'm making a 2D top down layout of a "city block" type area. To fill in the buildings, I've made Building A,B,C etc, and use multiple copies of each building. Ideally, I would like to be able to "link" or share say Building A's vector mask with all the other instances of Building A (so that when I change the master, they all change to the new mask shape). The second behavior I'm trying to find is the ability to move the layer without moving where the Vector Mask is on that layer (since it seems that you can only move where the mask is, meaning that even if I could share masks, they would all end up in the same place meaning I would have to re-position each one by hand again.
    Any ideas are appreciated, thank you for reading.

    When working with Vector Masks can you:
    1) "Link" or "share" one image's vector mask with other images? (ex. If I made "Building A" then duplicated it, but then wanted to change what Building A looked like, I would only have to change the source mask and the copies would be updated.
    Yes, this is possible, but not with the classic layer vector mask system in Photoshop. Layer masks are part of a layer, and not individual layers themselves, so they cannot be converted into a reusable object.
    The solution is to avoid vector layer masks, and use a clipping mask/layer instead. A clipping mask/layer CAN be converted to a reusable smart object, and when you change one, all the other instances change as well.
    The second part of the solution is to convert both the content layer(s) and the clipping mask/layer to a smart object. Then group the lot. Incidentally, if your buildings are made up of several elements you merely have to include those additional elements in the clipping group. Another advantage is that each elements can still have its own regular layer mask. Win win situation. And layer effects can be applied to clipping layers/masks, which is again impossible for layer masks. It also opens up the gates to a far less destructive workflow.
    2) Move the image independent of the vector mask (it seems like I can only move the vector mask, not the image itself). Or in other words: can I move the image and have the mask follow it, instead of only being able to move the vector mask inside of the image boundaries?
    This is also solved when using clipping masks/layers - both the content and the mask can be moved independently as regular layers. Another advantage is that both can also be transformed individually.
    My application of the question:
    I'm making a 2D top down layout of a "city block" type area. To fill in the buildings, I've made Building A,B,C etc, and use multiple copies of each building. Ideally, I would like to be able to "link" or share say Building A's vector mask with all the other instances of Building A (so that when I change the master, they all change to the new mask shape). The second behavior I'm trying to find is the ability to move the layer without moving where the Vector Mask is on that layer (since it seems that you can only move where the mask is, meaning that even if I could share masks, they would all end up in the same place meaning I would have to re-position each one by hand again.
    Any ideas are appreciated, thank you for reading.
    So here is my solution. I made a sample with two top view buildings that should be reused the way you want:
    1) FIrst create groups for each building, and put the content in those. Then trace vector layer shapes over the content. Set the transparency for the mask layers to a sensible opacity setting for easier masking.
    2) Put the vector shape below the content layer for each building. Then for (1) and (2), <ALT> click on the border between the content and the shape layer. (<OPTION> for Mac) This will mask the building content. (3) Do not forget to reset the layer opacity for the shape layers back to 100%!
    3) Next, let's convert these building into recyclable objects. Convert each content and clipping mask layer to a smart object. Then rename those smart object layers to something sensible (honestly, I forgot to label the layers properly earlier, but you catch my meaning here ;-)
    Done! To clone each building, duplicate the layer groups. For each instance you can move the content (handy if you are sharing multiple building graphics in the same bitmap or illustrator file), or you can decide to move the mask instead. Or both. Same holds true for transforming. Your choice. To move or transform a building, select the layer group.
    To change or amend the masks or content, double-click on the smart object of your choice, and make some changes.
    Also, don't forget that you can insert additional elements in a clipping group by placing it above the first clipped layer, and then <ALT> clicking again on the border between them. So in theory you could start constructing different looking buildings by adding in other smart objects in the clipping groups. The sky is the limit! This way you can create several building blocks to construct various buildings with different looks. And still limit the number of blocks - and all update-able.
    Unfortunately, this is where the workflow breaks down a tad: due to the smart object's implementation in Photoshop you CANNOT edit the mask or building's content in context - instead it opens up in its own file window. This can be somewhat mitigated by placing both windows side by side (window->Arrange-->Two-up Vertical).
    This brings us to the second caveat: when you do make a change, the edits are not updated in realtime in the master document. You must first save. Again a bit of a workflow breaker, but still... At least you now have a non-destructive instanced workflow.
    The smart object content can be replaced easily with a right-mouse click on the smart object layer itself. Or use a externally referenced smart object instead if you prefer to generate your buildings in an external application.
    Btw, Photoline's layer system is far more logical and easier to use for this type of work. Layer masks behave like regular layers. Layers, groups, masks, external file layers, and so on can be virtually cloned and instanced like smart objects, but the master object is editable in context, and all the other instances update in realtime. So it is more convenient. At least, that is my experience.
    Hope this was helpful! Now go build your cities. :-)
    PS: I was thinking: isn't Illustrator or InDesign is far more logical choice for this type of work where you need access to reusable blocks of content? It would also be a more efficient and speedier workflow - Photoshop isn't really meant for this type of work. And Illustrator and InDesign potentially provide better output quality. You can also divide your work in pages, and so on. Then again, you would probably lose the flexibility of smart objects.

  • Cloned datasource, but unable to use the both at the same time

    I used the AVTransmit java application as sampe to build my applet for transmitting realtime image from the webcam. I desired that it has a container to contain the player and it has a button for RTP transmission.
    I have used the Manager.createCloneableDataSource(ds) to clone the datasource from webcam.
    The applet can display realtime image on the container. While I clicked the button, the container hanged up and then changed to black. But the data can transmit by RTP part. I can receive the transmitted image in another PC.
    Do you have any idea ?
         public void init() {
              Component vc = null;
              Component cp = null;
              JPanel visualContainer = new JPanel();
              visualContainer.setLayout(new BorderLayout());
              JPanel mainPanel = new JPanel();
              mainPanel.setLayout(new GridLayout(2,1));
              JPanel inputPanel = new JPanel();
              inputPanel.setLayout(new GridLayout(2,1));
              Vector vlist = CaptureDeviceManager.getDeviceList(new VideoFormat(VideoFormat.YUV));
              for (int i = 0; i < vlist.size(); i++) {
                   CaptureDeviceInfo vinfo = (CaptureDeviceInfo)vlist.elementAt(i);
                   locator = vinfo.getLocator();
              try {
                   ds = Manager.createDataSource(locator);
              } catch (Exception e) {
                   System.err.println("Unable to create DataSource from : " + locator);
                   System.exit(0);
              ds = Manager.createCloneableDataSource(ds);
              if (ds == null) {
                   System.err.println("Unable to clone the DataSource");
                   System.exit(0);
              try {
                   player = Manager.createRealizedPlayer(ds);               
              } catch (Exception e) {
                   System.err.println("Unable to create a player from the DataSource :" + e);
              player.addControllerListener(new PlayerStateListener());
              //Realize the player
              player.prefetch();
              if (!waitForPlayerState(player.Prefetched)) {
                   System.err.println("Failed to realize the player");
                   //return false;
              if ((vc = player.getVisualComponent()) != null)
                   visualContainer.add(vc, BorderLayout.CENTER);
              if ((cp = player.getVisualComponent()) != null)
                   visualContainer.add(cp, BorderLayout.SOUTH);
              player.start();
              mainPanel.add(visualContainer);
              System.out.println(player);          
              setVisible(true);
              getContentPane().setLayout(new BorderLayout());
              ipAddressField = new JTextField();
              pbField = new JTextField();
              sendButton = new JButton("Submit");
              sendButton.addActionListener(this);
              inputPanel.add(ipAddressField);
              inputPanel.add(pbField);
              inputPanel.add(sendButton);
              mainPanel.add(inputPanel);
              getContentPane().add(mainPanel);
              System.out.println("locator = " + locator);
    // this is the code segment for RTP transmit
              try {
                   processor = javax.media.Manager.createProcessor(ds);          
              } catch (NoProcessorException npe) {
                   return "Couldn't create processor";
              } catch (IOException ioe) {
                   return "IOException creating processor";
              // Wait for it to configure
              boolean result = waitForProcessorState(processor, Processor.Configured);
              if (result == false)
                   return "Couldn't configure processor";
              // Get the tracks from the processor
              TrackControl [] tracks = processor.getTrackControls();
              // Do we have atleast one track?
              if (tracks == null || tracks.length < 1)
                   return "Couldn't find tracks in processor";
              // Set the output content descriptor to RAW_RTP
              // This will limit the supported formats reported from
              // Track.getSupportedFormats to only valid RTP formats.
              ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW_RTP);
              processor.setContentDescriptor(cd);
              Format supported[];
              Format chosen;
              boolean atLeastOneTrack = false;
              // Program the tracks.
              for (int i = 0; i < tracks.length; i++) {
                   Format format = tracks.getFormat();
                   if (tracks[i].isEnabled()) {
                        supported = tracks[i].getSupportedFormats();
                   // We've set the output content to the RAW_RTP.
                   // So all the supported formats should work with RTP.
                   // We'll just pick the first one.
                   if (supported.length > 0) {
                        if (supported[0] instanceof VideoFormat) {
                             // For video formats, we should double check the
                             // sizes since not all formats work in all sizes.
                             chosen = checkForVideoSizes(tracks[i].getFormat(), supported[0]);
                        } else
                             chosen = supported[0];
                             tracks[i].setFormat(chosen);
                             System.err.println("Track " + i + " is set to transmit as:");
                             System.err.println(" " + chosen);
                             atLeastOneTrack = true;
                        } else
                             tracks[i].setEnabled(false);
                        } else
                             tracks[i].setEnabled(false);
              if (!atLeastOneTrack)
                   return "Couldn't set any of the tracks to a valid RTP format";
              // Realize the processor. This will internally create a flow
              // graph and attempt to create an output datasource for JPEG/RTP
              // audio frames.
              result = waitForProcessorState(processor, Controller.Realized);
              if (result == false)
                   return "Couldn't realize processor";
              // Set the JPEG quality to .5.
              setJPEGQuality(processor, 0.5f);
              // Get the output data source of the processor
    Many thank you in advance

    Dear jcparques
    Thank you for your reply.
    I have tried to use the clone datasoure for player and original datasource for RTP transmission, the player displayed black and the RTP successfully, as I can get the live image by another PC. I have tried to use the clone datasoure for RTP and original datasource for player, the player worked normal and the another PC awared the participant joined. It has just waiting the data from RTP.
    I sured the datasource has been cloned as I can System.out.println it, it is not a null.
    Any idea. Thank you very much.

  • Cloning and Unit Of Work

    Hello,
    I have asked this question years ago and unfortunately I dont remember the answer.
    When I do the following code
    Employee employee = new Employee();
    Employee empClone = (Employee)uow.registerObject(employee);
    Does TopLink Unit Of Work framework clone the dependent objects of Employee as well or only the primary object i.e. Employee and its direct fields only ? Say Employee had a Vector of PhoneNumbers. Do the phone number objects get cloned as well ?
    Thanks and apologies if its a FAQ. If somebody could point me to the relevant URL that would be more than sufficient.
    Thanks,
    Aswin.

    The UnitOfWork will clone all reachable objects to form a complete isolated graph of objects for the scope of the transaction. This is minimized with indirection. When a relationship is reached that uses indirection (lazy loading) then the associated object(s) are not cloned until requested.
    Doug

  • Vector.clone() does not work!

    My prog. makes a use of this method several times and hands it in to other methods as an argument but it always returns a refrence to the same Vector instance:
    foo1((Vector)processes.clone());
    foo2((Vector)processes.clone());
    foo3((Vector)processes.clone());
    All these methods operate on the same original Vector. What can I do in order to fix it?
    Thank You,
    Gail,
    Israel.

    Hi, it's not the returned Vector's instance that is the same, but the references contained in those cloned Vectors that are.
    If you have a Vector V1, then add two objects to it, say A and B,
    and then you clone the Vector (V1), you'll get an new Vector V2. However, Vector V2 will have references to A and B, since A and B are not cloned by the Vector's clone() method.
    One calls that way of cloning shallow copy.
    What you probably want is a deep copy, where not only the Vector, but also it's content is cloned.
    That's called a deep copy.
    Search this forum for "deep copy" to read more about it.
    ;) Patrick

  • DataSource cloned returns NULL

    Hi.. I am trying to clone the datasource..
    However, the cloned datasource is just null..
    Can anyone please help....
    Thanks.

    Here is the code. Thanks.
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.media.*;
    import javax.media.rtp.*;
    import javax.media.rtp.event.*;
    import javax.media.rtp.rtcp.*;
    import javax.media.protocol.*;
    import javax.media.format.AudioFormat;
    import javax.media.format.VideoFormat;
    import javax.media.Format;
    import javax.media.format.FormatChangeEvent;
    import javax.media.control.BufferControl;
    import com.sun.media.rtp.RTPSessionMgr;
    import javax.media.control.TrackControl;
    public class ServerBroadcaster005 implements ReceiveStreamListener, SessionListener,ControllerListener
    String serverIP = null;
    int port;
    RTPManager mgrs = null;
    RTPManager listedMgr[]=null;
    private Integer stateLock=new Integer(0);
    PlayerWindow pw=null;
    Processor processor=null;
    private boolean failure;
    private Vector connectedClient=new Vector();
    private SessionAddress newClient;
    boolean dataReceived = false;
    Object dataSync = new Object();
    Player player=null;
    private DataSource firstClone;
    /*public ServerBroadcaster005(String serverIP,String ports) {
         this.serverIP = serverIP;
         port=new Integer(ports).intValue();
    public ServerBroadcaster005() {
         try{
              String ports="80";
              serverIP = InetAddress.getLocalHost().getHostAddress();
              port=new Integer(ports).intValue();
         }catch(UnknownHostException uhe){
              System.out.println("Host NOT Known..");
    /* public void run(){
         if(initialize()){
    protected boolean initialize() {
    try {
         InetAddress ipAddr;
         SessionAddress localAddr = new SessionAddress();
         SessionAddress destAddr;
         // Open the RTP sessions.
              System.err.println(" - Open RTP session for: addr: " + serverIP + " port: " + port);
              mgrs = (RTPManager) RTPManager.newInstance();
              mgrs.addSessionListener(this);
              mgrs.addReceiveStreamListener(this);
              ipAddr = InetAddress.getByName(serverIP);
              localAddr= new SessionAddress( InetAddress.getLocalHost(),port);
    destAddr = new SessionAddress( ipAddr, port);          
              mgrs.initialize( localAddr);
              // You can try out some other buffer size to see
              // if you can get better smoothness.
              BufferControl bc = (BufferControl)mgrs.getControl("javax.media.control.BufferControl");
              if (bc != null)
              bc.setBufferLength(350);
              mgrs.addTarget(destAddr);
    } catch (Exception e){
    System.err.println("Cannot create the RTP Session: " + e.getMessage());
    return false;
         // Wait for data to arrive before moving on.
         long then = System.currentTimeMillis();
         long waitingPeriod = 30000; // wait for a maximum of 30 secs.
         try{
         synchronized (dataSync) {
              //while (!dataReceived && System.currentTimeMillis() - then < waitingPeriod) {
              while (!dataReceived) {
              if (!dataReceived)
                   System.err.println(" - Waiting for RTP data to arrive...");
              dataSync.wait(1000);
         } catch (Exception e) {}
         if (!dataReceived) {
         System.err.println("No RTP data was received.");
         close();
         return false;
    return true;
    * Close the players and the session managers.
    protected void close() {
         // close the RTP session.
         if(pw!=null)
              //player.close();
              pw.close();
              System.out.println("Player closed..");
         if (mgrs!= null) {
    mgrs.removeTargets( "Closing session from AVReceive2");
    mgrs.dispose();
              mgrs = null;
    * ReceiveStreamListener
    public synchronized void update( ReceiveStreamEvent evt) {
         RTPManager mgr = (RTPManager)evt.getSource();
         Participant participant = evt.getParticipant();     // could be null.
         ReceiveStream stream = evt.getReceiveStream(); // could be null.
         if (evt instanceof RemotePayloadChangeEvent) {
         System.err.println(" - Received an RTP PayloadChangeEvent.");
         System.err.println("Sorry, cannot handle payload change.");
         System.exit(0);
         else if (evt instanceof NewReceiveStreamEvent) {
              SessionAddress destAddress;
              InetAddress clientIP;
              int port=85;
              SendStream sendStream;
              DataSource senderDS=null,playerDS=null;     
         try {
              stream = ((NewReceiveStreamEvent)evt).getReceiveStream();
              DataSource ds = stream.getDataSource();
              DataSource ds2=ds;
              // Find out the formats.
              RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
              if (ctl != null){
              System.err.println(" - Recevied new RTP stream: " + ctl.getFormat());
              } else
              System.err.println(" - Recevied new RTP stream");
              if (participant == null)
              System.err.println(" The sender of this stream had yet to be identified.");
              else {
              System.err.println(" The stream comes from: " + participant.getCNAME());
              // create a player by passing datasource to the Media Manager
              player = javax.media.Manager.createPlayer(ds);
              if (player == null)
              return;
              player.addControllerListener(this);
              player.realize();
              pw = new PlayerWindow(player, stream);               
              //addNewClient(InetAddress.getLocalHost().toString(),"86");     
              if(connectedClient==null || connectedClient.size()<1){
                   System.out.println(" -No client is connected..");
              else{
                   System.out.println(" -In connectedClient ..");
              Format h263Format=new VideoFormat(VideoFormat.H263_RTP);
              createMyProcessor(ds2);
              //createMyProcessor(senderDS);
              PushBufferDataSource pbds=(PushBufferDataSource)firstClone;
              PushBufferStream pbss[]=pbds.getStreams();
              RTPManager rtpMgrs[]=new RTPManager[pbss.length];
                   for(int a=0;a<pbss.length;a++){
                   try{
                        rtpMgrs[a]=RTPManager.newInstance();
                        SessionAddress localAddr=new SessionAddress(InetAddress.getLocalHost(),port+2*a);
                        System.out.println("localAddr : "+localAddr);
                        System.out.println("LocalAddress: "+InetAddress.getLocalHost()+" Port: "+port+2*a);                    
                        //-> NOT NEEDED in a newer version of transmitter
                        rtpMgrs[a].initialize(localAddr);     
                        System.out.println(" -RTPManager is initialized for LocalAddress..");          
                        for(int b=0;b<connectedClient.size();b++){
                             Target target=(Target)connectedClient.elementAt(b);
                             int targetPort=new Integer(target.port).intValue();
                             addNewClient(rtpMgrs[a],target.addr,targetPort+2*a);
                             System.out.println(" - A new client at "+target.addr+" with port:"+targetPort+" is added...");
                             System.out.println(" Created RTP session: "+localAddr+" "+targetPort+" to "+target.addr);
                        sendStream=rtpMgrs[a].createSendStream(firstClone,a);
                        sendStream.start();
                        System.out.println(" <-> RTP stream is started..");                         
                   catch(IOException ioe){
                        System.out.println(" --X IOException : "+ioe.getMessage());                    
                   catch(Exception ex){
                        System.out.println(" --X Unable to create RTP Manager...");
                        System.out.println(ex.getMessage());     
         }     // For loop closing
              // Notify intialize() that a new stream had arrived.
              synchronized (dataSync) {
              dataReceived = true;
              dataSync.notifyAll();
         } catch (Exception e) {
              System.err.println("NewReceiveStreamEvent exception " + e.getMessage());
              return;
         else if (evt instanceof StreamMappedEvent) {
         if (stream != null && stream.getDataSource() != null) {
              DataSource ds = stream.getDataSource();
              // Find out the formats.
              RTPControl ctl = (RTPControl)ds.getControl("javax.media.rtp.RTPControl");
              System.err.println(" - The previously unidentified stream ");
              if (ctl != null)
              System.err.println(" " + ctl.getFormat());
              System.err.println(" had now been identified as sent by: " + participant.getCNAME());
         else if (evt instanceof ByeEvent) {
         System.err.println(" - Got \"bye\" from: " + participant.getCNAME());
         if (pw != null) {
              pw.close();
              System.out.println("Player closed..");
         public synchronized void update(SessionEvent evt) {
         if (evt instanceof NewParticipantEvent) {
         Participant p = ((NewParticipantEvent)evt).getParticipant();
         System.err.println(" - A new participant had just joined: " + p.getCNAME());
         public void createMyProcessor(DataSource videoDS)
              boolean result=false;
              DataSource ds=videoDS;
              // Check if the media locator is null
              if(videoDS==null){
                   System.out.println(" --X No datasource..");
              System.out.println(" - Trying to create a Processor..");
              // Try to create Processor from DataSource
              try{
                   processor=Manager.createProcessor(ds);
                   System.out.println(" -Processor is created..");
              }catch(NoProcessorException npe){
                   System.out.println(" --X Unable to create Processor: "+npe.getMessage());
                   //infoField.setText(" --X Unable to create Processor: "+npe.getMessage());
              catch(IOException ioe){
                   System.out.println(" --X IOException creating Processor..");
                   //infoField.setText(" --X IOException creating Processor..");
              // Wait for the processor to be configured
              result=waitForState(processor,Processor.Configured);
              System.out.println(" -Processor is configured : "+result);
              if(result==false){
                   System.out.println(" --X Could not configure processor..");
                   //infoField.setText(" --X Could not configure processor..");
              // Set the track controls for processor
              TrackControl []tracks=processor.getTrackControls();
              if(tracks==null || tracks.length<1){
                   System.err.println(" --X No track is found..");
                   //infoField.setText(" --X No track is found..");               
              }else{
                   System.err.println(" -Track is found..");
              // Set the content description of processor to RAW_RTP format
              // This will limit the supported formats to reported from
              // Track.getSupportedFormats() to valid RTP format
              ContentDescriptor cdes=new ContentDescriptor(ContentDescriptor.RAW_RTP);
              processor.setContentDescriptor(cdes);
              Format []supported;
              Format chosen=null;
              boolean atLeastOneTrack=false;
              for(int i=0;i<tracks.length;i++){
                   Format format=tracks.getFormat();
                   if(tracks[i].isEnabled()){
                        supported=tracks[i].getSupportedFormats();
                        // WE've set the output content to RAW_RTP.
                        // So, all the supporte formats should work with RAW_RTP.
                        // We will pick the first one.
                        if(supported.length>0){
                             if(supported[0] instanceof VideoFormat){                              
                                  chosen=checkVideoSize(tracks[i].getFormat(),supported[0]);
                             }else
                                  chosen=supported[0];
                             tracks[i].setFormat(chosen);
                             System.out.println(" Track "+i+" is transmitted in "+chosen+" format.. ");
                             //infoField.setText(" Track "+i+" is transmitted in "+chosen+" format.. ");
                             atLeastOneTrack=true;
                        }else{
                             // If no format is suitable, track is disabled
                             tracks[i].setEnabled(false);
                   }else
                        tracks[i].setEnabled(false);          
              if(!atLeastOneTrack)
                   System.out.println("atLeastOneTrack: "+atLeastOneTrack);
                   System.out.println(" --X Could Not find track to RTP format..");
                   //infoField.setText("atLeastOneTrack: "+atLeastOneTrack);
                   //infoField.setText(" --X Could Not find track to RTP format..");
              result=waitForState(processor,Controller.Realized);
              if(result==false){
                   System.out.println(" --X Could NOT realize processor...");
                   //infoField.setText(" --X Could NOT realize processor...");
              // Set the JPEG Quality to value 0.5
              //setJPEGQuality(processor,0.5f);
              // Set the output Data Source
              firstClone=processor.getDataOutput();
              //Start the processor
              processor.start();     
              System.out.println(" -processor started...");     
         public boolean waitForState(Processor p,Integer status)
              p.addControllerListener(new StateListener());
              failure=false;
              if(status==Processor.Configured){
                   p.configure();               
              }else if(status==Processor.Realized){
                   p.realize();
              //Wait until an event that confirms the success of the method, or failure of an event
              while(p.getState()<status && !failure){
                   synchronized(getStateLock()){
                        try{
                             System.out.println(" - Processor status : "+p.getState());
                             // Wait
                             getStateLock().wait();
                        }catch(InterruptedException ie){
                             return false;
    //--- DeaD HERE ---------------- :(
              System.out.println(" -Failure :"+failure);
              if(failure)
                   return false;
              else
                   return true;
         public Format checkVideoSize(Format originalFormat,Format supported)
              int width,height;
              Dimension size=((VideoFormat)originalFormat).getSize();     
              Format jpegFormat=new Format(VideoFormat.JPEG_RTP);
              Format h263fmt=new Format(VideoFormat.H263_RTP);
              if(supported.matches(jpegFormat)){
                   width=(size.width%8 == 0 ? size.width:(int)(size.width%8)*8);
                   height=(size.height%8 == 0 ? size.height:(int)(size.height%8)*8);
              }else if(supported.matches(h263fmt)){
                   if(size.width<128){
                        width=128;
                        height=96;
                   }else if(size.width<176){
                        width=176;
                        height=144;
                   }else{
                        width=352;
                        height=288;
              }else{
                   // Unknown format, just return it.
                   return supported;
              return (new VideoFormat(null,new Dimension(width,height),Format.NOT_SPECIFIED,null,Format.NOT_SPECIFIED)).intersects(supported);
         public Integer getStateLock(){
              System.out.println("StateLock : "+stateLock);
              return stateLock;
         public void setFailure(){
              failure=true;
         public void addNewClient(String dip,String portno){
              if(dip!=null && portno!=null){
                   Target currentTarget=new Target(dip,portno);
                   if(connectedClient==null){
                        //connectedClient=new Vector();
                        System.out.println(" No client is to be added, vector is null");
                   for(int i=0;i<listedMgr.length;i++){
                        int dport=new Integer(portno).intValue();
                        addNewClient(listedMgr[i],dip,dport);
                   connectedClient.addElement(currentTarget);
         public void addNewClient(RTPManager mgr,String dip,int port){
              try{
                   SessionAddress addr=new SessionAddress(InetAddress.getByName(dip),new Integer(port).intValue());
                   mgr.addTarget(addr);
              }catch(Exception ex){
                   System.out.println(" --X Unable to add New Client to the list.."+ex.getMessage());
         public void removeTarget(String ipz,String ports)
              try{
                   SessionAddress addrs=new SessionAddress(InetAddress.getByName(ipz),new Integer(ports).intValue());
                   for(int i=0;i<listedMgr.length;i++){
                        listedMgr[i].removeTarget(addrs,"Target REMOVED from Trasmitter..");
              }catch(Exception ex){
                   System.out.println(" -Unable to remove the target..");
         public void stop() {
         synchronized (this) {
         for (int i= 0; i < listedMgr.length; i++) {
         listedMgr[ i].removeTargets( "Session ended.");
              listedMgr[ i].dispose();
              System.out.println(" -Retransmission TERMINATED..");
    * ControllerListener for the Players.
    public synchronized void controllerUpdate(ControllerEvent ce) {
         Player p = (Player)ce.getSourceController();
         if (p == null)
         return;
         // Get this when the internal players are realized.
         if (ce instanceof RealizeCompleteEvent) {
         if (pw == null) {
              // Some strange happened.
              System.err.println("Internal error!");
              System.exit(-1);
         pw.initialize();
         pw.setVisible(true);
         player.start();
         if (ce instanceof ControllerErrorEvent) {
         player.removeControllerListener(this);
         pw.close();     
         System.err.println("server-ReTransmitter001 internal error: " + ce);
    * GUI classes for the Player.
    class PlayerWindow extends Frame{
         Player player;
         ReceiveStream stream;
         PlayerWindow(Player p, ReceiveStream strm) {
         player = p;
         stream = strm;
         public void initialize() {
         add(new PlayerPanel(player));
         public void close() {
         player.close();
         setVisible(false);
         dispose();
         public void addNotify() {
         super.addNotify();
         pack();
    * GUI classes for the Player.
    class PlayerPanel extends Panel {
         Component vc, cc;
         PlayerPanel(Player p) {
         setLayout(new BorderLayout());
         if ((vc = p.getVisualComponent()) != null)
              add("Center", vc);
         if ((cc = p.getControlPanelComponent()) != null)
              add("South", cc);
         public Dimension getPreferredSize() {
         int w = 0, h = 0;
         if (vc != null) {
              Dimension size = vc.getPreferredSize();
              w = size.width;
              h = size.height;
         if (cc != null) {
              Dimension size = cc.getPreferredSize();
              if (w == 0)
              w = size.width;
              h += size.height;
         if (w < 160)
              w = 160;
         return new Dimension(w, h);
    public static void main(String argv[]) {
         //serverReTransmitter001 vReceive = new serverReTransmitter001("192.168.0.9","80");
         ServerBroadcaster005 vReceive = new ServerBroadcaster005();
         if (!vReceive.initialize()) {
         System.err.println("Failed to initialize the sessions.");
         System.exit(-1);
         System.err.println("Exiting ServerBroadcaster005..");
         * StateListener class to handle Controller events
         class StateListener implements ControllerListener{
              public void controllerUpdate(ControllerEvent ce){
                   if(ce instanceof ControllerClosedEvent){
                        processor.close();
                   /* Handle all controller events and notify all
                   waiting thread in waitForState method */
                   if(ce instanceof ControllerEvent){
                        synchronized(getStateLock()){
                             getStateLock().notifyAll();
    }// end of AVReceive2

  • Quick Vector Clone Question

    The documentation for the clone() method in the Vector class says that the method will
    /**   The copy will contain a
         * reference to a clone of the internal data array, not a reference
         * to the original internal data array of this Vector object.
    */I wanted to confirm that according to the above documentation, AFTER changing or modifying the original Vector, those changes will NOT be seen / reflected in the cloned Vector.
    Furthermore, what about 2D and 3D Vectors. Vectors that may contain other Vectors as their objects. Do I need a "deepClone()" method... or will "clone() " handle all the copying for me?
    -Thanks in advance

    Hey thanks for the clarification... so this
    mutability term is a somewhat "looser" definition
    than what I had originally assumed it to be. It's certainly not part of the Java language, but it is pretty widely accepted to refer only to objects, and to mean that the state cannot be changed (or cannot be changed in a way that will be visible publicly) afte the object has been created.
    So
    getting back to the clone part of this discussion. Is
    there a relationship between how Suns choice of their
    Objects mutability vs. Suns choice of their
    respective clone() implementation? .. or are they two
    different, and/or unrelated things?Not sure what you mean here, but there would be no reason to ever make an immutable object cloneable. String, all the wrapper classes, BigInteger, these are all immutable, and so it's pointless to clone them*. Since the copies will be indistinguishable from the original, and the state can never change, there's no reason to clone them.
    Furtheremore, If I remember correctly, a Vectors
    clone method JavaDoc describes the method as
    follows:
    /** The copy will contain a reference to a
    clone of the internal data array,
    not a reference to the original internal data array
    of the Vector object.
    */...which suggests that a call such as:
    (Assume for example I have a Vector ("myOldVector")
    with 12 elements)
    Vector myNewVector = myOldVector.clone();... would produce 2 Vectors and a total of 24
    distinct Objects...No. There wil be two Vectors. Each Vector will have a reference to an array. The two arrays will be distinct. Each array will refer to the same group of objects.
    So if you clone a Vector of 12 dates, you'll still have 12 dates, but now you'll have two different arrays referring to those 12 dates. If you change the contents of one of the Dates, both Vectors will see it. If you change the contents of one of the arrays (i.e., remove an element, or point it at a different Date objectd), it will only be seen by one Vector.
    I know that the "toString()" method for a Vector will
    call each of its elements respective toString()
    method during its process, I was assuming that a
    clone() method would do the same thing after creating
    a new Vector. .. which would recursively handle any
    nested Vectors appropriately as well.Why would you assume that? The docs for Vector's toString say that it toStrings each element. The docs for Vector's clone method don't say that--they say it just clones the array (not the objects referred to by the array).
    Is this or is this not how the clone operation
    executes? ... from reading the Cloneable interface
    documentation, it suggests to me that this could be
    the case...Why not peruse the source code for Vector's clone method? It's in src.zip in the JDK download.
    *Okay, there could be a reason to clone them, but it's not something would normally be an issue when coding. For generational issues related to GC, it could theoretically be beneficial to create a new object, to be referred to by other new objects, rather than letting new objects refer to an old object. I only add this for thorughness' sake, not because it really matters for your purposes.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for