Detect RMI client problem. Gotta be anothe way...

For a while, I've been searching how to detect RMI client unexpected disconnection but there is no real answer for that. There is NO other way to let server know that client is disconnected beside using call back or using periodically checking client?? Something like unreferenced() to tell specific client is not holding the reference or something like that..

In our system, almost every Remote interface has a void ping() method, and we periodically call this, and if there is an Exception thrown we do whatever we need to, to clean up.
Often we create a local (static) proxy class to the Remote object that knows how to do the clean up, and has same methods but doesn't throw exceptions. it does NOT implement the Remote interface so there is no need to catch exceptions at every point it is called. This proxy can control the periodic pinging.
I guess you could extend remote and add a ping method to it (call this PingableRemote), then extend this new interface instead of Remote directly.
Also create a class that takes a PingableRemote and some callback object in it's constructor, which could then take care of the pinging and "remoteLost" notification in a form that can be re-used.
Bruce

Similar Messages

  • Got a RMI Client problem

    HI all im really not sure how to fix this error that im having, to be honest im not really sure what i have done wrong, or where im going wrong with pulling information from my interface or and implimentation.
    Okies here is all the code
    Interface:
    public interface RMIServ
    extends java.rmi.Remote {
    public String PassCheck(String pass, String user)
    throws java.rmi.RemoteException;
    Implimentation:
    public class RMIServImpl
    extends
         java.rmi.server.UnicastRemoteObject
    implements RMIServ {
    // Implementations must have an
    //explicit constructor
    // in order to declare the
    //RemoteException exception
    public RMIServImpl()
    throws java.rmi.RemoteException {
    super();
         public String PassCheck(String pass, String user)//takes the user and switch number
    throws java.rmi.RemoteException {
         String result;
         int password = Integer.parseInt(pass);//converts the string to an int
              int info = Integer.parseInt(user);//converts the string to an int
    if (password==72)//checks password
         switch(info)                         //start switch.
              case 1: result="Hello my name is Gareth Gates.";break;
              case 2: result= "My student number is 0302814.";break;
              case 3: result= "I am Taking Computer Science and Robotics.";break;
              case 4: result= "This semester i am taking 4 units, this is one.";break;
              case 5: result= "my project is on server times.";break;
              case 6: result= "i live in luton during the week.";break;
              case 7: result= "i work in a garden centre.";break;
              case 8: result= "please let me know what you think of my server.";break;
              case 9: result= "Email: [email protected]";break;
              case 10: result= "Email me any time, thanks.";break;
              default : result= "You entered a number bigger then 10 please try again.";break;
              }                                        //end switch.
         return result;                         //sends string back to client.
    else
         return result= "You entered the wrong password";//send back an error
    Server:
    import java.rmi.Naming;
    public class RMIServServer {
    public RMIServServer() {
    try {
    RMIServ c = new RMIServImpl();
    Naming.rebind("rmi://localhost:1099/RMIServService", c);
    } catch (Exception e) {
    System.out.println("Trouble: " + e);
    public static void main(String args[]) {
    new RMIServServer();
    Client:
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import java.net.MalformedURLException;
    import java.rmi.NotBoundException;
    import javax.swing.*;
    public class RMIServClient {
    public static void main(String[] args) {
    try {
    RMIServ c = (RMIServ)
    Naming.lookup("rmi://localhost/RMIServService");
    String password = JOptionPane.showInputDialog("Please enter your password");
    if (password == c.PassCheck(pass)){
    JOptionPane.showMessageDialog(null, "Password Correct");
    catch (MalformedURLException murle) {
    System.out.println();
    System.out.println(
    "MalformedURLException");
    System.out.println(murle);
    catch (RemoteException re) {
    System.out.println();
    System.out.println(
    "RemoteException");
    System.out.println(re);
    catch (NotBoundException nbe) {
    System.out.println();
    System.out.println(
    "NotBoundException");
    System.out.println(nbe);
    catch (
    java.lang.ArithmeticException
    ae) {
    System.out.println();
    System.out.println(
    "java.lang.ArithmeticException");
    System.out.println(ae);
    Any light that you could shed on my problem would be much appreciated, thanks for the help in advance
    the bold is where my problem lies
    Joe de Ronde
    Message was edited by:
    joederonde

    try
    String password = JOptionPane
              .showInputDialog("Please enter your password");
    if (password == c.PassCheck(password, "username")) {
         JOptionPane.showMessageDialog(null, "Password Correct");
    }Also your implementation is wrong, you better take a look at some examples (like the java tutorial, including the rmi tutorial, or if you're using eclipse there are some working ready to use examples in the rmi plugin for eclipse (google it).

  • RMI Server and RMI Client Problem

    First, Hi!
    I have create my RMI Server and a RMI Servlet client.
    I can run the server and servlet first time and it works fine.
    Then, I stop rmiregistry and server.
    Then, I start rmiregistry and server for a second time but my RMI Servlet client gets a
    java.rmi.ConnectException: Connection refused to host: xxx.xxx.xxx.xxx; nested exception is: java.net.ConnectException: Connection refused
    If I copy the class again where the servlets resides, it works again. But I have to keep doing that. I have to keep copying the class file to the servlet directory every 2nd time I try to run it for it to work.
    Anyone know what am I doing wrong?

    First, Hi!
    I have create my RMI Server and a RMI Servlet client.
    I can run the server and servlet first time and it
    works fine.
    Then, I stop rmiregistry and server.
    Then, I start rmiregistry and server for a second time
    but my RMI Servlet client gets a
    java.rmi.ConnectException: Connection refused to host:
    xxx.xxx.xxx.xxx; nested exception is:
    java.net.ConnectException: Connection refused
    If I copy the class again where the servlets resides,which class file ? u mean RMIServer's class files ??
    I have faced the same problem too. In my case if i just restart my Tomcat webserver the error goes and the servlet is very well able to connect back to the RMI Server
    it works again. But I have to keep doing that. I have
    to keep copying the class file to the servlet
    directory every 2nd time I try to run it for it to
    work.
    Anyone know what am I doing wrong?

  • After getting an update from 10.6.8 many of my programs were no longer able to open. How can I undo the update or solve this problem another way?

    After getting an update from 10.6.8 many of my programs were no longer able to open. How can I undo the update or solve this problem another way?

    Do you have a bootable clone from prior to the update? If so, roll back with that.
    Are your apps that won't open PPC and do they need Rosetta? Do you need to activate Rosetta?
    Have you considered reinstalling 10.6 from your install disc and then coming forward with the 10.6.8 Combo Updater, then doing software update and not including whatever it was you installed that caused this propblem?
    By the way - what update was it that caused this problem?

  • Just installed Lion and the Magic TrackPad and I am having a problem with one click commands.  I have to hit the pad fairly hard with one finger to get it to accept the command.  Is this normal, is there another way that I am suppose to execute commands?

    Just installed Lion and the Magic TrackPad and I am having a problem with one click commands.  I have to hit the pad fairly hard with one finger to get it to accept the command.  Is this normal, is there another way that I am suppose to execute commands?

    No you just need to turn on Tap to Click. Go into System Preferences - Trackpad and click the Point to Click tab and select the first box which will say Tap to Click and you should be in business.

  • HT1414 is there another way i can fix this problem without having to restore my phone?

    my wifi settings is faded out so i cannot turn the wifi on. i followed the steps that this website said to do so it could get fixed but it didn't work.  then thet said i would have to restore my phone and i can't do that. is there another way i can fix this problem without having to restore my phone?

    No.
    A restore might not even fix it; a fair amount of the time, when the Wi-Fi is grayed out it is a hardware issue.

  • I've forgotten my pass-code to my Ipod touch 4g and when I try to restore and update it on my itunes library the internet connection cuts out. Is there another way to fix this problem? Cheers

    I've forgotten my pass-code to my Ipod touch 4g and when I try to restore and update it on my itunes library the internet connection cuts out so this is not an option. Is there another way to fix this problem? Cheers

    The only way is to connect the iPod to a computer with has an internet connection and iTunes and restore the iPod. Use as friiend's computer or make an appointment at ther Geniuds Bar of an Apple store.

  • My iPhone 5 C doesn't respond when pressing the Home Button, do I need to go to a Apple store or is there another way to fix this problem?

    I bought my iPhone 5 C last week and is still all brand new. My phone was alright thses days but suddendly when i pressed the Home button to get out of an app, it didn't respond and also when i want to see the time I press the Home button but it doesn't show the lock screen. Do I need to go to an Apple Store or is there another way to fix this problem? I have read the Helping Center in the Apple Web but still it didn't help to solve my problem. Can someone please help me?

        Getting your notifications is definitely important and we understand not wanting to miss anything katieb373. You have reached the right place for assistance in getting this working for you again. Has your phone completed any recent software updates right before this happened? You can reset the network settings to see if that will resolve the issue by following the steps http://vz.to/1uO6qTU in the link. Please try this and let us know the results.
    CandiceH_VZW
    Follow us on Twitter at @VZWSupport

  • Quartz schedular problem accessing thru RMI client

    Hi,
    I am trying to access Quartz scheduler through RMI client/server.
    Quartz scheduler RMI is starting up properly.
    When I run the RMI client I am receiving the following error.
    =================================================================
    org.quartz.SchedulerException: Error communicating with remote scheduler. [See nested exception: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
         java.io.InvalidClassException: oracle.classloader.util.AnnotatedNoClassDefFoundError; local class incompatible: stream classdesc serialVersionUID = -4364152148004017014, local class serialVersionUID = -687990861161016914]
         at org.quartz.impl.RemoteScheduler.invalidateHandleCreateException(RemoteScheduler.java:135)
         at org.quartz.impl.RemoteScheduler.scheduleJob(RemoteScheduler.java:335)
         at net.nighttale.scheduling.rmi.QuartzClient.main(QuartzClient.java:17)
    * Nested Exception (Underlying Cause) ---------------
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
         java.io.InvalidClassException: oracle.classloader.util.AnnotatedNoClassDefFoundError; local class incompatible: stream classdesc serialVersionUID = -4364152148004017014, local class serialVersionUID = -687990861161016914
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:217)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
         at org.quartz.core.QuartzScheduler_Stub.scheduleJob(Unknown Source)
         at org.quartz.impl.RemoteScheduler.scheduleJob(RemoteScheduler.java:332)
         at net.nighttale.scheduling.rmi.QuartzClient.main(QuartzClient.java:17)
    Caused by: java.io.InvalidClassException: oracle.classloader.util.AnnotatedNoClassDefFoundError; local class incompatible: stream classdesc serialVersionUID = -4364152148004017014, local class serialVersionUID = -687990861161016914
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836
    =============================================================
    My client and server quartz properties are as follows.
    Client properties
    org.quartz.scheduler.instanceName = DefaultQuartzScheduler
    org.quartz.scheduler.rmi.proxy = true
    org.quartz.scheduler.rmi.registryHost = 127.0.0.1
    org.quartz.scheduler.rmi.registryPort = 1098
    Server properties
    # Default Properties file for use by StdSchedulerFactory
    # to create a Quartz Scheduler Instance, if a different
    # properties file is not explicitly specified.
    org.quartz.scheduler.instanceName = DefaultQuartzScheduler
    #org.quartz.scheduler.instanceName = Sched1
    org.quartz.scheduler.rmi.export = true
    #org.quartz.scheduler.rmi.proxy = false
    org.quartz.scheduler.rmi.registryHost = 127.0.0.1
    org.quartz.scheduler.rmi.registryPort = 1098
    org.quartz.scheduler.rmi.createRegistry = true
    org.quartz.scheduler.wrapJobExecutionInUserTransaction = false
    org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
    org.quartz.threadPool.threadCount = 10
    org.quartz.threadPool.threadPriority = 5
    org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread = true
    org.quartz.jobStore.misfireThreshold = 5000
    #org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore
    org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX
    org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
    org.quartz.jobStore.useProperties = false
    org.quartz.jobStore.dataSource = demoDS
    org.quartz.jobStore.tablePrefix = QRTZ_
    org.quartz.jobStore.isClustered = false
    #============================================================================
    # Configure Datasources
    #============================================================================
    org.quartz.dataSource.demoDS.driver = oracle.jdbc.driver.OracleDriver
    org.quartz.dataSource.demoDS.URL = jdbc:oracle:thin:@demou.abc.com:1521:orcl
    org.quartz.dataSource.demoDS.user = demo
    org.quartz.dataSource.demoDS.password = oracle
    org.quartz.dataSource.demoDS.maxConnections = 5
    org.quartz.dataSource.demoDS.validationQuery=select 0 from dual
    #org.quartz.dataSource.demoDS.validationQuery=select lock_name from qrtz_locks where lock_name = 'TRIGGER_ACCESS'
    #============================================================================
    # Configure Plugins
    #============================================================================
    # Uncomment the following to get logging of job execution events...
    #org.quartz.plugin.jobHistory.class = org.quartz.plugins.history.LoggingJobHistoryPlugin
    # Uncomment the following to get logging of trigger firing events...
    #org.quartz.plugin.triggHistory.class = org.quartz.plugins.history.LoggingTriggerHistoryPlugin
    #============================================================================
    # Configure Listeners
    #============================================================================
    #org.quartz.jobListener.dummy.class = org.quartz.examples.DumbJobListener
    Appreciate your quick response.
    Regards,
    Nishi

    What I did today is that we connected the client PC directly with the server through a switch. So keep in mind please, that for the following informations there is no firewall involved whatsoever.
    I've just checked the communication log on the server with the microsoft network monitor. the communication proceedes in the following manner:
    1) the client calls the server from a random source port(src) onto the specified destination port(dst) 1088.
    2) the server application replies from (src)1088 to (dst)1052.
    3) now comes two client calls again from (src)1052 to (dst)1088.
    4) and then the server sends something two times from 1088 to 1052
    and that's it! end of communication. of course then it comes the above mentioned error.
    What the most amazes me is that although I explicitly specify for the client as well, that the rmi registry should be available on the remote port 1088, still it uses a random port (in this case 1052). Could this be alright? After all, what port the client uses to reach for the remote registry could be random I guess...
    What I see on the client side with the trace prints is that during the client initialization first a connection will be made on a local machine with port # -1 and just after that calls the remote server. But in that case I don't get it why it prints the 1088 if under the hood is a 1052 or other random port...
    Meanwhile, on the server side I get a trace message from the custom security manager that an accept on the random port (1052) has been successful. but after that no more printouts.
    Oh, and one more thing... did I mentioned that I implemented a pure socket client/server thingy and it works just fine? with or without firewall.

  • RMI connectivity problem (multi-NIC)

    I'm developing a simple photo share program with Java RMI.
    I connect rmiregistry (192.168.100.3), it returns the object reference, but when I invoke a method I get problems.
    My server (remote) - 192.168.100.3 - reply with an address of another NIC - 192.168.62.1 (from VMware). I print out the Proxy object, and I was surprised when I saw 192.167.62.1 address, instead 192.168.100.3. My client is running on 192.168.100.1 address.
    Why is this happening?
    When I turned off the VMware virtual NICs, I was successful. I want to understand what is going on, and if is there a way to fix this issue.
    $ java rmi.Client
    Looking...object found!
    Proxy[PhotoShare,RemoteObjectInvocationHandler[UnicastRef [liveRef: [endpoint:[192.168.62.1:58343](remote),objID:[4cc5973e:11de2bb065b:-7fff, 4037313925566802436]]]]]
    Exception in thread "main" java.rmi.ConnectIOException: Exception creating connection to: 192.168.62.1; nested exception is:
         java.net.SocketException: Network is unreachable
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:614)
         at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
         at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
         at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
         at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
         at $Proxy0.listaFotos(Unknown Source)
         at rmi.Client.main(Client.java:26)
    Caused by: java.net.SocketException: Network is unreachable
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:180)
         at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
         at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
         at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
         ... 7 moreEdited by: pantony on Nov 28, 2008 3:26 AM
    Edited by: pantony on Nov 28, 2008 3:27 AM

    See item A.1 of the [RMI FAQ|http://java.sun.com/j2se/1.5.0/docs/guide/rmi/faq.html].

  • RMI Client UnmarshalException with UNC paths

    I have a 'none' Java application, that has an embedded JVM which is being used as an RMI server to allow communication to the application from a browser. The applet detects the presence of the RMI server and if not detected, will start the application, which in turns starts the RMI server. Once the RMI server is started the Client then invokes the method on the server, and hence into the application.
    If the executable for this application is pathed to either a local or mapped drive then everything works as expected, if I then try to use a UNC path, once the RMI server is started, the client returns an UnmarshalException:
    java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
    java.io.EOFException
    java.io.EOFException
    at java.io.DataInputStream.readByte(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at java.rmi.Naming.lookup(Unknown Source)
    I guess that the problem is that the serialization process has been started, and as the client starts reading from the datastream the UNC paths cause the EOF Exception. any help on how to get round this problem would be gratefully received. Unfortunately using a mapped drive is not a solution to this problem due to the way the application is being served.

    Hi all,
    It turns out that when the java.policy file is being read, it ignores the servername on the UNC path and therefore looks for a directory of the remaining data of the UNC path for the file. I guess it is now a task of figuring out why this is...

  • Cisco ASA 5505 and DHCP Client Problems

    Hi, i have a problem. I've connected my ASA appliance to an ADSL modem, and i dont get an DHCP address on the outside interface (e0/0). I use the asa-722-19.bin firmware.
    I turned on the debugging for the DHCP client and could see that the ASA device was sending out broadcasts but a reply never came. Instead I connected the device to my internal network where the ASA got an address instantly.
    I read somewhere that if I was to use ?ip address dhcp client-id fastethernet 0″, then I got an address from the ISP.
    I tried looking for a similar command on the ASA5505 but I couldn?t find anything. I did however find a page on the Cisco site confirming my suspicions. It said some ISP?s require the client-id field of the DHCPDISCOVER request to be filled.
    I've also read that this issue has beed fixed since a few weeks, now they have released version 7.2(2).22 where you can define ?dhcp-client client-id interface outside? in global configuration mode. Im running 7.2(2).19 and i cannot find any command like that in my appaiance. How do i fix my problem ? Or how do i get about recieving the 7.2(2).22 firmware update.
    Regards !
    Leif

    Hi again! I thought I should share the solution that worked for me. I use software version 7.2(2) on this device. ASDM 5.2(2). In ASDM open configuration / Interfaces. Click in outside (my case 0/0) and press Edit. Then open the tab Advanced and set the correct Active Mac address. Fore some reason its empty by default and the ISP/modem don't like that. You will find the correct MAC address under the help menu / "About ASA". Im sure there is some another way to do this but this is a simple "how-to" that works with Swedens biggest ISP and their standard DSL modem.
    When I used a Linksys DSL modem in bridge mode without the MAC address set I got an inside IP adress (192.168.x.x) from the modem to the ASA. After setting the MAC address I just had to do a renew and got the outside address right away. /Bjorn
    (future users searchwords: no ip from isp, ASA 5505 and cable modem).

  • RMI client-side - how to encrypt,decrypt  in client-side

    I write javacard RMI style. My problem is...
    Source code below is work when it write in applet (card - side)
    but in client-side (reader -side) I copy it to client - side code and test to run, if fail --> throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    It seem to be "javacardx.crypto" and "javacard.security" is make for use in applet in card only. Did I misunderstand?
    if it make for use in applet only, how is possible to do like this " card use privatekey to sign message and send to reader , reader use card's publickey to verify that card sign this signature or not."
    or
    "card use reader's publickey to encrypt message and send to reader, then reader use privatekey to decrypt message (reader authencate itself) "
    because I can't do any of cipher , keybuilder in RMI-client side(reader)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    it will throw nullPointerException
    and if (change false to true)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,true);
    throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    after that I swap this line with
    pri_key = (RSAPrivateKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PRIVATE,KeyBuilder.LENGTH_RSA_512, false);
    since it will do this first (i swap the line already) it also throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    also be the same result with swap
    kp = new KeyPair(KeyPair.ALG_RSA,(short)KeyBuilder.LENGTH_RSA_512 );
    to a first line
    it throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    Please help me
    RSAPrivateKey pri_key;
    RSAPublicKey pub_key;
    KeyPair kp;
    Cipher RSAcipher;
    RSAcipher = Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    pri_key = (RSAPrivateKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PRIVATE,KeyBuilder.LENGTH_RSA_512, false);
    pub_key =(RSAPublicKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PUBLIC,KeyBuilder.LENGTH_RSA_512, false);
    kp = new KeyPair(KeyPair.ALG_RSA,(short)KeyBuilder.LENGTH_RSA_512 );
    kp.genKeyPair();
              pri_key = (RSAPrivateKey) kp.getPrivate();
              pub_key = (RSAPublicKey) kp.getPublic();
    //ENCRYPT
    RSAcipher.init(pri_key, Cipher.MODE_ENCRYPT);
    t_cipherLengthRSA = RSAcipher.doFinal(plaintxt,(short)0, (short)plaintxt.length, t_cipherText, (short)0);
    //DECRYPT
    RSAcipher.init(pub_key, Cipher.MODE_DECRYPT);
    RSAcipher.doFinal(ciphertxt,(short)0,(short) t_cipherLengthRSA, temp1, (short)0);

    I write javacard RMI style. My problem is...
    Source code below is work when it write in applet (card - side)
    but in client-side (reader -side) I copy it to client - side code and test to run, if fail --> throw
    exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHMYou can not share code between card and client. On the card use the classes of javacardx.crypto and on the client side those of javax.crypto and java.security.
    It seem to be "javacardx.crypto" and "javacard.security" is make for use in applet in card only. That is right.
    if it make for use in applet only, how is possible to
    do like this " card use privatekey to sign message
    and send to reader , reader use card's publickey to
    verify that card sign this signature or not." or
    "card use reader's publickey to encrypt message and
    send to reader, then reader use privatekey to decrypt
    message (reader authencate itself) "On each platform you have classes that provide the same cryptographic operations but the interface of these classes is different (because of the limitations of the java card platform).
    because I can't do any of cipher , keybuilder in
    RMI-client side(reader)Use the java.security.KeyFactory instead.
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    it will throw nullPointerException
    and if (change false to true)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,true);
    throw exception 0x3 -
    javacard.security.CryptoException.NO_SUCH_ALGORITHMCryptographic support on java cards is optional. Not every card supports every algorithm. Try to use another algo.
    Jan

  • RMI Client on Linux issue.

    I am facing Java RMI problem on Suse Linux.
    RMI server running on solaris and RMI client running on Solaris ---> works fine
    RMI server running on solaris and RMI client running on Linux ---> gives error
    Pls note that RMI server running fine. When invoking remote method from RMI client on Suse Linux, I get following error.
    Java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: RemoteVtskImpl_Stub
    Any help/pointers will be useful.

    Even we tried setting the CLASSPATH to point to those jar files. But still the problem persist.
    At run time is there any way to see what all the _stub files are downloaded in the JVM at the client machine (linux machine in our case) from the server machine (solaris machine in our case).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Feature Request or another way of setting an Affiliate up or External Affiliate Software

    One of the biggest problems with the Affiliate module, is its persistence
    Feature Request -
    Using Affiliates to market products and services is a huge business, but the BC system only caters for affiliates providing a link to a specific product (or possible the shop) and it only works if they follow that link and buy right there and then.
    Even if the customers buys something under the affiliate link, if the customer returns to the shop a second time, without using the link, then any affiliate reference is lost. There is no persistence nor any link stored between the affiliate and customer.
    Therefore the affiliate program does not work for any business that may use affiliates but does not use a Shopping cart. For example I am working on a Property site where professionals may refer clients to buy property, and receive a referral/affiliate fee. We need to track which customers are linked to a referrer/affiliate but there is no shop involved, although we would like to put the commission through as a manual order and track commission payments.
    Suggestion: When a Customers uses an affiliate link to enter their details (or buy something from a shop for that matter), then the affiliate is stored permanently on the customer’s record, and can be used for subsequent purchases/orders.
    This means that if the customer returns to the shop directly and buys something, then the system can use the stored affiliate link to make sure the affiliate gets paid.
    Secondly other business can now add an Order Manually for the client, and the affiliate will get paid. This will open up BC to other businesses that use affiliate systems without a shopping cart. Especially useful for the Services industry.
    I also think by doing this BC can remove the problem of requiring a seamless gateway.
    Another Way?
    Any feature request like this may take time to be set up, if it is set up at all.
    Can anyone advise if they have managed to get around the problem and how. Thanks
    External Affiliate Software -
    Has anyone used an external affiliate software program, and integrated it with BC and if so, which one and was it any good?
    Thank you

    That is correct: SLBL only works on SMTP addresses.
    If I understand correctly, the user wants to prune thier Block List by removing addresses that are not actively sending spam.  This is not easy, but it is something that the user can do themselves:
    The user can log directly into the Spam Quarantine to see what mail has been stopped on thier behalf recently.  They would then access their SLBL through the Spam Quarntine to see what addresses they have configured for Blocking.  For each address listed, they would Search their Spam Quarntine for emails from that address.  They would then review the content of those emails to determine if they stilll want to block the specific address or not.
    I hope this helps!
    - Jackie

Maybe you are looking for

  • How Do I Add A Search Engine Not Listed Under the Mycroft Project??

    I just installed Firefox 12.0 last night. All I want to do now is add www.Gibiru.com to the Search Engine Manager, delete Google & make Gibiru my default search. There is no add-on or plug-in at the Gibiru webpage & it doesn't come up under the Mycro

  • Acces control violation

    Hello, I make a Form, but when I want to distribute it, appears this error: Se ha producido un error. El formulario no existe. Vuelva a introducir la dirección web, puede haber errores ortográficos en el vínculo. [ref: 7P47jsWQD58TQSXI4zrk6g, AccessC

  • How I set character encoding for everypage and alway?

    I use Thai window 874 open the page when I select some website it contain Thai then click open new tab it change to western windows 1252. It can not display Thai. I must set character encoding to Thai windows 874 everytime.

  • NaN in Quiz Results page

    I created a 5-question quiz for a project in Captivate 7.  I want the results to show like this: In preview, I took the quiz and entered all correct answers.  This is what showed in the results page: It says I only got 1 question correct and says NaN

  • Can I delete Guest Admin? (-)is dimmed.

    I had o restart my computer, and when it came on, my Log on  options are the Administrator and then the Guest User.   The Guest User is turned OFF in System Preferences and the Minus sign is dimmed. I saw a thread on this from 2010 but there wasnt re