Problem to update Swing components from RMI object at server side

Greetings, I have a RMI client/server application, both client and server have a Swing GUI. But at the server side, it appears to me that I can't pass object or make function call to my server GUI class. Because I can't have GUI instance or reference in my Remote object. (java.rmi.MarshalExceptio, java.io.NotSerializableException, blar blar ...)
My problem is, if a client does something, I want to reflect the changes on the server side GUI. How can I do this except using a spin query?
Any help would be greatly appreciated.
Thanks.
John
Edited by: zgliang on Sep 13, 2007 3:30 AM

I'd like to suggest you read the topic "Questions RMI & Swing & SwingWorker", which is similar to yours.

Similar Messages

  • Updating Swing components from a different class

    I would like to use the JTextArea component in a JFrame to display fast updating text from my application. My application is very simple. When the app launches the GUI is created then my application engine would start processing and displaying text data into the GUI. After reading about Thread safety when using Swing components I concluded it would not be a good idea for my app engine class to update the JTextArea class directly using methods such as .append(String).
    I would be grateful for any suggestions on how I should approach updating Swing components from different classes.
    Many Thanks in advance Sean

    Hi
    Why don't you just implement a basic callback method?
    To do this the right way you should probably define a simple Interface that has a public method like updateProcessText(String s). Your swing class then implements this interface, basically forcing it to provide the public method you defined (this is no different than implementing ActionListener, which forces you to define actionPerformed). Secondly modify your processing class, so that it take's a class that implements the interface you just created, as one of the arguments in it's constructor. Lastly assign the argument from your construnctor to a private var - this will enable your processing class to have a handle to your swing class and update it as it pleases.
    This might sound very complex, but it's really simple once you've done it once.

  • Update data targets from ODS object automatically

    Hello experts,
    I have an ods (that has two delta loading every night) with the setting: "Update data targets from ODS object automatically". This ODS is source of only one other ODS.
    But we have a chain when there are the seguent steps: delta 1 --> ODS1,
    delta 2 --> ODS1; Activate ODS1; delta --> ODS2; Activate ODS2.
    The setting "Update data targets...automatically" could create some problems?
    I think this because it is happened that in delta loading of ODS2, some records have only the key filled, and all the data fields blank; then, if I make a full repair of these records, all data are correctly filled.
    Could be this the cause?
    Help me..it is urgent..
    Thanks,
    Vito

    Hi Vito,
    To have better control of processes when ods gets data from multiple sources and supply it forward to ODS and cube ...we generally deactivate the flag "update data automatically".
    And Process chains looks like ..
    From source 1,2,3 update data into ODS 1.
    Activate Data ODS1
    Initiate delta from ODS1 to ODS2.
    Activate data ODS2.
    We did face some problem of blank records with only key filled and later deactivated the checbox "Update data into data targets automatically" and it resovled lots of issues.
    Hope that helps.
    Regards
    Mr Kapadia
    Assigning points is the way to say thanks in SDN.

  • What cause searching network problem after updating iphone 6 from iOS 8.1.2 TO iOS 8.1.3?

    what cause searching network problem after updating iphone 6 from iOS 8.1.2 TO iOS 8.1.3?

    SSince Apple does not support downgrading the iOS I suggest you start a new question that gives a good title to a specific problem. Then in the body of the thread describe the problem in detail, tell us what steps you have tried so far to correct the problem, what happened, and what error messages you received.

  • Configuring Swing components from a database

    Hi All
    I'd like to be able to configure Swing components with information from a database e.g. text, color, editability etc. One approach I'm considering is extending existing components such a JTextField and adding a configure() method which takes as a parameter the primary key of the database record containing the config info.
    Has anyone comes across alternative design patterns for solving this?
    Regards
    Terry Child

    that is what I would do

  • I have a problem after update my iphone4 from ios5.0 to ios5.0.1, my wallpaper default folder beacome black all icons, i still don't know how to fix this issue, also a lot of friends had the same problem.

    after update my iphone4 from ios5.0 to untethered ios5.0.1 i have the next problem, my home-screen wallpaper default folder become to black icons and if a set any it aply but in black, a lot of friends had the same issue without a fix.
    can someone tell us how to fix this issue?
    thanks.
    josemahn

    I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.

  • Problems After shifting swing application from jdk1.3 to 1.4

    hi,
    i have shifted my Swing application from jdk1.3 to 1.4, some component settings changed in j2se1.4. are listed below
    1). i have added JComboBox to JPanel using BoxLayout, in jdk1.3 it is normal where as in 1.4 comboBox height is increased to panel height.
    Sample code
    (in a Panel)
         setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
    add(getYearComboBox());
         add(getMonthNameComboBox());
         add(getDayOfMonthComboBox());
    2). in jdk1.3 the icon which is set to JFrame is visible in the JOptioPane.showConfirmationDialog() also, but in 1.4 the icon is not visible in conformation dialog box.
    Sample Code
    in a JFrame's constructor
    public OptionPaneTest()
    ImageIcon icon = new ImageIcon("icon.gif");
    setIconImage(icon.getImage());     
    setSize(250,100);
    addWindowListener(new java.awt.event.WindowAdapter() {
    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
    setVisible(true);
    JOptionPane.showMessageDialog(this,"hai", "Hai",JOptionPane.WARNING_MESSAGE);
    3). the Labels added to the panel or frame are displaying in light blue color with jdk1.3 and the same label displaying in black with j2se1.3
    Sample Code
    in a JPanel
    setLayout(new BorderLayout(20, 20));
    add(new JLabel("Testing Label Color"), BorderLayout.CENTER);
    please send solution to any or all.
    thanks in advance,
    Pavan.DV

    Thanks for your sugession.
    You realized me by showing the fact that there are no many classes
    Keep suggesting like this.
    I don't even know how to see the API documentation Before you told me.
    Don't take any issue as simple thing and never give foolish suggessions like this.
    If you know the Answer then share it or else musukoni kurcho ra

  • Scheduling web intelligence reports from SAP EP Portal : Server Side Trust

    Hello,
    We have set-up SSO between SAP EP 701, SAP BI 701 and Business Object XI 3.1  to allow users to access reports without having to sign-on again as explained here :
    /people/ingo.hilgefort/blog/2008/09/19/businessobjects-and-sap--configure-sap-authentication
    But, we have recently been contacted by some users because when scheduling Webi Report from a link within the portal they have the following errors :
    u201CA database error occured. The database error text is: Unable to connect to SAP BW server System received an expired SSO ticket. (WIS 10901) u201D
    The user told us that he doesn't encounter the error when :
    Login in directly to the BO Infoview (without SSO from the SAP Enterprise Portal.)
    The first Webi scheduling is succesful from the portal (I suppose because the portal token is still valid)
    I understand that we also have to configure the Server Side Trust between BO Enterprise server and the SAP BI7 backend as explained here , but I do not really understand its purpose
    https://websmp106.sap-ag.de/~sapidb/011000358700001646962008E/XI3-1_BIP_SAP_INSTALL_EN.pdf
    I've found a similar discussions here ;
    Issue with SAP Single Sign-On and Scheduling Reports
    I still have some questions :
    If we configure the Server Side Trust between BO Enterprise server and the SAP BI7 backend .
    The Portal Logon ticket will remain an issue at some point of time , does it mean tha the WeBi report job sheduling should not be perfromed from the SAP EP Portal ?
    We haven't configured the Server Side Trust , yet the users told us that they are able to schedule webi report directly from the BO Infoview ? How is it posible ?
    Thank you in advance for your help.
    Regards.

    Thank you Mr Hilgefort for your detailled explanations.
    I now have to provide some explanations to my managers, and to be honest , there are still some points that
    are unclear to me, and it would be extremely helpful if could confirm (or not) the follwoing points.
    When scheduing Webi report from the sap portal, we're getting SSO errors.
    SAP provide the follwoing note explaining how to extend the validity of the J2EE token (Portal token), but this is not a long term solution, at certain point of time the ticket will expire. Webi shceduling should not be perfromed from the Portal.
    Sap note 1352127 - Scheduled Webi report fails with: A database error occurred. The database error text is: Unable to connect to SAP BW server System received an expired SSO ticket
    Webi Scheduling should be performed from BO Infoview. SNC should be configured between BO server and SAP BI7.0 backend.
    We should Configure Server SNC as explained in the BusinessObjects XI Integration for SAP Solutions Installation and Administration Guide at Chapter "Configuring SAP for server-side trust". (1341043)
    The SAP Portal is not involved here and is not an option even with the configuration of SNC/Server side trust.
    thank you for your patience.
    Best Regards.

  • Create image from byte[]array on server side

    Hello everyone..
    I'm developing an application which will take snapshots from a mobile device, and send it to my pc via bluetooth. I have my own midlet which uses the phone camera to take the snapshot, i want to transfer that snapshot to my pc.
    The snapshot is taken is stored in an array byte.
    The image can be created on the phone itself with no problem using : image.createImage(byte[])
    my problem is that when i send the array byte via bluetooth, and receive it on the server, i cannot create the image using the :image.createImage() code
    The connection is good since i have tested by writing the content of the array in a text file.
    Piece of midlet code:
                try{
                     stream = (StreamConnection)Connector.open(url);
                     OutputStream ggt = stream.openOutputStream();
                     ggt.write(str);
                     ggt.close();
                }catch(Exception e){
                     err1  = e.getMessage();
                }where str is my array byte containing the snapshot
    And on my server side:
    Thread th = new Thread(){
                   public void run(){
                        try{
                             while(true){
                                  byte[] b = new byte[in.read()];
                                  int x=0;
                                  System.out.println("reading");
                                  r = in.read(b,0,b.length);
                                  if (r!=0){
                                       System.out.println(r);     
                                       img = Image.createImage(b, 0, r);
                                                            //other codes
                                       i get this error message:
    Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: javax.microedition.lcdui.ImmutableImage.decodeImage([BII)V
         at javax.microedition.lcdui.ImmutableImage.decodeImage(Native Method)
         at javax.microedition.lcdui.ImmutableImage.<init>(Image.java:906)
         at javax.microedition.lcdui.Image.createImage(Image.java:367)
         at picserv2$1.run(picserv2.java:70)
    Please anyone can help me here? is this the way to create the image on the server side? thx a lot

    here is exactly how i did it :
    while(true){
                                  byte[] b = new byte[in.read()];
                                  System.out.println("reading");
                                  r = in.read(b, 0, b.length);
                                  if (r!=0){
                                       Toolkit toolkit = Toolkit.getDefaultToolkit();
                                       Image img = toolkit.createImage(b, 0, b.length);
                                       JLabel label = new JLabel(new ImageIcon(img) );
                                       BufferedImage bImage = new BufferedImage(img.getWidth(label),img.getHeight(label),BufferedImage.TYPE_INT_RGB);
                                       bImage.createGraphics().drawImage(img, 0,0,null);
                                       File xd = new File("D:/file.jpg");
                                       ImageIO.write(bImage, "jpg", xd);
                                       System.out.println("image sent");
                             }Edited by: jin_a on Mar 22, 2008 9:58 AM

  • How to get the client identity from the certificate at server side

    hi, this is ravi kiran,
    I am working on a project which requires, receiving a signed file from the client side and verify whether the file is signed by a valid certificate that is there in the servers keystore.
    How can i get the client certificate at server side and check with the certificates already present in the servers keystore.
    i have no idea how to do this
    can any one help me
    thanx in advance

    Hi Ravi, did you get any answer to your question ?
    I'm also after a similar problem, please share your solution, if you have any.

  • How can I convert client-side Shared Object in server-side Shared Object?

    Hello world....
    I have a problem...
    I have a program that uses client-side shared Object, like the Example "Ball" il the FMS 3.5 guide: I can move a ball around the stage...
    I need to convert this program so I can use server side shared object. This is because I can load the .swf to another .swf and I must to be able to reset, or delete, the properties of my shared object. With client-side sahred object I can't delete or reset the shared object after I loaded my external .swf....
    My script is:
    private var pointer1_so:SharedObject;
    nc=new NetConnection  ;
    nc.connect (rtmpNow);
    nc.addEventListener (NetStatusEvent.NET_STATUS,doSO);
    Cerchio=new cerchio ;
    addChild (Cerchio);
    Cerchio.x=220;
    Cerchio.y=280;
    Cerchio.addEventListener (MouseEvent.MOUSE_DOWN,beginDrag1);
    Cerchio.addEventListener (MouseEvent.MOUSE_UP,endDrag1);
    private function doSO (e:NetStatusEvent):void
                 good=e.info.code == "NetConnection.Connect.Success";
                 if (good)
                       //Shared object
                       pointer1_so=SharedObject.getRemote("point1",nc.uri,false);
                       pointer1_so.connect (nc);
                       pointer1_so.addEventListener (SyncEvent.SYNC,doUpdate1);
    private function doUpdate1 (se:SyncEvent):void
                 for (var cl1:uint; cl1 < se.changeList.length; cl1++)
                       trace(se.changeList[cl1].code);
                       if (se.changeList[cl1].code == "change")
                            switch (se.changeList[cl1].name)
                                 case "xpos" :
                                       Cerchio.x=pointer1_so.data.xpos;
                                       break;
                                 case "ypos" :
                                       Cerchio.y=pointer1_so.data.ypos;
                                       break;
    private function beginDrag1 (e:MouseEvent)
                     Cerchio.addEventListener (MouseEvent.MOUSE_MOVE,moveMc1);
                     Cerchio.startDrag (false,Rect1);
    private function endDrag1 (e:MouseEvent)
                     Cerchio.stopDrag ();
    private function moveMc1 (e:MouseEvent)
                e.updateAfterEvent ();
                   pointer1_so.setProperty ("xpos",Cerchio.x);
                   pointer1_so.setProperty ("ypos",Cerchio.y);
    Can someone helps me?
    I know I need of a server side script but...
    Please...
    Emiliano.

    ResultSet is not serializable. It is an active connection. If you wish to serialize the info, then read it into an ArrayList in your serializable class and pass the Data that way.

  • More on Updating Swing Components during long operations...

    After reading thru a few posts here, I've come to the conclusion that what I need is going to be much more difficult than I'd planned. Neverthess i'll try to explain...
    I have a JFrame which contains a simple JLabel and JProgressBar. While I am performing a long network operation, I am making calls to a Thread class (which contains the above components) to update the JFrame indicating the current status. Normally I have no problem with this as the paintImmediately method suffices. However, when I call this long operation from the constructor of a larger, more complex JFrame, the GUI remains unresponsive (despite the plethora of paintImmediately calls that are executed) until the user clicks in the threaded progress box.
    Unfortunately the SwingWorker solution will not work for me as I need to be completely backwards compatible with JDK 1.3 (supporting Mac OSX 10.X). Oddly enough tho, I don;t get these problems when I use the same code in JDK 1.1.8 on Mac OS9.
    Any ideas?
    thanks!

    heh...looks like it was a simple thing afterall :)
    The JDialog (not JFrame) just needed focus.
    heh...is it friday yet? ;)

  • Updating swing components

    Here is my problem...I am trying to update each of my components like JTree, and JTable when my data changes in a mysql database after the user enters information and clicks the save button. I want this to happen while the program is up and running...I looked at threads but I wasn't certain that this is what I need...Also I looked at SwingWorker but I can't figure out how to use it, or if this is even what I need...Also I am using tabs to display my information so if mysql is updated on one tab I want all the other tabs to immediatly update...I don't know if I am explaining it right....but I hope you can help.
    thanks
    James

    I am not too sure about tabs, but as far as JTree and Jtable are concerned you can update them by updating their TableModel and TreeModel.
    //update the model
    table.setModel(model);
    You can look at TableModel and TreeModel turorials for detailed info

  • Problem with updating Passport details from ESS portal

    HI Experts,
    Some of my employees were unable to input passport details from ESS portal -own data.
    Employee who belong to south korea are getting the problem.
    Even though we fill every field,system is showing an error that "" Fill in all required entry fields ""
    In spro...we maintained country grouping as 41 and IT 0185 and subtype and we use rthe case B2 in speciy use case and activity subtypes.
    Another thing,when we update data in 0185IT by R/3 by backend it is not showing up the details in ESS.
    Could you please give me an idea to resolve the problem.
    Regards,
    Sairam.

    Hi Experts,
    No details were maintained in the table V_T588MFPROPC  for this infotype.
    Employee with other country grouping were able to up-date passport details in portal.
    Where as south korea employees are not able to update the passport details.
    For south korea employees..they have to  update  passport details with sutype 01 in ESS portal.
    Even though we fill  all the details it is showing fill in all required entries.
    In table V_T588MFPROPS..no details were maintained for version  41.
    In portal we have to maintain..ICNUM,ICOLD,AUTH1,FPDAT,EXPID,ISSPL,ISCOT,IDCOT.
    In r/3(by backend) we can maintain all these details including  ID TYPE(ictyp).We have only one subtype(passport) in 0185 for this south korea.What details shall we need to maintain for version 41.
    Please let me know,why system is showing error even we maintain all the details.
    Please advice.
    Sairam.

  • Error while migrating Applet Swing components from JRE1.5.13 to JRE 1.6.05

    We have planned to migrate the Applet screens from JRE 1.5.13 to JRE 1.6.05 browser,
    but the APPLET files are still compiled using JDK 1.5.
    If any of you have had experience in this migration ,let me know the issues
    you have encountered.
    One problem which i understood through one of the thread
    from this site is performance is really bad with JRE 1.6 browsers.
    Please share the other issues which i need to take care.
    Thanks in advance

    >
    We have planned to migrate the Applet screens from JRE 1.5.13 to JRE 1.6.05 browser,
    but the APPLET files are still compiled using JDK 1.5. >Then the applet should work in 1.6 without alteration. (Barring bugs that cropped up in 1.6, or changes to 1.6 that revealed broken code from applets compiled for earlier versions.)
    Your best way to check is to test the applet (as is, without any changes or recompilation) using a browser running a 1.6 JRE.
    Is the applet publicly available? If so, what is the URL? (I have a couple of browsers here, all using 1.6.)
    >
    One problem which i understood through one of the thread
    from this site is performance is really bad with JRE 1.6 browsers.>Which thread, do you have a link?

Maybe you are looking for

  • CUPS - Conferencing profil problem

    Hello, I've a little problem with a CUPS 8.6, so, when I create my conferencing profil i put my name, the description and the primary conferencing server. This is work perfectly, but when i want to add one user in the conferencing profil, I click on

  • Problem with Grouping Tag in iTunes

    Hi, I am trying to use getID3 to read the 'Grouping' tag from iTunes. It would seem that iTunes is writing these tags to my MP3 files, as, when I open them in Media Rage the Grouping Tag shows up OK. However, when I then upload the tracks to my serve

  • How to remove item from Safari reading list on iPad 2

    How do you remove an item from your reading list in Safari on the iPad 2?  I don't have the "x" in upper corner like I have on computer

  • How do I get automator to save emails in a finder folder?

    I want to save emails from certain senders as files in a regular (not mail) folder. I can find the command to get automator to find that persons emails, but not to save them outside of the mail folders.

  • Music downloading problem 9360

    Hi, I have a blackberry 9360... I bought the phone about 2 months ago and it was downloading songs perfectly. As of lately I'll download a song and when it gets to about a quarter of the way it'll stop downloading and say 'Error'. I only have this pr