Basic RMI program works in windows but not Linux

Hello,
I'm trying to learn RMI for a program at work.
I have the book "Core Java 2 - Volume 2 - Advanced Features". Chapter 5 of this book is about RMI.
The most basic example program they use works fine in Windows. However, when I try to run this same program under linux it doesn't work.
For now, I'm not even trying to run a client (in linux)...just the server.
Here is the server code.
public class ProductServer
public static void main(String args[])
try
System.out.println
("Constructing server implementations...");
ProductImpl p1
= new ProductImpl("Blackwell Toaster");
ProductImpl p2
= new ProductImpl("ZapXpress Microwave Oven");
System.out.println
("Binding server implementations to registry...");
Naming.rebind("rmi://172.20.101.1/toaster", p1);
Naming.rebind("rmi://172.20.101.1/microwave", p2);
System.out.println
("Waiting for invocations from clients...");
catch(Exception e)
e.printStackTrace();
What is very interesting is that this call works
Naming.rebind("rmi://172.20.101.1/toaster", p1);
But the very next line
Naming.rebind("rmi://172.20.101.1/microwave", p2);
Throws this error ::
java.rmi.UnmarshalException: Error unmarshaling return header: java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:221)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:366)
at sun.rmi.registry.RegistryImpl_Stub.rebind(RegistryImpl_Stub.java:133)
at java.rmi.Naming.rebind(Naming.java:172)
at ProductServer.main(ProductServer.java:35)
I would very much appreciate the help. Thank You.

We solved the problem
Apparently, on the linux machine we had both gcc and the jdk installed
the regualar compile command hit the jdk
the rmic command used the gcc version of rmic
the rmiregistry used the gcc version of rmiregistry
the regular run command hit the jdk
using the rmic and rmiregistry in the jdk made everything work fine
I knew it had to be a stupid answer.

Similar Messages

  • CS6 Plugin works on windows but not mac

    Hi,
    We have been developing a plugin for InDesign since CS3 and have recently ported it to CS6 (it was ported to all previous versions too, as they came out).
    I followed the porting guide etc. and on windows it compiles and runs just ok - the plugin works correctly.
    But when i compiled the same files on our mac machine and put the .indesignPlugin file in th plugins directory i can't see our plugin's context menu.
    I can see that it is in fact loaded on startup (when i remove it ID loads 325 extensions, when i put it back - 326), but still it dosen't seem to work...
    I initially thought that the versioning was off but our PluginVersion resource relies solemnly on SDKDef.h , i also tried putiing the file in CS5's plugin directory and got an error message that CS6 is required - so the version info is fine i guess.
    We are using xCode 3.2.5 (because we have to support Mac OS 10.5 and 10.4) to build on mac and i've never had problems before - it worked on CS4, CS5 and CS5.5.
    The changes i made when porting were minor and only in the code - so what has changed? and how come it works on windows but not on mac?
    Any input is greatly appreciated, i've already spent days trying to understand this.
    Thanks,
    Dan.

    Hi and thank you for replying.
    The resources do get compiled correctly (i assume this because we do get a .indesign file at the end - which means the ODFRC ran ok). they are linked correctly in the mac project (i saw a file that determines the version - it's linked the same way against my win and mac projects and the win version works fine so i guess that's ok too).
    the context menu is just another menu on the "menu bar" (don't know how to call it?) - i.e where the "file" and "edit" etc. menus are.
    I can't seem to understand how come this works fine under windows but not under mac - they are essentially the same projects linked against the same resources (the difference being iCode vs VC10 projects).
    can this be related to the fact we're using xCode 3.2.5?
    Thank you.

  • ShowDocument works on Windows but not Mac

         public void actionPerformed(ActionEvent ae) {
              String command = ae.getActionCommand();
              if(command.equals("save"))
                   String insertHTML = getDocumentText();
                   showDoc("ProcessPage.asp?BodyCopy='Test'","_blank");
         //Shows a document (htm,asp,..) in a frame
         private void showDoc(String urlstr, String frameName) {
              int pos = getDocumentBase().toString().lastIndexOf("/");          
              String DocBase = getDocumentBase().toString().substring(0, pos+1);
              System.out.println("openURL: "+DocBase + urlstr);
              try
              {     URL url = new URL(DocBase + urlstr);                         
                   AppletContext j = getAppletContext();
                   j.showDocument(url, frameName); }
              catch (MalformedURLException e) // new URL() failed
              {     System.out.println("new URL() failed for: "+ DocBase + urlstr); }
              catch (IOException e) // openConnection() failed
              {     System.out.println("openConnection() failed for: "+ DocBase + urlstr); }
    I am trying to open up a new web page from an applet using showDocument. This works fine on Windows but not on Mac. The applet I am working with extends JApplet. Does anybody have any suggestions?

    This is not working for me either. After issuing the showDocument(url, target) command I never see the request come into my webserver log. Although, it only seems to not work when the Mac is setup as Japanese. I know this doesn't make any sense.
    Does not work on IE or Safari with 1.3.1
    Does work with Safari with 1.4.1
    Please help

  • Image.source in ItemRenderer works in Windows but not Mac

    I have a Flex (AIR) application that is giving me problems on
    the Mac. In one of the
    Datagrids, I am using an ItemRenderer with an image control.
    Some code in the
    "set data(value:Object)" function assigns a file path as the
    source of the image
    control as follows.
    imgThumb.source =
    File.documentsDirectory.resolvePath("pdqtemp").nativePath +
    "/" + data.strJPGFileName;
    This works correctly in Windows , but not on the Mac.
    In this case, the path resolves to the following on the Mac.
    /Users/brian/Documents/pdqtemp/artist_01t.jpg
    I have verified that the file is in the right place and when
    using the path in
    the command line console, it correctly addresses that
    directory and file. I
    don't normally develop apps for the Mac so I am sure there is
    something I am
    missing.
    Any ideas?
    Thanks for your help.

    Hi Jed,
    Thanks for responding
    That is the exact path assigned to the Source of the Image
    control. However, it isn't exactly a trace of the Image.Source
    property.
    The code in question is attached
    The alert shows the path I originally posted and shows that
    the fileImgThumb.exists returns False.
    As I mentioned, this works perfectly in Windows. There is
    some code elsewhere in the app that creates the thumbnail. That
    does work on the Mac as the thumbnail image is created and saved
    where expected.
    I am not sure what I might be doing wrong.
    Thanks for your help,
    Sid

  • New tabs do not open with middle mouse in Windows, but not Linux

    I've seen this bug reported a few times already, but none of them seem to have resolved the issue (at least for me).
    I have a Lenovo ThinkPad T510 currently running two operating systems on separate partitions (Windows 7 and Fedora 20). Firefox is my default browser in both operating systems and both are up to date. Both browsers are using the same plugins and extensions as well (which is essentially nothing because I just performed a clean install of both OS's).
    Now, I should be clear that I'm using the laptop's built-in touch-pad/track-point for mouse navigation and not an external mouse.
    Interestingly, when I click the middle mouse trackpad button on a link to open a new tab, it works under Fedora, but not under Windows. I've checked the about:config already and ensured that they too are identical in regards to middle mouse button settings.

    Does it work with an actual mouse?
    On Linux those prefs are true by default.
    *[http://kb.mozillazine.org/middlemouse.paste middlemouse.paste] is about pasting text from the clipboard in a text area
    *[http://kb.mozillazine.org/middlemouse.contentloadURl middlemouse.contentloadURl] is about opening an URL from the content area in a new tab
    *[http://kb.mozillazine.org/middlemouse.scrollbarPosition middlemouse.scrollbarPosition] is about middle-clicking on the scroll bar to jump to a specific position.

  • URL.openStream() works in Windows but not in Linux

    I am having a problem with this line:
    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
    in the code sample further below.
    A simple program using this line works when compiled in my Windows XP:
    java version "1.6.0_03"
    Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
    Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)
    but not when compiled on my RedHat FC 4 server:
    java version "1.4.2"
    gij (GNU libgcj) version 4.0.2 20051125 (Red Hat 4.0.2-8)
    The program (making using of a previous froum example and pared down to minimize tangent topics):
    The code works for all 3 URLs in Windows. In Linux it only works for the 1st one (bbc.co site)
    Error is listed below the code:
    import java.net.*;
    import java.io.*;
    public class BBC {
    public static void main(String[] args) throws Exception
    //    URL url = new URL("http://news.bbc.co.uk/sport1/hi/football/eng_prem/6205747.stm");
    //    URL url = new URL("http://www.weatherunderground.com/global/stations/71265.html");
        URL url = new URL("http://www.weatherunderground.com");
        BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
        int nLineCnt = 0;
        String inputLine;
        while ((inputLine = in.readLine()) != null)
            nLineCnt++;
        System.out.println("nLineCnt=" + nLineCnt);
    //--------------------------------------------------------------------------------------------------------------------------------------------Exception in thread "main" java.lang.StringIndexOutOfBoundsException
    at java.lang.String.substring(int, int) (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.net.protocol.http.Request.readResponse(gnu.java.net.LineInputStream) (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.net.protocol.http.Request.dispatch() (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.net.protocol.http.HTTPURLConnection.connect() (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.net.protocol.http.HTTPURLConnection.getInputStream() (/usr/lib/libgcj.so.6.0.0)
    at java.net.URL.openStream() (/usr/lib/libgcj.so.6.0.0)
    at BBC.main(java.lang.String[]) (Unknown Source)
    at gnu.java.lang.MainThread.call_main() (/usr/lib/libgcj.so.6.0.0)
    at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
    Can anyone please suggest what I can do to be able to process the weatherunderground URL?
    Claude

    To me it would suggest a bug in the VM that you are using.
    Solutions
    1. Use a different VM
    2. Write your own code to process the http code. Depending on licensing for the VM in use and the VM itself. you might be
    able to find the bug in that code, fix it yourself, and then use your fix (start up command line options for VM.) Otherwise
    you have to duplicate the functionality. You might look to jakarta commons, there might be code there that does that.

  • OCI - Sample program works on Windows but gives error in Solaris ??

    Hi,
    I am new to OCI. I was trying the following sample program:
    #include<iostream>
    #include<conio.h>
    #include<firstheader.h>
    //#include<stdafx.h>
    #include<string.h>
    using namespace std;
    class OCIClass
    public:
         OCIClass()
    int p_bvi;
    char p_sli[20];
    int rc;
    char errbuf[100];
    int errcode;
    const char *s;
    printf("Hello\n");
    string sql;
    string sql2="select substr(ename,1,3) from emp where job='ANALYST'";
    cout<<sql2;
    //char sql[512];
    int flag=0;
    sql += "SELECT * from emp where job='";
    if (flag==0)
    sql += "MANAGER";
    else
    sql += "ANALYST";
    sql += "'";
    cout<<sql + "\n";
    s=sql.c_str();
    char* cstr = new char[sql.size()+1];
    strcpy (cstr, sql.c_str());
    char* cstr2 = new char[sql2.size()+1];
    strcpy (cstr2, sql2.c_str());
    sql=" ";
    /* Initialize evironment */
    rc=OCIEnvCreate((OCIEnv **)&p_env,(ub4)OCI_DEFAULT ,(void *)0, (void * (*)(void *, size_t))0,
    (void * (*)(void *, void *, size_t))0,(void (*)(void *, void *))0,(size_t)0, (void **)0);
    /* Initialize handles */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
    (size_t) 0, (dvoid **) 0);
    printf("Error handle allocated\n");
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
    (size_t) 0, (dvoid **) 0);
    printf("service handle allocated\n");
    printf("Value of RC before Logon\n %d", rc);
    /* Connect to database server */
    rc = OCILogon(p_env, p_err, &p_svc, (OraText *)"scott", 5,(OraText *) "welcome", 7,(OraText *) "", 0);
    printf("Value of RC after Logon\n %d", rc);
    if (rc != 0) {
    OCIErrorGet((dvoid *)p_err, (ub4) 1, (text *) NULL, &errcode, (OraText *)errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
    printf("Error - %s\n",errbuf);
         printf("error");
    //exit(8);
         getch();
    printf("Connect successful\n");
    /* Allocate and prepare SQL statement */
    rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_sql,
    OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0);
    rc = OCIStmtPrepare(p_sql, p_err, (OraText*) cstr,
    (ub4) 37, (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT);
    /* Bind the values for the bind variables
    p_bvi = 10; /* Use DEPTNO=10
    rc = OCIBindByName(p_sql, &p_bnd, p_err, (text *) ":x",
    -1, (dvoid *) &p_bvi, sizeof(int), SQLT_INT, (dvoid *) 0,
    (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT);*/
    /* Define the select list items */
    rc = OCIDefineByPos(p_sql, &p_dfn, p_err, 1, (dvoid *) &p_sli,
    (sword) 20, SQLT_STR, (dvoid *) 0, (ub2 *)0,
    (ub2 *)0, OCI_DEFAULT);
    /* Execute the SQL statment */
    rc = OCIStmtExecute(p_svc, p_sql, p_err, (ub4) 1, (ub4) 0,
    (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT);
    while (rc != OCI_NO_DATA) {             /* Fetch the remaining data */
    printf("%s\n",p_sli);
    rc = OCIStmtFetch(p_sql, p_err, 1, 0, 0);
    printf("After fetch\n");
    rc = OCILogoff(p_svc, p_err); /* Disconnect */
    rc = OCIHandleFree((dvoid *) p_sql, OCI_HTYPE_STMT); /* Free handles */
    rc = OCIHandleFree((dvoid *) p_svc, OCI_HTYPE_SVCCTX);
    rc = OCIHandleFree((dvoid *) p_err, OCI_HTYPE_ERROR);
    void main()
    OCIClass c1;
    getch();
    The above program works on my Windows desktop. If I try this in Solaris, OCILogon fails and gives an error. If I check the value of rc, I find that it is -2. I can connect to the database using SQLPlus, but not through the program. Not sure how to debug this...
    Any pointers ?
    Thanks in advance,
    mrk

    Did you make the required port entry in the /etc/services file? You will need to add the gateway service port there. Then try to run your program.
    T00th

  • RUN_REPORT_OBJECT is working in Windows but not in Solaris

    hi
    I have written the following code. It's working in Windows(when I give windows path). But it's not working in Solaris
    It's not either giving me any error message. Could you please help me?
    declare
    repid REPORT_OBJECT;
         v_rep VARCHAR2(100);
         List_id ParamList;
    BEGIN
         List_id := GET_PARAMETER_LIST('input_params');
         IF NOT ID_NULL(List_id) THEN
         DESTROY_PARAMETER_LIST(List_id);
         END IF;
         List_id := Create_Parameter_List('input_params');
         Add_Parameter(List_id, 'p_1',TEXT_PARAMETER,'100008456');
         Add_Parameter(List_id, 'p_2',TEXT_PARAMETER,'P22');
         Add_Parameter(List_id, 'p_3',TEXT_PARAMETER,'600015');
         repid := FIND_REPORT_OBJECT(RE1');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,ASYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,'/home/oracle/OraHome2/rep/rep3.rdf');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,FILE);
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'/home/oracle/OraHome2/rep/aa.pdf');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'you_report_server_name');
         v_rep := RUN_REPORT_OBJECT(repid, List_id);
         Destroy_Parameter_List(List_id);
         message('v_rep '||v_rep);
         message(1);
    exception
         when others then
         message(sqlerrm);
         message(1);
    end;

    hi
    it is showing me following. I could not understand it. Is there any error message here
    Reports Server Queue Status
    Security Mode Non-secure
    Queue on server rep_SIT-02_10gAS, on Tue Dec 08 13:13:21 IST 2009 To kill a current (enqueued or scheduled) job, click on the status icon for the specific job. Then click on Cancel Job button in next page.To get a cached output of a successfully finished past job, click on the Job Name hyperlink of that job (if available).
    View
    View Current JobsPast JobsScheduled Jobs
    Result
    Previous Next
    Job ID Job Type Job Name Job Status Job Owner Output Type Output Name Server Name Queued At Started At Finished At
    None
    Help
    Copyright (c) 2002, 2005, Oracle. All rights reserved.
    -------------------------------------------------------------------------------------------------------

  • IPod works with Windows but not iMac

    I have an 80GB iPod Classic that works perfect on my computer running Windows Vista and iTunes 7. I have only ever used it with iTunes.
    My iPod's format is FAT32 (Windows). And it's running software Version 1.1.2 and disk use is enabled.
    When i try and plug it into an iMac (iMac G5) running OS X 10.3.9 it doesn't work. It doesn't come up as an external drive so I can't access it as an external disk and it fails to work in iTunes.
    I have upgraded the Mac to the latest version of iTunes but this still doesn't solve the problem. I tunes gives me the following error "iTunes has detected an iPod that appears to be corrupted...". This is not the case, my iPod is not corrupted.
    How can i get my iPod to work on the Mac?

    I had the same problem. Your ipod is formated i believe for windows so it wont come up on your mac. to format it you need to plug it into the mac go onto itunes and if you click on the summary page of ipod the only options you will be able to edit on the ipod from the mac are restore or (i dont know exactly) but there should be a button explaining that you need to restore your ipod and format it for mac.
    to do this you need to click the button on the summary page on itunes (if you click on your 80G ipod on the left side) but formating for mac deletes everything off the ipod. it wont be able to transfer music etc if you format for mac on your windows but it will now work on the mac.
    i hope u understood because i didnt really make it very clear. but if you dont understand just ask and ill be happy to explain it for you.
    Alex
    Message was edited by: Alexander Richardson

  • New shuffle works with Windows but not with Mac

    Just got a new 2nd gen shuffle. Initially it was formatted as Fat32 per Disk Utility on Mac. I reformatted to Mac OS (journaled). iTunes was recognizing the new shuffle on the mac and I created a playlist that showed it took up disk space in the "summary" tab. However nothing played on the shuffle when I disconnected it. I was trying to update the software but that function is greyed out. I tried to click "enable disc use" and when I applied it, it says it can't find the ipod. It wont let me update anything. The only thing I can do is create a playlist that the summary says is on the ipod but it doesnt play.
    I then connected it to my Windows XP machine and it asked me to reformat the drive, which I did, then everything worked flawlessly. I would really prefer to download things to the shuffle from my Mac than Windows XP but it just won't let me. I tried using "iPod Updater" and the most recent one from the list was 03/2006 and that didn't help anyhting. "iPod Reset Utility" would not recognize the ipod to reset it even after I sucessfully set it to Mac OS journaled in Disk Utility.
    I am very frustrated. This also happened to my Nano I purchased a few months ago and I have to organize it on the PC as well.
    I am running iTunes 7.2

    I have exactly the same problem with my two
    computers, both of which are Macs. The shuffle is
    recognised on one, but not the other.
    Here's a screenshot of iTunes ->
    http://www.simongbrown.com/blog/images/2007/shuffle-no
    t-recognised.png
    BTW, I also have an older white iPod in use on the
    Mac that doesn't work.
    I've tried a few things (including running iTunes
    under a different user account, reinstalling iTunes)
    but nothing seems to help. The only thing left to do
    is reinstall the OS, but that sounds a little extreme!
    That's way too extreme... Use the shuffle Reset Utility.
    http://www.apple.com/support/downloads/ipodresetutility10formac.html

  • Runtime.exec work in windows but not in solaris??

    hi all,
    can someone tell me why the following code work in windows platform but doesnt work in solaris?The program tries to ping 127.0.0.1 and the output is correct in windows, but when i try it in solaris, it produces the following exception :
    Internal error: Unexpected Java exception thrown ( unknown exception, no description ) , stack:java.lang.NoClassDefFoundError: StreamGobbler
    at java.lang.Class.getDeclaredConstructors()(Native Method) ....
    The code is as follow:
    import java.util.*;
    import javax.servlet.http.*;
    import javax.servlet.*;
    import java.io.*;
    class StreamGobbler extends Thread
         InputStream is=null;
         String type=null;
         PrintWriter out=null;
         StreamGobbler(InputStream is,String type,PrintWriter out)
         this.is=is;
         this.type=type;
         this.out=out;
         public void run()
              try
              InputStreamReader isr=new InputStreamReader(is);
              BufferedReader br=new BufferedReader(isr);
              System.out.println("finishing inputstreamReader and BufferedReader");
              String line=null;
              while (     (line=br.readLine())!=null )
                   {     out.println(type+"> "+line);
                        out.println("<br>");          
              catch (IOException ioe)
              {     ioe.printStackTrace();
    public class ping extends HttpServlet
         public void init(ServletConfig config) throws ServletException
         {     super.init();
         public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException
              res.setContentType("text/html");
              PrintWriter out=res.getWriter();
         try     {
              Runtime rt=Runtime.getRuntime();
              System.out.println("pinging 127.0.0.1");
              String[] cmd={"ping","127.0.0.1"};
              Process proc=rt.exec(cmd);
              System.out.println("finishing process proc=rt.exec(cmd)");
              StreamGobbler errorGobbler = new StreamGobbler(proc.getErrorStream(),"ERROR",out);
              StreamGobbler outputGobbler= new StreamGobbler(proc.getInputStream(),"OUTPUT",out);
              errorGobbler.start();
              outputGobbler.start();
              int exitVal=proc.waitFor();
              out.println("Process exitValue: "+exitVal);
              out.close();
         catch (Throwable t)
                   t.printStackTrace();

    Did you copy all the class files to your solaris machine ? SOunds like you didn't copy all your files correctly.

  • AIRPORT WORKS ON WINDOWS BUT NOT ON MAC OSX

    I own a Mac Mini Intel and I have installed Windows XP with bootcamp. In Windows XP I can connect to my wireless router (and Internet)without problem, but not in Mac OSX. I had this problem with the 10.4.x version, and although I have upgraded to Leopard, the problem continues the same. I can access the router in Windows and change any settings (I say that for if someone knows the solution and it includes changes in the router). Has someone had this problem before? Has someone any solution to this problem? Thank you.

    Yes i Seem to be experiencing a similar problem as you, in which connecting to a router on OS X is easy but as soon as i try it on windows xp it cannot establish a connection but my router is already connectingto other windows pcs. Maybe this is because windows cannot recognizethe built in airport, or perhaps it needs to be configured in a way to work with both Xp and os X

  • Code working on Windows but not in Unix

    Hello,
    I try to test a https connection. My method is to accept all kind of certificat.
    Under Windows this code works well and return true when Itest the https connection but under Unix it returns false.
    Why if I accept all certificat , that does not work?
    Thank for any light.
          * Test the web connection
          * @param keystorePath
          * @return the result TRUE|FALSE
         public boolean testWebConnection(String keystorePath) {
              boolean result = false;
              try {
                   String urlname = "https://" + serverConfig.getLocalHostName() + ":8443/";
                   URL url = new URL(urlname);
                   SSLContext sc = SSLContext.getInstance("SSL");
                   System.setProperty("javax.net.ssl.trustStore", keystorePath);
                   sc.init(null, null, new java.security.SecureRandom());
                   // sc.init(null, trustAllCerts, new java.security.SecureRandom());
                   HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
                   HttpsURLConnection con = (HttpsURLConnection) new URL(urlname).openConnection();
                   con.setHostnameVerifier(DO_NOT_VERIFY);
                   if (!con.getHeaderFields().isEmpty()) {
                        con.disconnect();
                        description = LanguageText.getHTTPSConnectionSuccessMessageLabel();
                        return true;
                   } else {
                        description = LanguageText.getHTTPSConnectionFailMessageLabel();
                        System.setProperty("java.protocol.handler.pkgs", "javax.net.ssl");
                                            url = new URL("http://" + serverConfig.getLocalHostName() + ":8080");
                        URLConnection conn = url.openConnection();
                        if (!conn.getHeaderFields().isEmpty()) {
                             description = description + "\n" + LanguageText.getHTTPConnectionSuccessMessageLabel();
                             result = true;
                        } else{
                             description = description + "\n" + LanguageText.getHTTPConnectionFailMessageLabel();
              } catch (MalformedURLException mue) {
                   Logger.logException("The url is not valid", mue);
              } catch (java.net.ConnectException ce) {
                   description = description + LanguageText.getHTTPNotConnectMessageLabel();
                   Logger.logException("Cannot connect", ce);
              } catch (IOException ie) {
                   Logger.logException("The url is not valid", ie);
              } catch (NoSuchAlgorithmException nsae) {
                   Logger.logException("Problem with the algorithm", nsae);
              } catch (KeyManagementException kme) {
                   Logger.logException("Problem with the key management", kme);
              return result;
          * Method to not verify the hostname
         private static final HostnameVerifier DO_NOT_VERIFY = new HostnameVerifier() {
              public boolean verify(String hostname, SSLSession session) {
                   return true;
         };

    1) Are you absolutely sure that the keystorePath variable contains the correct path to
    your truststore on the unix machine?
    2) Does the truststore contain the certificate of the server you are trying to connect to?
    3) Im guessing that your commented-out line using the trustAllCerts refers to a blank
    or promiscuous TrustManager implementation that does not check your truststore. Does the server
    work on the unix machine using the trustAllCerts? If it does, then that means there is something
    wrong with your truststore (possibly one of the two above mentioned items).

  • Page works on windows but not on iPad

    Hi. This page works on Safari for Windows 4.0.3 but has issues on Safari for iPad: http://bit.ly/d3ouub
    Here's what's going on:
    - If you start a video in any of the AnythingSlider panels (Panel 1 and Panel 5 contain video), the video will overflow the AnythingSlider and appear either on the far left or the far right of the page.
    - Also, if you're on Panel #6, you'll see the poster for Panel #1's video tag.
    I've tested this on Windows Safari, giving it the user agent string: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
    But Windows with that user agent doesn't have any issues. What am I doing wrong that the iPad Safari can't display the content rotator with the videos correctly? Thanks.

    Only just realised it's a page for UNC-TV content. I used to live in Chapel Hill and Carrboro.
    I think I can replicate the effect you're seeing on my system (XP SP3, Safari 5.0). So it's not something idiosyncratic to your particular iPad and/or Windows system. But I'm not sure if the effect is something to do with the code on the page itself, the way JWPlayer interacts with the latest versions of Safari, or if it's a problem in Safari itself. (It's not a WebKit issue, seeing that Chrome is handling the page okay.)
    On the code-for-the-page front, the W3C markup validation service isn't liking the particular example page much:
    [105 Errors, 21 warning(s)|http://validator.w3.org/check?uri=http%3A%2F%2Fwww.unctv.org%2FtWxkB bq10M6wKRRL%2Ft%2Fhome19_i.htm&charset=%28detect+automatically%29&doctype=Inline&s s=1&group=0&user-agent=W3CValidator%2F1.781]
    ... but it's saying up front:
    *+Notes and Potential Issues+*
    +The following notes and warnings highlight missing or conflicting information which caused the validator to perform some guesswork prior to validation, or other things affecting the output below. If the guess or fallback is incorrect, it could make validation results entirely incoherent. It is highly recommended to check these potential issues, and, if necessary, fix them and re-validate the document.+
    ... so it's an open question as to how much guidance that can provide. (On the other hand, I'm not a web developer or coder myself. So my observations in that regard have to be taken with a large grain of salt.)
    Have you checked in at the JWPlayer Support about the issue, too?
    http://www.longtailvideo.com/support/jw-player

  • Linksys works on windows but not mac

    I am running boot camp on my early 2009 MBP. I have not been able to connect to my wireless for about 9 months using os 10.6.4. If I switch to windows 7 on the same computer I can connect to it with no problem. Why is this? I have tried everything to get os10.6.4 to work and nothing has worked. I have scoured these forums for solutions and nothing works. Any clues would be great? the router is a linksys WRT110. It finds the sig and shows it connected Green indication and all but its not really connected. Evil trick I think.

    "...I have not been able to connect to my wireless for about 9 months using os 10.6.4..."
    In as much as 10.6.4 has not been out for 9 months let's just start with the easy stuff. Have you the latest firmware for the router? How are you protected security wise? WEP, WPA,etc... Can you connect via an ethernet cable? Can you connect without any security protection? What happens when you try to connect to the web? More pertinent info will always help.

Maybe you are looking for