Just need a simple client sending message to server example????

Im trying to find a simple client-server example, where i can put the client on one laptop, server on the other and pass messages from the client to the server.
I've been trying to follow examples and ive had problems with policies, stubs(?) etc etc
Would someone please be able to provide me with an example i can follow and show me how to setup a policy. Im not a business user, i just want to learn how to make a simple message-sending app with RMI

Ok! rmiregistry is working (i think), ie no error messages.
But, when i execute i now get this:
init:
deps-jar:
compile:
run:
Server exception: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: test.hello
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: test.hello
        at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
        at sun.rmi.transport.Transport$1.run(Transport.java:159)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
        at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
        at test.Server.main(Server.java:33)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
        java.lang.ClassNotFoundException: test.hello
        at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
        at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
        at sun.rmi.transport.Transport$1.run(Transport.java:159)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: test.hello
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:247)
        at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:711)
        at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:655)
        at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:592)
        at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
        at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
        at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
        at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
        ... 12 more

Similar Messages

  • When i reply to an email on my iphone and click send, it just returns to homescreen without sending message, anyone else experienced this?

    When i reply to an email on my iphone and click send, it just returns to homescreen without sending message, anyone else experienced this?  Its very annoying, esp if i've just typed a long reply!!

    try to delete and readd your account then try again

  • Keep getting 'Cannot send message using server...' message - Why!??

    Hi there,
    Every time I launch Mail, the first time I try to send a message I get the same window, warning me that Mail 'Cannot send message using the server...'.
    It's annoying, because this is the only server I have, and it does work. I just have to hit the 'Use Selected Server' button, and it works.
    But next time I launch Mail, I have to go through the same tired routine.
    Does anyone have any suggestions as to what I might do to solve this problem?
    thanks so much,
    Malcolm

    Hi Malcolm.
    It isn’t clear whether you’ve always had this problem in Mail, or it started to happen as a result of some changes you made, or what...
    Is this outgoing server associated with a mail account provided by your ISP or something else?
    Doesn’t the error message give any additional information as to what could be the cause of the problem? What does Window > Connection Doctor say?
    Go to Apple Menu > System Preferences > Network, choose Network Port Configurations from the Show popup menu, and make sure that the configuration used to connect to Internet appears at the top of the list. Try also turning OFF all the network port configurations except the one needed to connect to Internet and see whether that helps — if it doesn’t, turn ON again the ones you want enabled.
    Also, try using a different method to connect to Internet, if possible, or connecting the computer to Internet as directly as possible, i.e. bypassing any routers that might be present, using an ethernet cable instead of wireless, etc.
    Mail keeps information about outgoing (SMTP) servers in a separate list independently of the mail accounts themselves. The account settings just associate one of the available outgoing servers with each account. Orphaned or dangling outgoing server entries (i.e. not associated with any account) sometimes cause weird sending problems.
    Go to Preferences > Accounts > Account Information > Outgoing Mail Server (SMTP), choose Edit Server List from the popup menu, and delete any servers that shouldn’t be there. The Edit Server List panel shows the account each outgoing server is associated with.

  • IOS,on handle Event.DEACTIVATE, send message to server failed

    I'm trying to capture the "home" button press event, and notify my web server that my iOS application is deactivated, and then, my web server can send messages through APNs.
    I tried with this:
    NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE,
    this.onDeactivate);
    and:
    make a URLRequest in onDeactivate callback function to notify my server.
    But i found, this request never got sent. Actually, it is sent when i press "home" again, and after
    my iOS application is activated!
    Is there a way to solve or work around?

    I fixed it. in onDeactivate function, i tried this: NativeApplication.nativeApplication.executeInBackground = true;
    And this way, my application can run in background.

  • Just setting up. Can send messages ok - but not receive at all - settings checked and ok

    Just setting up Thunderbird for the first time. Can send emails fine. Can't receive emails. Have confirmed settings with f2s/TalkTalk and they are correct.
    Where to now?

    Thanks folks.
    To gnospen:
    * ''Just a thought. Have you set up this pop-account anywhere else like in your smart-phone? Is that or your old mac running?''
    ?? I don't use my 'phone for emails, so, no.
    * ''"If its set up to download and NOT to keep it on the server, then there isn't anything to download, your smart-phone (whatever) has already downloaded it."''
    I don't understand this bit. I just want to use Thunderbird as I used to use Outlook. That is, when TalkTalk tell me I have exceeded my email quota I can download the emails to my machine (a MacBook Pro).
    '''''* ''''"I don't understand why you don't use IMAP instead as it can sync much better."'''''''
    I don't know the difference. It worked before with Outlook. I was advised by TalkTalk to use POP. (Don't remember being given the option of IMAP.)
    ====
    To zenos:
    ''* "This is going to be messy as talktalk have grown by acquisition of smaller ISPs and has inherited a large number of disparate email services. (I still have a lineone account myself and have also had tiscali, pipex and f2s in the past.) So we may need to know what domain the OP is on."
    We were with f2s - got bought by Opal then TalkTalk.
    ''* "Having said that, I scrolled through the options and they're all plain un-secured pop (110) and imap (143). So I don't understand why the OP has been steered towards an SSL port for POP3. None of them give "inmail.server.com" etc.
    ''* "To the OP: Have you tried just setting up the account as a new one, and letting Thunderbird find the settings for itself?"''
    This is my first time with Thunderbird. I downloaded and installed the programme, then followed the instructions for setting up. Plus inmail.server.com worked before and I was advised that this was correct. (btw, I presume I'm the OP??)
    ''* "Do you specifically want POP instead of IMAP? Why? "
    As noted above, it worked with Outlook; I was advised that POP settings were correct.
    ''* "Try setting your POP port to 110 and no security."
    Tried that. With pop 110 I get "...sending of password did not succeed. mail server responding: syntax error."
    Does this give anybody any further clues?

  • Just need a simple method pls

    Hello, I don't want to learn the whole communications API just yet but I need a method that will send the RTS line high on a 9 pin common com port 1 say when true and off when false.
    Anyone have a method lying around I can use?
    Many thanks,
    Phil.

    Malcom,
    Thanks for pointing me to the Logitech USB microphone(s). It was a week before I could get to the nearest store selling them (turns out, Radio Shack has them). Then of course, needed more time to try out the new mic. I ended up "upgrading" to the Logitech headset (ear phones & boom mic) - it works perfectly. I also find the boom mic gives much better fidelity - my voice recordings sound like I'm an announcer on NPR now.
    Note to others seeking microphones for their Mac: get the USB connect type. The audio in-line on my Macs (past and present) gave "spotty performance" at best. With in-line audio connected mics, a Griffen iMic is usually needed to even get the mic to show up in "Sound" prefs. That device is merely a "USB simulator" of some kind - and I do not believe they last long enough to justify the $35 price.

  • Just need a simple mic - suggestions

    Just got my Mac Pro 3 weeks ago so I'm getting around to lower-priority needs for it.
    My experience with external microphones includes only "cheapies" I used on my eMac. The eMac seemed "bound to not" work with mics. I bought Griffin iMic for that but it only worked a few months (seems that's pretty common occurrence for iMics). So: I threw away those mics in disgust - too bad since I coulda tried them on the Mac Pro now.
    Now - the (beautiful) monitor I bought for the Mac Pro came without built-in mic but I don't care because I "like" the advantage of being able to move the mic closer, farther, etc. Just want a mic for occassional use in recording tracks for home vids, etc. Even "semi-pro" equipment of this kind would be a waste for me.
    Oh, I plan to just use QuickTime Pro for audio recordings: worked quite well when I could manage input to the eMac.
    Any suggestions as to make / model, price, and source for "decent low-cost" microphones?
    Thanks in advance for any help.

    Malcom,
    Thanks for pointing me to the Logitech USB microphone(s). It was a week before I could get to the nearest store selling them (turns out, Radio Shack has them). Then of course, needed more time to try out the new mic. I ended up "upgrading" to the Logitech headset (ear phones & boom mic) - it works perfectly. I also find the boom mic gives much better fidelity - my voice recordings sound like I'm an announcer on NPR now.
    Note to others seeking microphones for their Mac: get the USB connect type. The audio in-line on my Macs (past and present) gave "spotty performance" at best. With in-line audio connected mics, a Griffen iMic is usually needed to even get the mic to show up in "Sound" prefs. That device is merely a "USB simulator" of some kind - and I do not believe they last long enough to justify the $35 price.

  • I just need a simple GUI...

    I can't get my really simple GUI to work at all, I don't get all the abstract crap.
    Can someone just make me a crazily simple GUI with a button that when you click it, it changes the text in a text box?
    Thank you in advance.

    I'm just trying to make a GUI, but I just want something to refer to.
    All the ones I could find thru google were too complicated, I just want something that I can build off of.

  • HOW DO I CONTACT SOMEONE?!!!  I JUST NEED A SIMPLE ANSWER!!!

    can someone just give me someone i can talk to about cs4

    CS4 is much too old to get live support for.
    Your best bet is asking your question here in the forum.

  • Just need some simple stats :)

    I've been using Microsoft's "Excel Lite" program for a few years. I don't even know what it's called, but its performance is more limited than Excel, which I've never used.
    I've never used a mathematical formula in a spreadsheet. All I do is insert data, which I organize an save as a CSV file, which I then import into a database table. For example, I have a spreadsheet with information on the animal kingdom, arranged by class, order, family, genus and species, all coded by cell background color/pattern and various font styles.
    To get to the point, there are two features I've grown to love that I have not found in any other spreadsheet, and I'd like to ask how Numbers compares...
    1) Sortable columns - In "Excel Lite," you can sort as many as three columns at a time. If you highlight cells spanning twelve rows, you can sort by one, two or three columns, even if you've only highlighted a single column. You can also sort an entire column (or two or three columns) by simply highlighting an entire column. I discovered that you cannot do this in OpenOffice.org's spreadsheet. I forget the details, but it was clumsy to work with.
    So how efficient is Numbers' sort feature? Can it sort three columns or just one? If I want to sort every row in a column(s), can I do so by simply highlighting the column, or do I have to specifically highlight every cell in each row and column I want to sort?
    This is the single most important feature I'm looking for.
    2) Cell/Font Attributes - OpenOffice.org's spreadsheet has a respectable number of cell background colors to choose from, but I like Excel's approach better. M$ allows you to choose various shades of each color, combine colors to create new colors and also choose background patterns, such as horizontal, vertical or diagonal lines. What scheme does Numbers use?
    Here are a few more questions...
    How many rows of data can you have in a Numbers spreadsheet? (I think my spreadsheet programs allows about 16,000, while I believe Excel allows 65,000.)
    How much text can you insert in a cell? Unfortunately, I can't use my spreadsheet program for storing articles, because each cell will only accept the equivalent of one or two medium paragraphs. I don't expect any other spreadsheet to do better...I'm just wondering if Numbers does allow you to paste entire articles into cells.
    I'm fascinated to hear that you can paste images into a Numbers document. Right now I'm organizing images I use on my websites into a spreadsheet, with separate columns for each image's ID, caption, text for the ALT tag, etc. It woul be nice if I could actually see a thumbnail of each image next to its ID and description, sort of like connecting a name with a face. Can you really do that? I would think the file size would be enormous if you were working with hundreds of images.
    I assume you can save a Numbers document as a CSV file...right? Is there also a feature that allows you to publish a spreadsheets' content directly into a MySQL database table? (I understand OpenOffice.org has such a feature, though I've never tried it.)
    Sorry for the long post. Any feedback on any particular question would be welcome. I HATE everything Microsoft, and I'm not even using Parallels on my MacBook Pro. The only M$ software program I covet is Excel, so I was elated to discover that there may be a worthy competitor out there.
    Thanks.

    Sorry, I didn't realize there was a free trial version. I just downloaded it, and my first impressions are WOW!
    The sort feature is better than the sort feature on "Excel Lite." Just click "Sort and Filter" to bring up the little Sort dialog box. At first, it looks like you can only sort a single column. But clicking the little plus sign on the right opens additional columns. I don't know what the limit is, but it's certainly far more than three.
    I also verified that you can paste very large amounts of text in a cell.
    Unlike M$'s spreadsheet, there are no cell background patterns, but there are plenty of colors to choose from. Also, it appears that there are far more options for styling text.
    I've only worked with it for a few minutes, but, for my purposes, Numbers rocks!

  • 10g: i just need a simple step by step on getting Pro*C to run

    somehow, there are no demo pc files in my /precom/demo/... folder or makefiles after a complete fresh install of 10g. and how do i know if libraries are even installed?
    is there a simple guide for 10g for linux you guys can point me out to?
    thanks.

    The problem you are describing is a known issue with Videora. The author of the software even posted that problem on their website:
    Known Bugs
    Audio/Video sync
    Problem - Output files can be out-of-sync. While no set pattern has been established, it seems to be more frequent with input files of 23.976 fps, non-DVD rips, and WMV/MPG filetypes.
    Workaround solutions - Try the custom option '-async 1'. If the disconnect gradually increases over time, setting 29.97 fps sometimes gets rid of the problem regardless of the input fps. You can also use AviSynth to assume the FPS and have the audio sync to that. If it's a sudden disconnect, check your VOB Cell settings in DVD Decrypter settings per this thread. Otherwise, test with an AviSynth script per the DaProphecy's method in the FAQ. For non-DVD files, PSPVideo 9 may be a good short-term solution until the converter stabilizes some more or try something like AviDemux
    I would suggest that you do some more research and switch to a different converter.

  • I just need a simple answer about audio being outa sync with video!!!!

    I've been searching the forms but found no straight answer on how to make the audio in sync with the video when using videora to transfer movies. The movie plays fine until about 10 minutes, then it starts getting way off. I am tired so can someone come to my rescue?????????
    Windows XP   Windows XP Pro  

    The problem you are describing is a known issue with Videora. The author of the software even posted that problem on their website:
    Known Bugs
    Audio/Video sync
    Problem - Output files can be out-of-sync. While no set pattern has been established, it seems to be more frequent with input files of 23.976 fps, non-DVD rips, and WMV/MPG filetypes.
    Workaround solutions - Try the custom option '-async 1'. If the disconnect gradually increases over time, setting 29.97 fps sometimes gets rid of the problem regardless of the input fps. You can also use AviSynth to assume the FPS and have the audio sync to that. If it's a sudden disconnect, check your VOB Cell settings in DVD Decrypter settings per this thread. Otherwise, test with an AviSynth script per the DaProphecy's method in the FAQ. For non-DVD files, PSPVideo 9 may be a good short-term solution until the converter stabilizes some more or try something like AviDemux
    I would suggest that you do some more research and switch to a different converter.

  • Getting my program to send message to server when you click X

    I have a client application, it has the minimize, expand, close buttons at the top right cornor like most applications, i have tried using windowlistener but that doesnt work, i want whenever a user clicks the X (close) to send a message to my server saying "bye" and then close the socket connection with the server, thats easy, i just cant figure out how to listen for when a user clicks that X button.
    I can post my code if i need to

    I think I know what your problem is.... assuming that you aren't making an applet, you have to set you close operation to do nothing and then inside of the window closing event exit the programm, so....
    MyGui myGui = new MyGui();
    myGui.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    /*and then your windowClosing method should look like this*/
    addWindowListener(new WindowAdapter(){
         public void windowClosing(WindowEvent e){
              out.println("bye");
                    System.exit(0);
    });

  • Cannot send message using server icloud, cannot send message using server icloud

    Whenever I try to send a message from my iCloud mail id using Lions mail client I get the following
    The server “p08-smtp.mail.me.com” cannot be contacted on the default ports.
    Select a different outgoing mail server from the list below or click Try Later to leave the message in your Outbox until it can be sent.
    I saw an articale suggesting trying to change the SMTP server to SMTP.MAIL.ME.COM but when I try that I get address rejected
    Sending mail through the web interface seems to work OK
    Any ideas?

    I did some looking around and think I've got the right answer. if I use networktool to do a lookup of p08-smtp.mail.me.com it returns address not found.
    It looks like p01-smtp to p04-smtp are defined but the others aren't.
    I created a new smtp server and called it icloud2 and used the address p04-smtp.mail.me.com with the usual settings of USE SSL and AUthentication = Password (and gave it my iCLoud login details).
    Associating that SMTP server with my iCloud account in mail.app lets me send perfectly.
    I assume this is just apple not having everything not set up and replicated to DNS servers yet so I'm checking to see if p08 exists every couple of days and I'm move my iCLoud account to the normal SMTP server when I start getting nslookup responses.

  • Cannot send message using server smtp.seas.upenn.edu

    I can use the mail to recieve and send all mail when I am on campus, but as soon as I am off campus I can only recieve the mail. Every time i try to send I get this error. I have tried all kinds of ports, the ones Mail recommends and the ones on UPenn website. I have also tried password authentication.
    But i'll either get the smtp server is offline or just the error message over and over again, nothing works! help!!!

    Well, you could, but the reason that I personally don't exceed 49151 is that, for example, when you type a URL in Safari web browser and hit return, the application on your computer chooses a random port number from which to send the packets out of, destined for delivery to port 80 of http:apple.com. It's not leaving your computer on your computer's port 80.
    Same when you check your email. That port 110 or 143 or 993 or 995 or 25 or 465 or 587 that you set up in Mail's Preferences? That's on the server, has nothing to do with what port number the traffic leaves your machine (which is the same as what the server's port 110, etc., sent its packets back to.
    Easily verifiable by watching Wireshark or tcpdump on your machine; all traffic leaving your machine (assuming that YOU are not running a SERVER application) leaves on port 49152 or higher. That's why, on the port list to which I linked in my previous post, at the bottom of the list, it says "The Dynamic and/or Private Ports are those from 49152 through 65535".
    So let's say you are tunneling smtp traffic through secure shell to get to the O.P.'s school's smtp server. You can't specify smtp.seas.upenn.edu port 25 in Mail Prefs for the server. So you specify localhost as the smtp server and a server port such as 25025 (in an "unassigned" range of 25010-25792 that is less than 49152) that you will tunnel through ssh to get to the school's smtp server.
    So, just like I choose port numbers for port tunneling that fall within the range of the many "Unassigned" blocks, which are all less than 49152 by the way, I make that 49151 upper limit a personal criteria, too, because with my luck, I'd find a way to be running some server application or be running any application that initiated some internet traffic that would randomly choose the same port that I was trying to tunnel traffic via ssh. So it's just to ensure that there are no port conflicts, no matter how small the probability would be that there might be a conflict with the dynamic ports. You've heard the old adage "If I didn't have bad luck I wouldn't have any luck at all," right? That's me.

Maybe you are looking for

  • Hp office jet 6700

    I would like to know how to change the order that my printer prints. It is now printing from last to first. I want to change it to first to last. I have a Mac with operating 10.9 operating system. I checked in Hp Utility could find whern to change pa

  • Lenovo G550 faulty graphics...

    Hey guys, I've got a small problem with my laptop again. The graphics card is starting to fail I think, yesterday, when I first turned it on, there were moving blue squares across the screen, after a BSOD, the laptop restarted and booted into windows

  • Acrobat 8 crashes InDesign

    Running InDesign CS3 on Windows Vista Ultimate for 3+ months now, no problems except once when I tried to install an update, ID wouldn't start up after that, I had to uninstall and reinstall it (needless to say I haven't installed any more updates, a

  • I can't open the "Keepsafe" App after update.

    I can't open the "Keepsafe" App after update it to the latest version, When i click on the app and after 20 second it's quickly goes back to the home screen, I've tried reopening this App and restarting my iphone but still not working. Please Help me

  • Turning parts of a string into rows in another table

    I need to extract unit codes that are stored in a string into rows in a new table as below From: Set_cd         sequence_number         rule_text KP106A         15432         {1234,4567,8910,1567} To: Set_cd         sequence_number         unit KP106