Have a transaction propagated to two remote machines!!!(URGENT!!!)

          Can we have a transaction propagated to two ejb's in different machines if we have database interaction in both?
          I tested it out with Account beans (examples)
          deployed on two different(remote) servers both servers having the same connection pool name and the mapping to the
          same oracle database (Using the oracle thin driver as well as the Weblogic Driver). One of the beans is in a local server and one in a remote server and both are accessed in the
          same transaction context. What happens is that the 2nd bean accessed throws a Null pointer Exception
          when it tries to getConnection().
          This is the server side stack trace -----
          SQLException: java.sql.SQLException: java.lang.NullPointerException:
          Start server side stack trace:
          java.lang.NullPointerException
          at weblogic.jdbc.common.internal.ConnectionMOWrapper.<init>(ConnectionMO
          Wrapper.java:42)
          at weblogic.jdbc.common.internal.ConnectionEnv.setConnection(ConnectionE
          nv.java:142)
          at weblogic.jdbc.common.internal.DriverProxy.execute(DriverProxy.java:17
          3)
          at weblogic.t3.srvr.ClientRequest.execute(ClientContext.java:1030)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
          End server side stack trace
          It appears that when the database call on the 2nd WL server is routed to the first WL server(the server that established the first connection for the transaction) for the database connection it is not able to find the connection( and hence the bombing). I'm going nuts over this for two days. Please help. We need to use Weblogic for our project and i need to confirm that this functionality works!!!!
          I'm attaching the stateless bean code which accesses both these beans.
          [TraderBean.java]
          

          Hi,
          Are you using cluster?
          Definitely you can be in one transaction if you just access one data source. that's two phase transaction.
          "kartik" <[email protected]> wrote:
          >
          >
          >
          >Can we have a transaction propagated to two ejb's in different machines if we have database interaction in both?
          >
          >I tested it out with Account beans (examples)
          > deployed on two different(remote) servers both servers having the same connection pool name and the mapping to the
          > same oracle database (Using the oracle thin driver as well as the Weblogic Driver). One of the beans is in a local server and one in a remote server and both are accessed in the
          > same transaction context. What happens is that the 2nd bean accessed throws a Null pointer Exception
          > when it tries to getConnection().
          >
          >This is the server side stack trace -----
          >SQLException: java.sql.SQLException: java.lang.NullPointerException:
          >Start server side stack trace:
          >java.lang.NullPointerException
          > at weblogic.jdbc.common.internal.ConnectionMOWrapper.<init>(ConnectionMO
          >Wrapper.java:42)
          > at weblogic.jdbc.common.internal.ConnectionEnv.setConnection(ConnectionE
          >nv.java:142)
          > at weblogic.jdbc.common.internal.DriverProxy.execute(DriverProxy.java:17
          >3)
          > at weblogic.t3.srvr.ClientRequest.execute(ClientContext.java:1030)
          > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
          >End server side stack trace
          >-----------------
          >
          >It appears that when the database call on the 2nd WL server is routed to the first WL server(the server that established the first connection for the transaction) for the database connection it is not able to find the connection( and hence the bombing). I'm going nuts over this for two days. Please help. We need to use Weblogic for our project and i need to confirm that this functionality works!!!!
          >
          >I'm attaching the stateless bean code which accesses both these beans.
          >
          

Similar Messages

  • SSDT/SSIS 2012 project won't deploy to SSISDB on remote machine URGENT

    hi all getting the incredibly frustrating error message.  I've tried changing SQL Accounts etc. but to no avail.  What are the requirements to be able to deploy a project??? i have created ssisdb, and have deployed in the past but now it is not working.
     all ports etc. are open between me and target machine.  
    *** UPDATE *** I have even created a new folder THROUGH SSDT and it still won't deploy to it!!! This is really slack that such a critical feature can be plagued by stupid bug/permissions issues!!!

    Hi jhowe1,
    Glad to hear that you have resolved the issue. Thank you for the valuable sharing.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • How to run a PS script on a remote machine

    Hi,
    I have a script located on a remote machine at c:\Temp\Script1.ps1  I want to run this script remotely from a driver system.  Via Powershell remoting on the driver machine, I run the following:
    $cred = Get-Credential Domain1\User1
    $Sessid = New-Pssession DC1
    Invoke-Command -session $sessid -cred $cred -ScriptBlock {c:\temp\Script1.ps1}
    I get an error 'Invoke-Command : Parameter set cannot be resolved using the specified named parameters.
    I see the Session ID created and opened fine and the script runs fine on its own on the remote machine.
    Any suggestions as to how to resolve the error
    Thanks for your help! SdeDot

    You don't say what the client machine is, but if it is a windows PC you could use the TEXT_IO package that comes as part of Oracle Forms or procedure builder. Alternatively you could use the client version of SQL*Loader. If neither of these options are feasible, why not just copy the file on to the server and use UTL_FILE, SQL*Loader, or define an extrnal table?
    Regards,
    Steve Rooney

  • Security issue to access remote ejbs, URGENT!!! please and thanks.

    Hi gurus:
    I have questions for you. I need to access remote ejbs. the ejb(beans) have been
    deployed on remote machine. I have helper class file to do JNDI lookup to point
    the machine and find it.
    I have local machine to have all of home interfaces, remote interfaces and stub
    classes and common classes. I have local jsp and config weblogic-web.xml to allow
    test user to access.
    Sometimes fine but got the following message and error from my local machine.
    I have no clue about that. Is any other issue that remote machine have security
    to limit clients to access beans. Because remote wl server startup as system/weblogic.
    If my local machine startup as system/weblogic too. It has no problem at all.
    This doesn't make sense for my local machine has to have same system's password
    as remote machine. Should have some issues to limit clients to access remote beans.
    Thank you for any helps and suggestions in advance.
    Steven.
    ####<Jun 7, 2001 10:34:25 AM CDT> <Error> <HTTP> <stevenzhu> <myserver> <ExecuteThread-14>
    <springbow> <> <101020> <[WebAppServletContext(8365803,public_html)] Servlet failed
    with Exception>
    java.lang.SecurityException: Authentication for user test denied in realm wl_realm
    at weblogic.rmi.internal.AbstractOutboundRequest.sendReceive(AbstractOutboundRequest.java:90)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
    at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(ServerNamingNode_WLStub.java:121)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
    at com.sprint.common.util.EJBHelper.getHomeInterface(EJBHelper.java:172)
    at com.sprint.common.util.EJBHelper.getOrganizationSLHome(EJBHelper.java:122)
    at com.sprint.common.organization.OrganizationBean.getOrganizationHome(OrganizationBean.java:290)
    at com.sprint.common.organization.OrganizationBean.getOrganizationRemote(OrganizationBean.java:315)
    at com.sprint.common.organization.OrganizationBean.findEmployee(OrganizationBean.java:107)
    at jsp_servlet._ehr._vieworganizationalhierarchy._jspService(_vieworganizationalhierarchy.java:173)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

    well, if we post in other threads, they tell me that it is ARD and server technology. If you try to post back to my mac in the normal threads about Leopard, they point us to this thread.
    It seems that a lot of people are frantically looking for someone who can explain in plain english how to do the remote desktop - is remote desktop the same technology as back to my mac?
    Extremely frustrating for people like me who don't have unix or programming language experience... We choose for mac because we wanted user friendlyness... What a joke!

  • Screen sharing crashes remote machine with two monitors in 10.7.2

    Hello,
    Whenever i connect to my Mac Pro (running 10.7.2 now), the machine hangs completely if my two monitors are connected.  This happens both over the network using Back to my Mac and Slink, when on a local network from my macbook Pro and a friends older iBook. (both running Lion). It also happens from a VNC client (remoter vnc) from my ipad. If i disconnect my second monitor, it works fine in all cases.  Is anyone else experience a remote machine crash when trying to screen share?
    I can connect to the disks fine. it's just screen sharing
    I recently refromatted my machine and it was working fine before then -- but i imagine the problem stems from 10.7.2 since i both reformatted and upgraded.
    thanks
    dan

    If you want to insure that Apple actually knows this is an issue, you should your own bug report
      BugReporter
    <http://bugreporter.apple.com>
    Free ADC (Apple Developer Connection) account needed for BugReporter.
    Anyone can get a free account at:
    <http://developer.apple.com/programs/register/>

  • I have two (paid) copies of lightroom 5 from your photography promotion installed (on two different machines). I would like to deactivate one copy on one desktop so I can install a copy on my laptop. How do I go about this?

    I have two (paid) copies of lightroom 5 from your photography promotion installed (on two different machines). I would like to deactivate one copy on one desktop so I can install a copy on my laptop. How do I go about this?

    While the standalone version of LR has no deactivation, the Photography Program which is LR + PS-CC bundled and licensed through the Cloud will have a 2-activation limit per Adobe ID, and you cannot decouple the LR from the PS-CC in the Photographers Bundle. 
    You can license the cloud on up to two computers per AdobeID by signing into the cloud.  When you try to sign in on a third computer you have the option to deactivate the other two copies, which you can do, and then never sign into the cloud on the one computer you don’t want activated and you’ll be fine.

  • We have two remote location when we makes this remote location pc member of domain (Remote location connected leaselan) it's taking login time more than 40/45 minutes.

    We have two remote location when we makes this remote location pc member of domain (Remote location connected leaselan)
    it's taking login time more than 40/45 minutes.
    Pls suggest.

    Hi,
    It might be Group Policies causing the login process slow.
    Remove any GPOs with Wallpaper or logon scripts on the user\computer account and try again.
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • Update-Help error when console application is run in remote machine via PS remoting

    Hello,
    When I execute a particular console application in a remote machine via PS remoting, I get an error related to update-help. When I execute it directly on the remote machine, it works...
    My code:
    $credential = Get-Credential -Credential "DomainName\AccountName"
    $session = New-PSSession -ComputerName "MachineName" -Authentication Credssp -Credential $credential;
    Invoke-Command -session $session -ScriptBlock {
    try{
    cd <network share location>
    .\theConsoleApp.exe | Out-File C:\console-output.txt
    $error | Out-File C:\console-error-output.txt
    $exitCode
    } catch {
    throw $error
    Error seen in the console:
    NetNat, PcsvDevice, PSDesiredStateConfiguration, SoftwareInventoryLogging, StartScreen, TLS, WindowsSearch' with UI culture(s) {en-US} : Unable to retrieve the HelpInfo XML file for
    UI culture en-US. Make sure the HelpInfoUri property in the module manifest is valid or check your network connection and then try the command again.
    $error variable from above:
    Errored out (exit code 1603) with error message: ErrorId 10010: Xpatch threw an unexpected exception: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    I’ve tried
    two different user accounts
    multiple file share locations
    different OSs
    different target servers
    but have not determined the cause of the error.
    I would appreciate any help on this.
    -Rohan.

    Clearly the remote EXE cannot run in that context.  YOU should not run that program remotely.
    I suspect there is also information you are not giving to us.
    ¯\_(ツ)_/¯

  • Steps to setup and configure Node Manager on local and remote machine

    Hello,
    I am using WLS 10.3 on Windows.
    I have two machines, One cluster and two managed servers (one on each machine) created under a domain. I have used configuration wizard to create the domain.
    I have gone through documents on Node Manager and found what to configure. But I have not found when to configure. In other words I want to know what is the sequence of steps if I have to set Node Manager on my local machine (in which domain exists) and on remote machine.
    Please let me know the sequence of steps I need to follow to set and configure the Node Manager on local and remote machine. I want to use Java Node Manager (not the Script node manager).
    Thanks,
    Sanjay

    Hello,
    Ok, let me tell you what I have done till now.
    1) Installed WebLogic 10.3 on machine A (local machine, on which I have created domain and my Admin Server is running. Also Managed Server 1 is created on this machine).
    2) Installed WebLogic 10.3 on machine B (remote machine, on which Managed Server 2 will be created).
    3) On machine A I used the configuration wizard and create a domain. While creating the domain I did the following:
    i) Created two managed servers.
    ii) Created a cluster
    iii) Assigned Servers to cluster.
    iv) Created two machines.
    v) Assigned servers to machines (Admin Server and MS_1 to machine A and MS_2 to machine B).
    4) Sarted Admin Server.
    5) On the Admin Console I made some configurations for the Node Manager on Machines -> Machine A -> Node Manager. Assigned the values:
    i) Type (SSL)
    ii) Listen Address (IP_Address of machine A)
    iii) Listen Port (5556)
    6) Similarly did for Machine B.
    So till now phsically the managed server (MS_2) directory and configuration is not there on Machine B (its only configured on machine A because I created the domain on Machine A).
    Now I want install/configure/setup NM on both the machines. Start my both the managed servers using Admin Console (which will use the node managers).
    What are the sequence of steps I need to follow my task?
    Any help and suggestions are welcome with warm regards.
    Thanks,
    Sanjay

  • How to create a file on a remote machine using PrintStream

    I want to create an HTML file on a remote machine connect via LAN the path is "\\vineet\akh\" akh is folder where I want to save the HTML file. Now in PrintStream i can give only a local file. Please help how to do it

    .. You can do this in two ways!!
    1) easy way
    2) hard way
    1) EASY WAY
    .. as you know for write to a remote dir you must
    a) have shared remote dir
    b) have write permit on remote dir
    if you have point a) and b) the way to follow it's simple as the other user explained to you!!
    2) HARD WAY
    the hard way is to use RMI (Remote Method Invokation)
    i mean to create a service on a remote machine that give to you a remote method that make you write without share anything..!!!
    check it out
    http://tns-www.lcs.mit.edu/manuals/java-api-1.1beta2/guide/rmi/
    i hope i'm been clear!!
    SORRy My english!! (please)
    Alessandro

  • The connection between two Tuxedo machines

    We want to locate our servers(services) onto different machines, we want to know
    :whether the connection,between two machines, is built up at the first time the
    servers booted and kept persistently connectted, or just build up the connection
    when there comes a request.

    Remote machines connect to one another lazily. If you have machines A
    (master), B and C, then B and C do not connect until a request is made
    between B and C. All machines connect to the master at boot time.
    roopesh wrote:
    >
    The connection is persistent and is not request based.
    The machines communicate using BRIDGE.The DBBL which runs
    on the primary master machines keep doing sanity checks
    and health of BBL at all the machines connected and if
    any BBL does not respond for the specified time(set by
    DBBLWAIT) in RESOURCES section.then that machine gets partitioned by DBBL.
    for more info you can read tuxedo documentation.
    Thanks
    Roopesh
    "YANG YI" <[email protected]> wrote:
    We want to locate our servers(services) onto different machines, we want
    to know
    :whether the connection,between two machines, is built up at the first
    time the
    servers booted and kept persistently connectted, or just build up the
    connection
    when there comes a request.

  • Cluster setup in remote machines using weblogic8.1??

              Hi,
              How to run a clustered setup in remote machines??
              This is my setup:
              I have a domain called mydomain
              I have three server instances Adminserver, ManagedServer1 and ManagedServer2.
              I have a cluster called cluster1 with two servers , (ManagedServer1 and ManagedServer2).
              I have two machines, machine1(localhost) and machine2(remote machine connected
              to LAN).
              My machine1 has two servers , Adminserver, ManagedServer1 and
              My machine2 has one server ManagedServer2.
              I have installed weblogic 8.1 in both the machines.
              I have started nodemanager in machine1 .
              Iam able to run Adminserver and Managedserver1 in machine1(localhost)
              My question:
              1. I have to run the managedserver2 in the remote machine.
              2. Should i create a domain of the same name called mydomain in machine2(remote
              machine)???
              3. Already nodemanager is running in machine1.............Should i run nodemanager
              in machine2(remote machine) also ???
              4. What should be my configuration parameters (Java home, bea home,classpath,rootdirectory,arguments)
              for managedserver2 ??? should these details be with respect to machine1 or machine2???
              thanks&rgds,
              girish
              

    you just need to install wls and configure the domain there on that machine
              2 and run the startmanagedserver script to use the admin server url and it
              will get its configuration from there. better yet, if you have a shared
              installation use that.
              "Girish" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              > How to run a clustered setup in remote machines??
              >
              > This is my setup:
              > I have a domain called mydomain
              > I have three server instances Adminserver, ManagedServer1 and
              ManagedServer2.
              > I have a cluster called cluster1 with two servers , (ManagedServer1 and
              ManagedServer2).
              > I have two machines, machine1(localhost) and machine2(remote machine
              connected
              > to LAN).
              > My machine1 has two servers , Adminserver, ManagedServer1 and
              > My machine2 has one server ManagedServer2.
              >
              > I have installed weblogic 8.1 in both the machines.
              > I have started nodemanager in machine1 .
              > Iam able to run Adminserver and Managedserver1 in machine1(localhost)
              >
              > My question:
              > 1. I have to run the managedserver2 in the remote machine.
              > 2. Should i create a domain of the same name called mydomain in
              machine2(remote
              > machine)???
              > 3. Already nodemanager is running in machine1.............Should i run
              nodemanager
              > in machine2(remote machine) also ???
              > 4. What should be my configuration parameters (Java home, bea
              home,classpath,rootdirectory,arguments)
              > for managedserver2 ??? should these details be with respect to machine1 or
              machine2???
              >
              >
              > thanks&rgds,
              > girish
              

  • Local machine using - expecting remote machine

    Any advice on this one? I did modify the security / firewall to except IChat
    2009-01-04 19:42:44 -0600: No data has been received for the last 10 seconds.
    Audio channel info: local machine using 10.0.1.200:16402, expecting remote machine to send to 68.179.174.46:41078
    Video channel info: local machine using 10.0.1.200:16402, expecting remote machine to send to 68.179.174.46:41078

    Ok,
    Most Cable Modems do not router.
    It means that they pass the Public IP to the Router (Or any computer that might be directly connected if you only have one).
    This also means it is not doing DHCP (so no two lots of DHCP in this case most likely)
    Telling us the Make and Model of the modem will help to confirm this.
    Alternatively you can check if it is in this List (Very new models tend not to be included yet. They work on people sending in info, so not all devices are listed either.)
    Also tell us which version and what firmware the Base Station is Running.
    The set up pages for this can be accessed with Airport Utility in the Applications/Utilities folder.
    This presents you with a list of the Airport Devices it can find in a list on the left.
    Click on yours.
    Click on the Internet icon.
    This pane is essentially in two parts.
    The top is how you are getting connected to the Internet.
    It normally tells you the IP you are getting.
    If it is the same as when you go here the modem is not routing.
    At the Bottom is whether the Base Station is set to DHCP (Share an IP) to the computers (LAN).
    Tell us what you find out.
    If it is a Public IP you see quote it as 90.66.xxx.xxx (Or put some xxx's in somewhere).
    Pic of Internet Pane with Public IP
    Older firmware and Base Stations have slightly different Access methods where you get a little Pop Up window to log on by IP first.
    (I don't have Pics of that at the moment)
    8:04 PM Monday; January 12, 2009

  • Launch exe from remote machine

    Hi All,
    How can I launch an executable residing in machine A from machine B?
    I'm trying web services but no luck.
    Am I the wrong track?
    Thanks a lot

    What does "I'm trying web services but no luck." mean? As I see it, you have two separate things to accomplish here. One is the launchiing of the executable locally. The other is the triggering of that event remotely. Deal with one, then the other. Much simpler. That is, encapsulate the launching in a single method call, then work on calling it remotely. Then your problem is simply "How do I call a method remotely?", and entirely decoupled from details such as "launch exe from remote machine"

  • JMF : Audio can not be played from the remote machine

    Hi,
    I am developing voice chat application.
    As the moment this writing I can capture from mic and play it from the same machine.
    But when I capture and transmit audio from one machine and try to play from remote machine in LAN it does not work.
    Could anybody tell me please What would be the possible causes for this ? I have given the code below.
    //Transmitter
    package lsf.telphony.test;
    import java.io.IOException;
    import java.util.Vector;
    import javax.media.CannotRealizeException;
    import javax.media.CaptureDeviceInfo;
    import javax.media.CaptureDeviceManager;
    import javax.media.DataSink;
    import javax.media.Format;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSinkException;
    import javax.media.NoDataSourceException;
    import javax.media.NoProcessorException;
    import javax.media.NotRealizedError;
    import javax.media.Processor;
    import javax.media.ProcessorModel;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.DataSource;
    public class MediaTransmetter implements Runnable
         private MediaLocator mediaLocator = null;
         private DataSink dataSink = null;
         private Processor mediaProcessor = null;
         public static String errorString;
         private CaptureDeviceInfo captureDeviceInfo = null;
         public MediaTransmetter(String rtpURL)
              DataSource dataSource = null;
              ProcessorModel model = null;
              Format formats[] = null;
              ContentDescriptor contentDescriptor = null;
              try
                   captureDeviceInfo = getCaptureDevice();
                   mediaLocator = captureDeviceInfo.getLocator();
                   dataSource = javax.media.Manager.createDataSource(mediaLocator);
                   contentDescriptor = new ContentDescriptor(ContentDescriptor.RAW_RTP);
                   formats = new Format[] { new AudioFormat (AudioFormat.LINEAR) };
                   model = new ProcessorModel(dataSource, formats, contentDescriptor);
                   mediaProcessor = Manager.createRealizedProcessor(model);               
                   MediaLocator outputLocator = new MediaLocator(rtpURL);
                   dataSink = Manager.createDataSink(mediaProcessor.getDataOutput(), outputLocator);               
              } catch (Exception e)
                   e.printStackTrace();
         @SuppressWarnings("unchecked") //check for this statement
         private CaptureDeviceInfo getCaptureDevice()
              CaptureDeviceInfo captureDeviceInfo;
              Vector<CaptureDeviceInfo> deviceListVector = CaptureDeviceManager.getDeviceList(new AudioFormat(AudioFormat.LINEAR));
              for (int i = 0; i < deviceListVector.size(); i++)
                   captureDeviceInfo = (CaptureDeviceInfo)deviceListVector.elementAt(i);
                   System.out.println("captureDeviceInfo = " + captureDeviceInfo);
                   return captureDeviceInfo; // here the firt element is return. Add to login to get the specific CaptureDeviceInfo object.
              return null;
         @Override
         public void run()
              try
                   dataSink.open();
                   dataSink.start();
              } catch (SecurityException e)
                   e.printStackTrace();
              } catch (IOException e)
                   e.printStackTrace();
              mediaProcessor.start();
              System.out.println("Transmitting started successfully.");
         public static  void main(String[] args) { // Loads pastry settings
              MediaTransmetter mediaTransmetter = new MediaTransmetter("rtp://192.168.2.2/audio");
              Thread mediaTransmetterThread = new Thread(mediaTransmetter);
              mediaTransmetterThread.start();
    }//AudioReceiver
    package lsf.telphony.test;
    import javax.media.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class MediaReceiver extends JFrame implements Runnable
         private static final long serialVersionUID = 1L;
         private static final String FRAME_TITLE = "Telphony Media Player";
         private static final String CONTROL_PANEL_TITLE = "Control Panel";
         private static final int LOC_X = 100;
         private static final int LOC_Y = 100;
         private static final int HEIGHT = 500;
         private static final int WIDTH = 500;
         private Player player = null;
         private JTabbedPane tabPane = null;
         public MediaReceiver()
              super(FRAME_TITLE);
              setLocation(LOC_X, LOC_Y);
              setSize(WIDTH, HEIGHT);
              tabPane = new JTabbedPane();
              getContentPane().add(tabPane);
              addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                        closeCurrentPlayer();
                        System.exit(0);
         private JPanel createMainPanel()
              JPanel mainPanel = new JPanel();
              GridBagLayout gbl = new GridBagLayout();
              GridBagConstraints gbc = new GridBagConstraints();
              mainPanel.setLayout(gbl);
              boolean visualComponentExists = false;
              if (player.getVisualComponent() != null)
                   visualComponentExists = true;
                   gbc.gridx = 0;
                   gbc.gridy = 0;
                   gbc.weightx = 1;
                   gbc.weighty = 1;
                   gbc.fill = GridBagConstraints.BOTH;
                   mainPanel.add(player.getVisualComponent(), gbc);
              if ((player.getGainControl() != null) && (player.getGainControl().getControlComponent() != null))
                   gbc.gridx = 1;
                   gbc.gridy = 0;
                   gbc.weightx = 0;
                   gbc.weighty = 1;
                   gbc.gridheight = 2;
                   gbc.fill = GridBagConstraints.VERTICAL;
                   mainPanel.add(player.getGainControl().getControlComponent(), gbc);
              if (player.getControlPanelComponent() != null)
                   gbc.gridx = 0;
                   gbc.gridy = 1;
                   gbc.weightx = 1;
                   gbc.gridheight = 1;
                   if (visualComponentExists)
                        gbc.fill = GridBagConstraints.HORIZONTAL;
                        gbc.weighty = 0;
                   } else
                        gbc.fill = GridBagConstraints.BOTH;
                        gbc.weighty = 1;
                   mainPanel.add(player.getControlPanelComponent(), gbc);
              return mainPanel;
         public void setMediaLocator(MediaLocator locator) throws Exception, IOException, NoPlayerException,
                   CannotRealizeException
              setPlayer(Manager.createRealizedPlayer(locator));
         public void setPlayer(Player newPlayer)
              closeCurrentPlayer();
              player = newPlayer;
              tabPane.removeAll();
              if (player == null)
                   return;
              tabPane.add(CONTROL_PANEL_TITLE, createMainPanel());
              Control[] controls = player.getControls();
              for (int i = 0; i < controls.length; i++)
                   if (controls.getControlComponent() != null)
                        tabPane.add(controls[i].getControlComponent());
         private void closeCurrentPlayer()
              if (player != null)
                   player.stop();
                   player.close();
         public static void printUsage()
              System.out.println("Usage: java MediaPlayerFrame mediaLocator");
         public void run()
              try
                   MediaReceiver mpf = new MediaReceiver();
                   mpf.setMediaLocator(new MediaLocator("rtp://192.168.2.2:10000/audio"));
                   mpf.show();
              } catch (Exception t)
                   t.printStackTrace();
         public static void main(String[] args) { // Loads pastry settings
              MediaReceiver mediaReceiver = new MediaReceiver();
              Thread mediaReceiverThread = new Thread(mediaReceiver);
              mediaReceiverThread.start();

    By the way the program does not terminate immediately after starting it. According to your advice I tried removing running it inside in a thread and making it sleep at several points appropriate. No luck.
    I wonder why packets are not sending even the program is running until the end of the line with no exception.
    Have you tried to capture RTP packet traffic with Wireshark or similar kind of network analyzing software with this kind of program?
    I am doubt whether my program is actually transmitting packets but unable to capture those due to the error with transmitter.
    Even with the Wireshark It does not capture outgoing packets.
    And another thing I noticed with netstat is it shows two pots get opened when running the application but those ports are not the one I note in the program.
    For example I run the program with port number as 10000 (sink: setOutputLocator rtp://192.168.2.104:10000/audio). But when I check it with netstat some other ports are open.
    i.e
    nuwan@nuwan-laptop:~/eclipse$ netstat -anup
    (Not all processes could be identified, non-owned process info
    will not be shown, you would have to be root to see it all.)
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    udp 0 0 0.0.0.0:68 0.0.0.0:* -
    udp 0 0 0.0.0.0:40526 0.0.0.0:* -
    udp 0 0 0.0.0.0:5353 0.0.0.0:* -
    udp6       0      0 127.0.1.1:28864         ::: 10772/java*
    udp6       0      0 127.0.1.1:28865         ::: 10772/java*
    nuwan@nuwan-laptop:~/eclipse$
    And each time when I start the program these two ports are changed also.
    And foreign address is not shown ? Any comment for that??
    Is there anything that can be drawn from above information which caused for not working my program.
    This is killing me. And also making me sharper. And I cant leave this behind also. So highly appreciate you time and help.
    Thanks.

Maybe you are looking for