RMI/SSL Java 5: simple answer for simple app?

I have a very simple RMI application (no dynamic class loader, no security manager, no rmiregistry), which I'd like to run with SSL. I'm using Java 5 and want to use the standard socket factories but haven't found a clear example of how to do it; I've run into what's probably a trivial problem.
My current code looks something like
public class X extends UnicastRemoteObject {
    public void startServer(String url, int port) {
        System.setProperty("java.rmi.server.ignoreStubClasses", "true");
         LocateRegistry.createRegistry(port);
         Naming.rebind(url,server);
}This works properly.
To use SSL, I changed the createRegistry call to
    LocateRegistry.createRegistry(port,
                    new SslRMIClientSocketFactory(),
                    new SslRMIServerSocketFactory());However, with this change, the rebind call throws an exception:
startServer: java.rmi.ConnectIOException: non-JRMP server at remote endpoint
java.rmi.ConnectIOException: non-JRMP server at remote endpoint
     at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:217)
     at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
     at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
     at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
     at java.rmi.Naming.rebind(Naming.java:160)
        ...Any idea of what I'm doing wrong?
Thanks

This should be in a new thread.
java.rmi.server.RMISocketFactory.setSocketFactory(new
RmiSecureSocketFactory());Delete this line. It calls a deprecated method which is 6 years out of date, and you are only calling it at the server, so of courseyour client is speaking JRMP, not JRMP/SSL, to the server, as the exception says. You should be using RMIServerSocketFactory and RMIClientSocketFactory, as follows (and as per the samples that come with your JDK):
this.rmiProcessor = new SamlProcessorImpl();Make sure that SamIProcessorImpl() calls
super(port, new RmiSSHClientSocketFactory(), new RmiSSHClientSocketFactory());
LocateRegistry.createRegistry(port);
LocateRegistry.getRegistry(port).bind(bindName, rmiProcessor);Now you're creating a JRMP registry, but your client expects a JRMP/SSL registry. Change this to
Registry reg = LocateRegistry.createRegistry(port, new  RmiSSHClientSocketFactory(), new RmiSSHClientSocketFactory());
reg.bind(bindName, rmiProcessor);
the RmiSecureSocketFactory returns sslsockets and
when running the server i pass these options
-Djavax.net.ssl.trustStore=pdp.keystore
-Djavax.net.ssl.keyStore=pdp.keystore
-Djavax.net.ssl.keyStorePassword=*******This won't do at the server. The server socket factory must initialize an SSLContext with a non-null KeyManagerFactory which uses these keystore attributes, and create the SSLServerSocket from the context's SSLServerSocketFactory. This seems to be an error in the JDK javadoc.
rmiServer = (RmiProcessor)
miProcessor) LocateRegistry.getRegistry(hostName,
port,
new RmiSSHClientSocketFactory()).lookup(serverBindName);This is OK.
good luck

Similar Messages

  • Need a simple answer for simple question???

    simple question... what is the best way to export my fce movie and burn it on idvd for the best quality for genaral use ... sd..4x3 ratio tv.. lots of ken burn effects on photos... lots of sd video... ???
    not so simple answer... i have read manuals.. apple discussions.. etc etc my eyes are blurry.. i have been exporting out of fce to qk time movie, then import to idvd and burn..
    i get lots of wavy or jitter when doing kens burn effects on photos.. i have been told that 1 field must be missing.. and its better to take the qk time movie convert it again making sure hi quality is checked(movie properties 720 x 480) and self contained movie, then import to imovie ver 5.02 which has better codecs then to idvd ... an apple store tech said..
    then another apple store tech said...dv pro or dv stream or interlaced or on and on and on
    its not 16x9, or for the web or anything but simply burn it and give it to my grandma to play in a standard dvd player.. best quality.. period.. i know it won't any better than my source video but the wavy photos bother me..
    help

    The Apple store tech told you garbage. The quality will be the same. It's using the same QuickTime engine. There may be a difference because going through iMovie will go through a file conversion and the picture might be softened a little, which will mitigated this flicker you see.
    The wavy photos can be a lot of things, most likely due to the nature of the images themselves and the movements you've done on them. What often works on still images is to apply a one pixel vertical motion blur in an application like Photoshop or Elements. This helps to reduce interlace flicker on motion when the material is brought into a video editing application.

  • HT1920 I forgot my security answers for the App Store apps.

    I forgot my security answers for the App Store apps.
    How can I get my security answers back
    Thank you

    Welcome to the Apple Community.
    If you have forgotten the answers, contact Apple through iTunes Store Support

  • I'm forgot my answer for download apps.

    I'm forgot my answer for download apps. Please reset for me by my email address.

    If you can't remember your security questions / answers  go to Express Lane
    select iTunes from the list, then iTunes store.  On the next screen select account Management.   There, select iTunes store account security and write that you would like to reset your security questions and / or answers.
    You should get an eMail reply over the next 24 hours.
    To reset your password.       Apple - My Apple ID

  • How to configure SSL in standalone weblogic server for ADF apps

    Hello,
    I'm new to weblogic, Could anyone provide documentation/blog references to configuring SSL in weblogic for adf application. Currently adf application deploys on http I need it to deploy as https.
    Appreciate your response
    Thanks and Regards

    Expand Environment > Click on Server > Click on Keystores Tab
    Under Keystores you have some options like DemoIdentity & Demo Trust.
    If u want to use the default keystores, you dont have to modify these configuations.
    Just enable SSL and specify the listen port.
    Expand Environment > Click on Server > General
    SSL Listen Port Enabled
    SSL Listen Port:
    If u want to use your own keystore Select Custom Identity and Custom Trust besides Keystores Drop Down and specify the require values.
    If u need any clarification let me knw.
    HTH,
    Faisal
    http://download-llnw.oracle.com/docs/cd/E11035_01/wls100/secmanage/ssl.html

  • Can I have some simple answers for a newbi Mac user!!

    I've just added some photo's in Iphoto 08 of my holiday which was about 3GB from my pictures folder, Now by importing them into Iphoto is kind of taken up 3gb of my memory from my hard drive.
    So 6gb in total for my pictures which seems to be a waste of memory..
    I thought Iphoto may just take the info of each photo as a resource not actually copy the photos, Anyway what;s the best solution on storing image's and using as little memory as possible if there is a way at all.
    Or is doing what i'm doing the best way? I mean what would be the down side of once importing to Iphoto deleating my photos from my pictures folder?
    Sorry for my basic questions but i thought you guys would be the best peeps to ask
    all the best
    MBPG

    There are many, many ways to access your files in iPhoto:
    For 10.5 users: You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Apple-Click for selecting multiple pics.
    Uploaded with plasq's Skitch!
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. If you're using Gmail you can use iPhoto2GMail
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto. With 10.5 you can access the Library from the New Message Window in Mail:
    Uploaded with plasq's Skitch!
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    Or, if you want to access the files with iPhoto not running, then create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    No, iMovie works differently. Best to ask on that forum.
    Regards
    TD

  • Simple GUI for simple client needed

    Greetings Gents
    I really need your help here. I have used this Client, and it works fine, but i need to add a GUI interface to it, to make it look professional. Unfortunatly, i am not a programmer, and have no background in programming. All what i need is just a simple Gui, where all typings occur. Can anyone help me, in adding a simple GUi to this client code?
    Your help is really highly appreciated
    best regards
    schwartz
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Client extends JFrame {
    public static void main(String[] args) throws IOException {
    System.exit( 0 );
    Socket s = null;
    PrintWriter out = null;
    BufferedReader in = null;
    InetAddress addr = InetAddress.getByName(null);
    try {
    s = new Socket(addr, Server.PORT);
    out = new PrintWriter(s.getOutputStream(),true);
    in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    } catch (UnknownHostException e) { System.err.println("Ckeck IP Address on the Host Server");
    System.exit(1);
    } catch
    (IOException e) { System.err.println("Run Server first");
    System.exit(1);
    } BufferedReader stdIn = new BufferedReader(new
    InputStreamReader(System.in));
    String fromServer;
    String fromUser;
    while((fromServer = in.readLine()) != null)
    System.out.println("Server: " + fromServer);
    if (fromServer.equals("Bye")) break;
    fromUser = stdIn.readLine();
    if (fromUser != null)
    { System.out.println("Client: " + fromUser);
    out.println(fromUser);

    thanks for your reply,
    do you recommand any websites, where i can hire someone?

  • I need a simple answer to simple question:  How do I convert a pdf.to word?

    An answer to my questiion!

    There are several possibilities. This may not be simple, but it is important: Word documents cannot hold anything like the amount of complication a PDF can hold. The conversion is often rough, sometimes useless, and should never be considered for forms.
    That said, Adobe's ExportPDF service, PDF Pack service (also makes new PDFs) and Adobe Acrobat product will all have a go.
    If you already HAVE one of these products, let us know which one.

  • Simple Authentication for API App

    Hi,
    We are quite keen to start building on this and just needed to know if we wanted a simple username password authentication and not Active Directory or Social Profile Connector like Google/Facebook, is that possible? Is there any article we can refer to,
    to achieve this?
    Tx.

    Hybrid connection is supported on API App since API App is hosted on Web App directly. You can navigate to the hosting Web App from Azure Portal by clicking
    API App blade -> Essentials part -> API App Host

  • Simple answers to simple questions!

    I own a Toshiba Satellite/L305-S5968.  Two questions: 1. What is the Toshiba Backup Program. 2. How do I get a recovery disk at no charge.
    Well I guess I do have a third question. The warranty plan for $89. Does it include EXPERT TECH SUPPORT for hardware & software?

    first never post like that. it makes it very difficult to read and usually gets ignored. then remove your serial number. this is a public forum if you want to participate please follow the rules.
    1. it is a back up for you files on your laptop
    2. to get the recovery disc at no charge you need to make them yourself using recovery media creator already installed on your laptop.
    3.unless you pay for the plan with onsite repairs then all repairs are done at the toshiba depot in kentucky. they will send you a box when you call toshiba for repair work. they may also tell you about a toshiba authorized repair center in your area that you can drop it off at.
    every thing you need to know is in your users guide. it is in a pdf file on your hdd. search user's guide in you start menu search bar. read it twice and then read it again.
    -civicman4-
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Post all info about your laptop and version of windows. We are working on it but still do not have the powers to read your mind.

  • How can I make a version(s) of java on windows compatible for multiple app

    I have a switch application from EMC -connectrix manager which requires 1.5.0_x,
    we have 1.6.0_x on our management servers. Is java backwards compatible/supporting earlier versions for applications requiring earlier versions. If so, di I have to enavble or list the versions?

    Sun tries very hard to make each version of Java backward compatible with previous versions, especially the previous major release. If it works in 1.5.* it's highly likely to work in 1.6.*... so yeah, suck it and see...

  • HT201303 I forgot the security answers for my App Store account and I can't download any apps on my new apple device

    I can't download any apps on my new i device because I forgot the security question answers. How to I get the answers back? Help plz

    Reset Security Questions
    Frequently asked questions about Apple ID
    Manage My Apple ID
    Or you can email iTunes Support at iTunes Store Support.
    If all else fails:
      1. Go to: Apple Express Lane;
      2. Under Product Categories choose iTunes;
      3. Then choose iTunes Store;
      4. Then choose Account Management;
      5. Now choose iTunes Store Security and answer the bullet questions, then click
          Continue;
      6. Sign in with your Apple ID and press Continue;
      7. Under Contact Options fill out the information and advise iTunes that you would
          like your security/challenge questions reset;
      8. Click Send/Continue.
    You should get a response within 24 hours by email.
    In the event you are unsuccessful then contact AppleCare - Contacting Apple for support and service.
    Another user had success doing the following:
    I got some help from an apple assistant on the phone. It is kind of round about way to get in.
    Here is what he said to do and it is working for me...
      a. on the device that is asking you for the security questions go to "settings", > "store" >
          tap the Apple ID and choose view"Apple ID" and sign in.
      b. Tap on payment information and add a credit/debit card of your preference then select
          "done", in the upper right corner
      c. sign out and back into iTunes on the device by going to "settings"> "store" > tap the
          Apple ID and choose "sign-out" > Tap "sign -in" > "use existing Apple ID" and you
          should be asked to verify your security code for the credit /debit card and NOT the
          security questions.
      d. At this time you can remove the card by going back in to edit the payment info and
          selecting "none" as the card type then saving the changes by selecting "done". You
          should now be able to use your iTunes store credit without answering the security
          questions.
    It's working for me ...I just have to put in my 3 digit security pin from the credit card I am using.
    Good Luck friends!

  • HT2534 i forgot my security answers for the app store

    hiw do you reset security questions?

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address then see if the instructions on this user tip helps : https://discussions.apple.com/docs/DOC-4551

  • Looking for a simple answer ........ without the ...

    looking for a simple answer  ........why is it more difficult for skype to connect than before . It fails to ring most times and your never sure if it is just slow or did not dial in the first place???  and is there any way to disable the leave a message feature ??? I am afraid soon it will be like most wondows applications where you will need endless updates and patches just to keep it running ..... Why is it that everyone is trying to fix everthing when it isnt broken.

    WTF? I'm sure you can find plenty of examples on google. It's on you to take the time to go through them, study them, and, if you still don't understand something, post a clear, concrete question that indicates what you read and what you didn't understand about it.
    As is, you're essentially treating folks here as your research flunkies and saying, "Give me an example that's better than all the ones already easily available to me. Read my mind to know why I didn't like them."

  • Can anyone answer a very simple question for me ive heard the apple was giving a free iphone 4 or 4s bumper away is there any truth to that?

    can anyone answer a very simple question for me ive heard the apple was giving away iphone 4 or 4s bumpers is there any truth to that?

    Not any more, no. There was a free bumper program back when the iPhone 4 originally came out. It has long since expired.

Maybe you are looking for

  • Trying to install - can't get past run page on which I must enter my user name & password - helP!!!

    I am trying to initially install firefox - when I get to page where I must enter "user name" and "password," I follow prompt and enter Michele-PC\Michele but nothing happens and I can't complete installation by getting to Firefox wizard set up == Thi

  • Authorization (401) issue in SXMB_MONI (File to Inbound Proxy)

    Hi All, Here I am facing the authorization (401) issue in SXMB_MONI. The scenario is File to Inbound Proxy, The outbound proxy is working fine. but the issue with the inbound proxy. The below information we are getting in SXMB_MONI. SAP:Error SOAP:mu

  • Approvals are not triggered via DI

    Approvals are still not triggered via DI. The only note relevant I was able to find is 915573. Tested with 8.82, still the same behaviour occours.

  • Fscommand when the swf inside html  table

    in the html file , when I put the swf file inside a table, the fscommands does not work. how do i make it work? should i make any changes in the html? ? notice: when the swf is out side the table , it is working fine.

  • Delivery cost condition types in ECC

    We are going for Ext clasic scenario where SRM POs will be transferred to backend. How to have delivery cost condition types in SRM which will also appear in ECC POs? In SRM condition types, condition category does not have delivery cost option , lik