Provide JMF to applet client launchers

I read the readme.html file including with JMF, but i don't get a way to send JMF to the launchers of my applet.
I saw but not understood wery well what's the goal of JMCustomizer.
Anyone can explain me a little?
Anyone can tell me how to send the JMF package to the Clients?
A code example would be welcomed, even in HTML
The context is:
I have an application capturing my webcam and ready to transmit RTP packets to a client.
This client must open a webpage on my web server.
The webpage contains an applet based on the following code:
(you should understand with juste this few lines)
MediaLocator ml = new MediaLocator("rtp://82.229.241.123:3000/video");
Player p = Manager.createRealizedPlayer(ml);
setContentPane(p.getVisualComponent());
p.start();
but, the java console tells me that the local port 3000 cannot be open although the app send RTP packet to people on port 3000
and the log of my apach server tells me that the clients tried to get some files which are not on my pc nor in any jar files from JMF.
Could you help me?

xljiayuan wrote:
..I am trying developing an applet SIP phone based on Jain Sip Applet Phone( which originally can only deal with audio signal). If this is pure audio, can it be done using JavaSound?
..But I found a big problem that I have to make every client install the JMF, however the clients hope there is no software to be installed locally.To run an applet, the applet needs to be 'installed' on the user machine. Same with anything else.
BTW - have you investigated JavaFX? It is effectively the replacement for JMF, and possibly has a better end-user experience than trying to install JMF.
However, as for the applet, it dosen't that simple for the security thing. Here is the output in cosole:
in my project , it throws exception like this: "Failed to initially commit JMFRegistry. Ignoring err.java.lang.SecurityException: commit: Permission denied"Is your applet digitally signed? If not, it has no hope of intercepting sound on the client. It is that simple.
Imagine if you visited a web page with a 1px x 1px applet (effectively invisible) that could hear everything you say, and transmit it back to the server. Sun is not about to allow that, unless the end-user has granted the applet extended permissions.

Similar Messages

  • Applet without JMF installation at client side

    hello,
    I am trying developing an applet SIP phone based on Jain Sip Applet Phone( which originally can only deal with audio signal). But I found a big problem that I have to make every client install the JMF, however the clients hope there is no software to be installed locally.
    In application, I can run it without JMF installation by copying all the dlls to system32 directory and add some related JMF source code into my own project. Or just simply put the jmf.property to the "lib" directory, which also works.
    However, as for the applet, it dosen't that simple for the security thing. Here is the output in cosole:
    @mediaManager.detectSupportedCodes- number of capture devices: 2
    - name of the capture device: JavaSound audio capture
    - format accepted by this AUDIO device: LINEAR, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 44100.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 22050.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 22050.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 11025.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 11025.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 8000.0 Hz, 16-bit, Stereo, LittleEndian, Signed
    - format accepted by this AUDIO device: LINEAR, 8000.0 Hz, 16-bit, Mono, LittleEndian, Signed
    - name of the capture device: vfw:Microsoft WDM Image Capture (Win32):0
    - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=352,height=288] MaxDataLength = 202752 DataType = class [B yuvType = 32 StrideY = 704 StrideUV = 704 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=160,height=120] MaxDataLength = 38400 DataType = class [B yuvType = 32 StrideY = 320 StrideUV = 320 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=176,height=144] MaxDataLength = 50688 DataType = class [B yuvType = 32 StrideY = 352 StrideUV = 352 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=320,height=240] MaxDataLength = 153600 DataType = class [B yuvType = 32 StrideY = 640 StrideUV = 640 OffsetY = 0 OffsetU = 1 OffsetV = 3
             - format accepted by this VIDEO device: YUV Video Format: Size = java.awt.Dimension[width=640,height=480] MaxDataLength = 614400 DataType = class [B yuvType = 32 StrideY = 1280 StrideUV = 1280 OffsetY = 0 OffsetU = 1 OffsetV = 3
    java.lang.RuntimeException: No permission to capture from applets
    -> Couldn't connect to audio capture device
    java.lang.RuntimeException: No permission to capture from applets
    -> Couldn't connect to video capture device
          I found that my applet can detect two device which is correct but has "no permission to capture from applets".
          In the progress of installation the JMF, and option is "permit recording from an applet". I read the source code, and found it dose the following works:
          if I choose "permit recording from an applet",  then "allowCapture=1", and in "settingPanel.java" it dose:
         "boolean allowCapture = checkAllowCapture.getState();
          Registry.set("secure.allowCaptureFromApplets", new Boolean(allowCapture));"
          I want to do what the installation progress did to give permition to applet, however, when I do the following:
           private static final String PROP_ALLOW_CAPTURE_FROM_APPLETS
            = "secure.allowCaptureFromApplets";
           Registry.set(PROP_ALLOW_CAPTURE_FROM_APPLETS, new Boolean(true));
           Registry.commit();
          in my project , it throws exception like this: "Failed to initially commit JMFRegistry. Ignoring err.java.lang.SecurityException: commit: Permission denied"
          The code which i thought could give applet the rights is denied.
          Till now, I have also read some similar questions in different forums, but there is no good answer.
          Can you help me? Is there any possibility to run the applet without installation on the client side ? Is my method right? If not, how should I do?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    xljiayuan wrote:
    ..I am trying developing an applet SIP phone based on Jain Sip Applet Phone( which originally can only deal with audio signal). If this is pure audio, can it be done using JavaSound?
    ..But I found a big problem that I have to make every client install the JMF, however the clients hope there is no software to be installed locally.To run an applet, the applet needs to be 'installed' on the user machine. Same with anything else.
    BTW - have you investigated JavaFX? It is effectively the replacement for JMF, and possibly has a better end-user experience than trying to install JMF.
    However, as for the applet, it dosen't that simple for the security thing. Here is the output in cosole:
    in my project , it throws exception like this: "Failed to initially commit JMFRegistry. Ignoring err.java.lang.SecurityException: commit: Permission denied"Is your applet digitally signed? If not, it has no hope of intercepting sound on the client. It is that simple.
    Imagine if you visited a web page with a 1px x 1px applet (effectively invisible) that could hear everything you say, and transmit it back to the server. Sun is not about to allow that, unless the end-user has granted the applet extended permissions.

  • JMF Applet without JMF installed on clients ? A solution ?

    Hi all. I have compiled RTPPlayerApplet sample downloaded from Sun's web. After comment some "error" lines, I got it working on my client machine with JMF installed.
    I have searched for this solution on forums, but didnt find how to solve this:
    I want that clients only need to have installed JRE, and not JMF. I have read that it can be possible telling in the HTML of the applet that "loads" jmf.jar file, and some others...
    I have tried it, and the applet loads without any error on my client machine without JMF installed, but it doesnt start to play...
    Any suggestion ?
    Does anyone got RTPPlayerApplet working on client machine without JMF installed ?
    Thanks for your help
    John

    I want that ... HTML code is placed).
    I can understand your reasons for not wanting to bother clients with installing the JMF. However, please understand the negative side effect of this approach. If nine other organisations supply your client a JMF-based applet in the same way, the client would be downloading the same JMF jar ten times. Don't even think about patches and upgrades that would require JMF jar updates. If you rely on framework components, don't be shy with distributing the framework where needed.
    And i think that also could be possible ... decrease the size of the file...
    If you compile only the source code of the JMF classes you use or perhaps create a new jar file in which you copy only the JMF classes you've used, this should work. However, for reasons mentioned earlier, this is not quite as user-friendly as it may seem at first glance.
    Think of the JMF as something like Microsoft DirectX. When you install a game that needs DirectX, it checks and -if necessary- installs a complete, new version of DirectX.

  • Is there any way to use JDK1.4PreferenceAPI in JWS + Applet clients

    Dear Friends,
    Actually, we are in process of reusing the J2sdk1.4 new utilities like (Preferences API ) in all the applications means Application client, Java WebStart
    Client , Applet client. As for as Application client is concern , we do not have any problem at all, Its because of, J2sdk1.4 Preferences API provides an
    option to Plugin our Implementation for reading and writing User Preference Information.
    But Incase of JWS client or Applet client , we can not Plug in our own Preference Factory Implementation , because of some security concern. We came
    to know that it is possible via setting system property -D option and signing the Jar which uses this Preference API class. But it will create more problem
    for our client while using our application . So we need to use JDK1.4 Preference with out using above two methodology.
    Is there any possible solution which can help me to use the JDK1.4 Preference API in all the clients????.
    Please do help me as early as possible. This is very very important for us.
    Thanks in advance
    with regards,
    Pitchaimani

    Dear Sir,
    Thanks for your immediate reply, I had solved the problem by putting both the classes in a single signed jar. Now i am get into the new Problem. The problem is, even if i set the SystemProperty for Preference Factory, it doesn't take effect at all.
    Actually what happened was, while starting the
    Browser(Netscape or IE), browser will try to load all the Java classes (which includes InputMethodManager class also). This InputMethodManager class create an Object for Preference Node and use the same for getting the Preference values. In this case if i invoke My Application(Applet) from the browser, and set the System Property (For Preference Factory), it won't take effect at all. Suppose if i use Preference.userRoot() in my application, it will try to look the Java Preference Object and return the same which is not a desired one. So i would like to know, is there any mechanism to set/reset the Preference Factory (for my Application alone)???
    Please help me to get out of this problem. It is very very important for me.
    Your help is highly appreciated
    Thanks & Regards,
    Pitchaimani

  • JMF Diagnostics applet - how to resolve "JMF Classes not found"

    I am still having problems trying to get my USB camera to run in an applet.
    I'm using Windows XP with IE 6.
    I found the JMF Diagnostic Applet and when I run it, I get the following:
    Java 1.1 compliant browser.....Maybe
    JMF classes.....Not Found
    The text below says that CLASSPATH needs to include jmf.jar
    I have checked that and it does. I added all the jar files to the CLASSPATH as well and that did not help.
    I saw another post that said the JMFHOME environment variable needed to be set to the main JMF directory.
    I did that and still get the same error.
    Can anyone tell me what I need to set in order to make the JMF Diagnostic applet work???
    Thanks,

    I have exactly the same problem. Running XP pro and Java 5. Installed JMF2.1.1e and the diagnostic doesn't work. Don't know how to verify or set the CLASSPATH but assumed it was more plug and play.
    I'm a student and am writing my final year project which is supposed to be a multi-client concurrency based video clip app. All the sample codes I've seen make it look quite easy. I was wanting to prototype my concepts before I continue (glad there are some nifty buffer controls) I've unistalled, reinstalled, restarted an no joy and the only help that seems might work includes loads more files than what my distribution has (just have jmf.jar, customizer.jar, multiplayer,jar, mediaplayer.jar and sound.jar and that's it.
    I was a little worred about the need to have the API on my test client machines (aka housemates) now I'm really worried.

  • JMF-based applet can not detect audio devices on Vista (?)

    Hi,
    As many people reported, I encountered the same issue - CaptureDeviceManager.getDeviceList does not detect any audio device on IE/Vista.
    Here is my testing environment:
    HP XW4600, RealTek HD Audio onboard sound card,
    Vista SP1 (Business, Home Premium, and Vista64)
    JRE1.5.0_16, JMF2.1.1e
    A recording Applet runs in IE7 (which works fine on XP and its Java application version always works fine on Vista)
    I have tried a number of things without success:
    1)Use different audio formats as the input parameter for getDeviceList
    2)Try CaptureDeviceManager.getDevice(new String("DirectSoundCapture"))
    3)CaptureDeviceInfo info = new CaptureDeviceInfo(com.sun.media.protocol.dsound.DataSource.NAME,new MediaLocator("dsound://"),null);
    4) Vector devices = (Vector) CaptureDeviceManager.getDeviceList(null).clone();
    5)Uncheck UAC(Vista User Access Control)
    6)Set IE settings least restrictive
    7)Try signed or unsigned recording Applet
    8)Pack the recording Applet to a jar and deploy to JRE\lib\ext
    9)Run JMFInit and copy the files in JMF\Lib to System32 folder
    On a few occasions, audio devices can be detected. For examples,
    10)Upgrading an HP XW4200 (XP machine with AC�97 codecs driver) to Vista,
    11)1/5 chance on the machines with both Sun JRE and MS Java SDK installed.
    12)Trying Item # 9. it worked once on one machine, but after rebuilding the machine, the same trick does not play.
    I am wondering if there is a way to let JMF-based applets detect audio devices on Vista or this is an inherent problem with JMF, IE and Vista.
    I would appreciate it very much if you�d kindly offer any help and suggestions.
    -Belfield

    >
    As many people reported, I encountered the same issue - CaptureDeviceManager.getDeviceList does not detect any audio device on IE/Vista.>(..in an applet)
    >
    I would appreciate it very much if you'd kindly offer any help and suggestions. >I suspect the basic problem here, is the installer that defaults to preventing the applet access to record sound (I am guessing that would 'spill over' into web-cam permissions). A quick test of that is to try the same code as an application.
    If the application works, one possible fix is to launch the application using webstart. Webstart will work from a web page, and offers many other advantages over a standard applet.

  • Applet client with DataForms using dial-up

    Jdeveloper 3.2, IAS9i
    Hello,
    Somebody knows if the DataForms are efficient via dial-up?
    For example in the Online Orders sample,with an applet client (with DataForms, using dialup to connect to app. server). What happens when an user insert a new employee record. When an user navigate around the fields ocurrs a validation inside the Business Object Tier. What happens with the remote round trips?, It's faster?.
    Jdeveloper 3.2.2
    IAS9i
    Thanks a lot.
    null

    Any application designed to run over a dial -up connection must be extremely sensitive to the fact that dial-up connection is very slow due to it's bandwidth.
    Applets by default require downloading a lot of files to the browser. So you must download your app code, the jdbc drivers and any other required classses.
    Applets using BC4J components then must also download the BC4J code. BC4J uses a data cache, so data is also downloaded.
    Avoid using applets in this design.
    Use JavaServerPages(JSP's) (or servlets) which are a much "thinner" version of the "Thin client" group of tools(applets, servlets jsp's)
    WHY JSP's over servlets ??
    They are quicker to write than servlets

  • Jmf diagnostics applet

    problem in jmf diagnostics applet
    i installed jmf, also set the class path using windows environment variables utility
    still i found problem
    Message was edited by:
    citymodel

    no one can give hints why there is such problem

  • How to get started on java applet client/server game?

    Hi,
    I've googled, but didn't find any useful information about creating java applet client/server game. I've followed the example of Client/Server Tic-Tac-Toe Using a Multithreaded Server in Java How to Program from Deitel, but I when I tried on Applet, my cliet doesn't communicate with the server at all. Any help to get started with Applet would be great. Thanks!

    well, i decided to put in portion of my codes to see if anyone can help me out. the problem I have here is the function excute() never gets called. here is my coding, see if you can help. Notice, I'm running this on Applet thru html page. This shouldn't be much different than running JFrame in term of coding right?
    Server.java
        public void init()
            runGame = Executors.newFixedThreadPool(2);
            gameLock = new ReentrantLock();
            otherPlayerConnected = gameLock.newCondition();
            otherPlayerTurn = gameLock.newCondition();
            players = new Player[2];
            currentPlayer = Player1;
            try
                server = new ServerSocket(12345, 2);
            catch (IOException ie)
                stop();
            message = "Server awaiting connections";
        public void execute()
           JOptionPane.showMessageDialog(null, "I'm about to execute!", "Testing", JOptionPane.PLAIN_MESSAGE);
            for(int i = 0; i < players.length; i++)
                try
                    players[i] = new Player(server.accept(), i);
                    runGame.execute(players);
    catch (IOException ie)
    stop();
    gameLock.lock();
    try
    players[Player1].setSuspended(false);
    otherPlayerConnected.signal();
    finally
    gameLock.unlock();
    Client.java
        public void init()
            startClient();
        public void startClient()
            try
                connection = new Socket(InetAddress.getByName(TienLenHost), 12345);
                input = new Scanner(connection.getInputStream());
                output = new Formatter(connection.getOutputStream());
            catch (IOException ie)
                stop();
            ExecutorService worker = Executors.newFixedThreadPool(1);
            worker.execute(this);
        }So after worker.execute(this), it should go to Server.java and run the function execute() right? But in my case, it doesn't. If you know how to fix this, please let me know. Thanks!

  • How can I give My Own PreferencesFactory Impl in Applet client

    Dear Sir,
    Actually we have requirement like storing and retrieving the Preference values from the local machine to remote server. We had read the complete Java documents of PreferenceAPI. It has lots of features, but we found that the Preferences storing and retrieving process are embedded into the PreferenceAPI itself. We would like to plugin our own implementation for storing and retrieving the same. We can plugin our own implementation by setting the System Property called java.util.prefs.PreferencesFactory. In case if it is an application client , then we do not have any problem at all. But In applet client , we do not have a mechanism to set the System Property in Applet client , Security Manager throws Security Exception ,while setting this property.
    If it is not possible to set the System property,Please do let us know any other way like Instantiating our iplementation while calling PreferenceAPI.getSystemRoot() and PreferenceAPI.getUserRoot() methods.
    please help me to solve the problem as early as possible.
    Your help is very much appreciated.
    Thanks in advance
    with regards,
    Pitchaimani M

    Your help is highly appreciated!

  • Applet clients accessing EJB middle-tier

    Hello
    I am trying to have an Applet access the stateless session EJBs on the middle tier (OC4J 9.0.3)
    The applet works fine in the AppletViewer.
    However in the IE browser version 5.5, I get java.security.AccessControlException.
    Which I can understand because applet is not allowed to open a RMI-IIOP port on the remote server.
    What steps do I need to take to allow the applet to open such a connection. Signing jars?, java.poclicy file ?
    I know that this setup works fine on JBoss and also on WebSphere. (using certificates)
    Is this not suported by OC4J? Does the server need to support something or is it strictly a client side issue?
    Any comments will be highly appreciated.
    Thanks
    vijay

    We are having Applet-clients with OC4J and it works fine. We sign all our client-jars (including oc4jclient.jar) and our application has all permissions at the client. Modifying java.policy works as well, but signing Jar-Files is simpler and doesn't need any client-changes.
    For normal operations it seems ok to include oc4client.jar for the client application, but we are using JMS and therefore need a lot of classes of oc4j.jar - so I buildt my own deployment-jar out of oc4j.jar.
    If you use the cache_archive and cache_version attributes in the html-tag, all the jar-files are only downloaded at application startup if they are changed on the server (und version-numbers are increased). So startup-time is comparable to a local application.
    Gilbert

  • Re: Applet JMF in a client  without jmf installed

    As a possible hack/workaround, are you including jmf.jar in the applet codebase ? It contains all the codecs necessary to decode the video stream. You might need to look at applet security too.
    If this doesn't work, you need each client to install JMF.
    You could try adding this codebase line to your applet/object tag in the applet's HTML.
    codebase="http://myserver:80/the_jmf_install_program.exe"
    regards,
    Owen

    As a possible hack/workaround, are you including jmf.jar in the applet codebase ? It contains all the codecs necessary to decode the video stream. You might need to look at applet security too.
    If this doesn't work, you need each client to install JMF.
    You could try adding this codebase line to your applet/object tag in the applet's HTML.
    codebase="http://myserver:80/the_jmf_install_program.exe"
    regards,
    Owen

  • JMF Player Applet and NAT

    Hi,
    I have built an entire rtsp/rtp server to stream multimedia files and the webcam.
    I can more or less succesfully stream video content on a LAN, but even if I make my server public on the internet, there remain NAT issues regarding the client.
    What I wish to do, is to embedd an applet within the webserver so that the end-user doesn't require a third-party client to watch his content.
    I've built an applet following the SimplePlayerApplet example, which works on a LAN.
    Now what I would like to do, is to get informations from the RTSP session, particularly RTP source port, in order to send a single datagram, so that the firewall/router can bind the internal client port to its public port. This way the server can serve RTP/UDP packets that may able to cross the router. I read STUN server used this method to resolve UDP crossing of routers.
    The thing is that with a Player object, I can't get any information regarding RTP session. I'd rather avoid to use an RTPManager because this way, I would have to redo all the RTSP(client-side) thing.
    Can you please help ?
    Thanks in advance.

    If you need to play a real player file then see the Java Media Framework API, it's support many media file types, also you can play any media file from server side.
    go to :
    http://java.sun.com/products/java-media/jmf/index.html

  • Certificate Exception - applet client to java server with SSL

    Hi,
    I'm having some trouble getting SSL working and hope
    someone can shed some light. I've been plowing through
    these forums for a couple of days - seems lots of folks
    have had this problem but I can't find a clear solution.
    I've written a server in java. The client is an applet.
    This is an internet app so I have no control over
    configuring clients. I'm trying to prove SSL communication from the applet to my server. This is
    commercial software so the customer would put their own
    keys on the machine and resign the applet before deploying.
    I've created a keystore with keytool. Then I self-
    signed it. Then I signed my applet jarfile. I've even tried exporting the certificate and importing using the java plug-in control panel
    (obviously not something I can do in the real world but
    just wanted to see if that was it). I start up my server
    and navigate to a web page to start the applet. For
    development purposes, I'm doing this all on one machine. I'm running jdk 1.4.1_02. We're requiring the
    Sun plug-in as our client java VM.
    Once the client starts to connect, I get this error in
    the plug-in console:
    java.security.cert.CertificateException: Couldn't find trusted certificate
    On my server, I get:
    Wed May 14 16:27:46 EDT 2003 [EXCEPTION]: javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
    javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
         at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
         at com.sun.net.ssl.internal.ssl.AppInputStream.read(DashoA6275)
         at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:406)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:446)
         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
         at java.io.InputStreamReader.read(InputStreamReader.java:167)
         at java.io.BufferedReader.fill(BufferedReader.java:136)
         at java.io.BufferedReader.readLine(BufferedReader.java:299)
         at java.io.BufferedReader.readLine(BufferedReader.java:362)
         at com.pactolus.webBroker.psWebLegClientThread.run(psWebLegClientThread.java:130)
         at java.lang.Thread.run(Thread.java:536)
    The client code is pretty simple:
    SSLSocketFactory factory = (SSLSocketFactory)
        SSLSocketFactory.getDefault();
    tcpSocket = (SSLSocket) factory.createSocket(addr,
                                                 iPortNbr);
    tcpSocket.setUseClientMode(true);
    tcpSocket.startHandshake();followed by a thread kick-off which will listen on the
    socket for incoming messages.
    The server code is:
    SSLContext sslCtxt = SSLContext.getInstance("SSL");
    KeyManagerFactory kmf = KeyManagerFactory.getInstance
       ("SunX509");
    KeyStore ks = KeyStore.getInstance("JKS");
    char[] password = keyPassword.toCharArray();
    ks.load(new FileInputStream(keyFile), password);
    kmf.init(ks, password);
    sslCtxt.init(kmf.getKeyManagers(), null, null);
    SSLServerSocketFactory factory = 
        sslCtxt.getServerSocketFactory();
    secureTCPSocket = (SSLServerSocket)
        factory.createServerSocket(port);
    secureTCPSocket.setNeedClientAuth(false);followed by a thread kick-off which will listen for
    connections and spin-off other threads to manage each
    client socket.
    I'm pretty much at my wits end. As I said, seems lots of
    folks have had this problem but I haven't yet seen a
    firm answer.
    If anyone can shed some light on this so I can get my
    proof of conecept going, I would really appreciate it -and buy you a couple of beers!
    Thanks,
    Scott Johnson

    Problem resolved! It was the certificate. I can get it working in a test scenario by using the test certs file
    provided with the jdk on the client and server sides.
    So, does this mean that I MUST use a certificate from
    one of the known authorities as delivered with the JDK?
    My applet will be used by internet clients. I'm requiring
    the sun plug-in. Is it true there is no way to get
    a certificate I've created to be presented to the client
    so it can choose to add it to it's trusted authorities?
    I am required to use, say, a Verisign certificate?
    I can get my sample working but only if I place a
    jssecacerts (a copy of the samplecacerts) where both the client and server can get at it. In the real world, I can't do that on the client.
    Presumably the client will only have the cacerts that was delivered with the Sun plug-in. I'm restricted, then, to using a server key file signed with a certificate from
    one of the providers found in the cacerts file? Or, can
    I present to the client a certificate which it can
    choose to accept as trusted and place in it's cacerts file? Any info would be appreciated - I've already
    committed those duke bucks!
    Scott
    Hi,
    I'm having some trouble getting SSL working and hope
    someone can shed some light. I've been plowing
    through
    these forums for a couple of days - seems lots of
    folks
    have had this problem but I can't find a clear
    solution.
    I've written a server in java. The client is an
    applet.
    This is an internet app so I have no control over
    configuring clients. I'm trying to prove SSL
    communication from the applet to my server. This is
    commercial software so the customer would put their
    own
    keys on the machine and resign the applet before
    deploying.
    I've created a keystore with keytool. Then I self-
    signed it. Then I signed my applet jarfile. I've
    even tried exporting the certificate and importing
    using the java plug-in control panel
    (obviously not something I can do in the real world
    but
    just wanted to see if that was it). I start up my
    server
    and navigate to a web page to start the applet. For
    development purposes, I'm doing this all on one
    machine. I'm running jdk 1.4.1_02. We're requiring
    the
    Sun plug-in as our client java VM.
    Once the client starts to connect, I get this error
    in
    the plug-in console:
    java.security.cert.CertificateException: Couldn't find
    trusted certificate
    On my server, I get:
    Wed May 14 16:27:46 EDT 2003 [EXCEPTION]:
    javax.net.ssl.SSLHandshakeException: Received fatal
    alert: certificate_unknown
    javax.net.ssl.SSLHandshakeException: Received fatal
    alert: certificate_unknown
    at
    com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(Dasho
    6275)
    at
    com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(Dasho
    6275)
    at
    com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA627
    at
    com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA627
    at
    com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA627
    at
    com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA627
    at
    com.sun.net.ssl.internal.ssl.AppInputStream.read(Dasho
    6275)
    at
    sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDec
    der.java:406)
    at
    sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDeco
    er.java:446)
    at
    sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180)
    at
    java.io.InputStreamReader.read(InputStreamReader.java:
    67)
    at
    java.io.BufferedReader.fill(BufferedReader.java:136)
    at
    java.io.BufferedReader.readLine(BufferedReader.java:29
    at
    java.io.BufferedReader.readLine(BufferedReader.java:36
    at
    com.pactolus.webBroker.psWebLegClientThread.run(psWebL
    gClientThread.java:130)
         at java.lang.Thread.run(Thread.java:536)
    The client code is pretty simple:
    SSLSocketFactory factory = (SSLSocketFactory)
    SSLSocketFactory.getDefault();
    tcpSocket = (SSLSocket) factory.createSocket(addr,
    iPortNbr);
    tcpSocket.setUseClientMode(true);
    tcpSocket.startHandshake();followed by a thread kick-off which will listen on
    the
    socket for incoming messages.
    The server code is:
    SSLContext sslCtxt = SSLContext.getInstance("SSL");
    KeyManagerFactory kmf = KeyManagerFactory.getInstance
    ("SunX509");
    KeyStore ks = KeyStore.getInstance("JKS");
    char[] password = keyPassword.toCharArray();
    ks.load(new FileInputStream(keyFile), password);
    kmf.init(ks, password);
    sslCtxt.init(kmf.getKeyManagers(), null, null);
    SSLServerSocketFactory factory = 
    sslCtxt.getServerSocketFactory();
    secureTCPSocket = (SSLServerSocket)
    factory.createServerSocket(port);
    secureTCPSocket.setNeedClientAuth(false);followed by a thread kick-off which will listen for
    connections and spin-off other threads to manage each
    client socket.
    I'm pretty much at my wits end. As I said, seems lots
    of
    folks have had this problem but I haven't yet seen a
    firm answer.
    If anyone can shed some light on this so I can get my
    proof of conecept going, I would really appreciate it
    -and buy you a couple of beers!
    Thanks,
    Scott Johnson

  • Providing Access based on Client IP Address

    Current Scenario  -
    SAP Portal is accessible directly and via Citrix (VPN).
    Based on the URL alias - we have implemented Desktop Filtering.
    eg if the URL ends with / internet - You get restricted roles
    eg if the URL ends with / intranet - You get wider roles
    In Production, we also have Netscaler Reverse Proxy and HTTPs settings in place for External (outside firewall) access.
    New Requirement (Example) -
    Based on the IP address of the client, determine which subnet it falls under and based on that -
    If used within Citrix - Provide certain roles
    If not used within Citrix - Restricted access / Redirect to a different URL on the redirect server.
    Questions -
    With the current desktop filtering in place based on URL determination and no specific restriction for inside/outside Citrix access -
    1 - Please suggest which would be a good way to crack this? Inside Portal (IP address determination and SAP Logon modification) / Outside Portal (eg Citrix, Network OS Exit, Reverse Proxy etc) based on Best Practise ?
    2 - Not sure if this is relevant : Find IP address of Client with webdybpro (This API works only in Web Dynpro and not PDK) ? I believe tweaking SAP Logon logic can get very painful  and overtly complicated for such scenarios.
    Thanks for your inputs ~ Dhanz

    Vivek,
    On the coding front -
    1 - Will reading the IP address  in the header field x-forwarded-for retrieve right results if reverse proxy is in place ? Wouldnt it retrieve the proxy / load balancer IP instead of Client IP ?
    2 - Also we have HTTPS settings for extranet access - So encrypted data (eg Client IP ) is transferred that the Web Dispatcher cannot manipulate ?
    Please suggest.
    Remember to be polite
    Edited by: Anja Engelhardt on Jan 27, 2012 11:27 AM

Maybe you are looking for

  • "Remote" App Has Become Sluggish, Slow to Respond

    I've searched this and other forums and have yet to see the issue I'm having addressed. After successfully installing and using the iPhone "Remote" app to control my Apple TV, its performance has become erratic. While selecting and/or swiping actions

  • G3 and G4 12.1' screens compatible?

    Can you put a display from a g3 ibook on a g4 ibook if they are both the 12.1' size?

  • Bill of Lading & Letter of Credit form names

    Hi Everyone,            Can you give the SAP standard form names for Bill of Lading and Letter of Credit? Regards, Sugopa

  • Adding RSS feeds to pages other than blogs or podcasts

    Has anyone worked out how to do it? I finally worked out what RSS actually is but then found iWeb itself only lets you add RSS buttons to blogs and podcasts. Has anyone discovered a work-around? Thanks, Simon MacBook   Mac OS X (10.4.9)  

  • HTML Help 1.4 - Where?

    During the RoboHelp install, a message box popped up informing me that I would need to get HTML Help 1.4 from the MSDN website. So after the install was completed, I went to the MSDN website and looked for HTML Help 1.4. And I found a file that seeme