Getting error when connecting to url via https

I am connecting to a url via https. Everything seems to work when I open the connnect as follows.
conn = (HttpsURLConnection)theURL.openConnection();
//Set the proper connections properties
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
conn.setDoOutput(true);
conn.setDoInput(true);
But when I try to send data with the following code:
StringBuffer sendThis = new StringBuffer();
sendThis.append( URLEncoder.encode("uid=", "UTF-8") );
sendThis.append( URLEncoder.encode("This is the UID", "UTF-8") );
/* PrintWriter pout = new PrintWriter( new OutputStreamWriter( conn.getOutputStream(), "8859_1"), true);
pout.print (sendThis.toString());
pout.flush();
I get an error that says "could not find trusted certificate"
Could not find trusted certificate
javax.net.ssl.SSLHandshakeException: Could not find trusted certificate
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.ClientHandshaker.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(DashoA62
75)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
at java.io.OutputStream.write(OutputStream.java:58)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
(DashoA6275)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:562)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Dash
oA6275)
What am I missing ?
thanks in advance.
kris.

You have to make sure that the cert for the CA which signed the server's
certificate is in your keystore (cacerts) file.
Check out 'keytool' and the JSSE readme.
Cheers,
Billy.

Similar Messages

  • I getting error when connecting my new iPod in my car. Getting error that usb is not recognized.

    I getting error when connecting my new iPod in my car. Getting error that usb is not recognized.

    Not all car systems are compatible with the iPod touch.  Does the documentation/website for the car system say it is compatible with an iPod with iOS 5?

  • Getting "server unavailable error" when connecting to HFM via a Mobi dial

    Since this morning I have been getting this error when I try to login to Hyperion: "The RPC server is unavailable"
    Strangely, I can access the network drive and even pull Hyperion information through the excel add-in but cannot login through the 32bit client.
    I am using Mobidial to access the system. Do you have any idea what the problem could be?

    I run into similar problem. Pls let me know if anybody know the solution. Thank You !

  • Error When connecting to FLVs via Vitalstream's Media Server

    Hello,
    I get an error everytime I try to connect to an FLV using
    Vitalstream's Media Server. I have turned on and off the
    Autobandwidthdetection property in the VideoPlayer component (to
    bypass main.asc)(If that even matters (no support in these
    errors!!!!!) I though it might be the FLV encoding but it runs with
    no problem when I run the FLV locally: Here is the error that I
    get:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback streamInfo.
    error=ReferenceError: Error #1069: Property streamInfo not found on
    mx.controls.videoClasses.NCManagerConnectClient and there is no
    default value.
    at mx.controls.videoClasses::NCManager/::connectRTMP()
    at mx.controls.videoClasses::NCManager/connectToURL()
    at mx.controls.videoClasses::VideoPlayer/::_load()
    at mx.controls.videoClasses::VideoPlayer/play()
    at mx.controls::VideoDisplay/play()
    at mx.controls::VideoDisplay/::autoPlaying()
    at mx.controls::VideoDisplay/::creationCompleteHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at mx.core::UIComponent/set initialized()
    at mx.managers::LayoutManager/::doPhasedInstantiation()
    at Function/
    http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/::callLaterDispatcher2()
    at mx.core::UIComponent/::callLaterDispatcher()
    Please someone help! Vitalstream is not being helpful at
    all.

    I am also getting this error when using VitalStream. Was an
    answer ever found this this issue? If anybody has any suggestions,
    all help is appreciated.
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback streamInfo.
    error=ReferenceError: Error #1069: Property streamInfo not found on
    mx.controls.videoClasses.NCManagerConnectClient and there is no
    default value.
    at mx.controls.videoClasses::NCManager/::connectRTMP()
    at mx.controls.videoClasses::NCManager/connectToURL()
    at mx.controls.videoClasses::VideoPlayer/::_load()
    at mx.controls.videoClasses::VideoPlayer/load()
    at mx.controls::VideoDisplay/load()
    at mx.controls::VideoDisplay/::autoPlaying()
    at mx.controls::VideoDisplay/::creationCompleteHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    CODE
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Panel title="VideoDisplay Control Example"
    height="75%" width="75%"
    horizontalAlign="center"
    paddingTop="10" paddingLeft="10" paddingRight="10"
    paddingBottom="10">
    <mx:Text width="75%" color="blue"
    text="Use the buttons to control the video. The Stop button
    resets the video to the beginning."/>
    <mx:VideoDisplay
    id="myVid"
    height="158"
    width="211"
    source="rtmp://LINK REMOVED"
    autoPlay="false"/>
    <mx:HBox>
    <mx:Button label="Play" click="myVid.play();"/>
    <mx:Button label="Pause" click="myVid.pause();"/>
    <mx:Button label="Stop" click="myVid.stop();"/>
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="{myVid.bytesLoaded} of
    {myVid.bytesTotal}" />
    <mx:Label text="{myVid.playheadTime} of
    {myVid.totalTime}" />
    </mx:HBox>
    </mx:Panel>
    </mx:Application>
    Text

  • HPUX on IA64: Error when connecting to SAP via librfc

    Hello,
    I'm trying to develop a C-program to call ABAP-Functions. On Windows this works fine (example program from the book "SAP-Schnittstellenprogrammierung" by Meiners/Nüßer), but on HP-UX on IA64 I get:
    **** Trace file opened at 20060919 115449 MESZ SAP-REL 700,0,61 RFC-VER 3 834459
    resize I/O buffer to 16000 bytes
    >>>> [1] <unknown>    : EXT  <ac: 1> L w2sap >>> OPEN  
    UUID: ab_drvstate create uuid {450FBE6A-BE69-25F1-E100-0000C06D4F88}
    ======> Connect to SAP gateway failed
    Connect_PM  GWHOST=w2sap, GWSERV=sapgw00, SYSNR=00
    LOCATION    CPIC (TCP/IP) on local host
    ERROR       internal error
    TIME        Tue Sep 19 11:54:49 2006
    RELEASE     700
    COMPONENT   NI (network interface)
    VERSION     38
    RC          -1
    MODULE      nixxi.cpp
    LINE        2762
    DETAIL      NiICheckPendConnection
    SYSTEM CALL poll, getsockopt
    ERRNO       2050
    COUNTER     3
    >>>> [1] <unknown>    : EXT  <ac: 2> L w2sap >>> CLOSE abrfcio.c 611 
      -{450FBE6A-BE69-25F1-E100-0000C06D4F88}
    ==== Delta 0   0 LOG DROPPED
    >>> RfcOpenEx ...
    Got following connect_param string:
       CLIENT=000 USER=BCUSER PASSWD=******* LANGUAGE=DE ASHOST=w2sap SYSNR=00 ABAP_DEBUG=0 LCHECK=0 TRACE=1 USE_SAPGUI=0
    <<< RfcOpenEx failed
    I presume it has something to do with 32/64 Bit, because we also had problems with our own programs. On HPUX socklen_t is 64 bit (parameter of getsocket), and perhaps librfc thinks, it only has 32 bit and give an int as parameter.
    Is there anything I can do?
    Thx.
    Roger

    I am also getting this error when using VitalStream. Was an
    answer ever found this this issue? If anybody has any suggestions,
    all help is appreciated.
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback streamInfo.
    error=ReferenceError: Error #1069: Property streamInfo not found on
    mx.controls.videoClasses.NCManagerConnectClient and there is no
    default value.
    at mx.controls.videoClasses::NCManager/::connectRTMP()
    at mx.controls.videoClasses::NCManager/connectToURL()
    at mx.controls.videoClasses::VideoPlayer/::_load()
    at mx.controls.videoClasses::VideoPlayer/load()
    at mx.controls::VideoDisplay/load()
    at mx.controls::VideoDisplay/::autoPlaying()
    at mx.controls::VideoDisplay/::creationCompleteHandler()
    at
    flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    CODE
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Panel title="VideoDisplay Control Example"
    height="75%" width="75%"
    horizontalAlign="center"
    paddingTop="10" paddingLeft="10" paddingRight="10"
    paddingBottom="10">
    <mx:Text width="75%" color="blue"
    text="Use the buttons to control the video. The Stop button
    resets the video to the beginning."/>
    <mx:VideoDisplay
    id="myVid"
    height="158"
    width="211"
    source="rtmp://LINK REMOVED"
    autoPlay="false"/>
    <mx:HBox>
    <mx:Button label="Play" click="myVid.play();"/>
    <mx:Button label="Pause" click="myVid.pause();"/>
    <mx:Button label="Stop" click="myVid.stop();"/>
    </mx:HBox>
    <mx:HBox>
    <mx:Label text="{myVid.bytesLoaded} of
    {myVid.bytesTotal}" />
    <mx:Label text="{myVid.playheadTime} of
    {myVid.totalTime}" />
    </mx:HBox>
    </mx:Panel>
    </mx:Application>
    Text

  • Getting error when connecting a third pary applicatio​n to a server in my LAN

    Hi
    I am getting error 
    javax.microedition.io.ConnectionNotFoundException: Protocol not found: net.rim.device.cldc.io.http.Protocol
    when trying to connect a third pary application from Blackberry to a server in my LAN

    Hi Mudessir,
    With the help of ABAP'er try the following.
    1. open the program 'LCLSCF2G' from SE38.
    2. Keep a break point at line no: 131.
    There is 'END SELECT' statement which is getting failed at line no 131 in the program.
    Try to analyse the SY-SUBRC at that point.
    If your technical consultant can't solve this, write to SAP OSS (service.sap.com).
    I have searched SAP OSS, there are other situations, but your case is not there. So write to SAP if technical consultant can't solve it by debugging the program.
    Regards,
    Madhu.

  • Get error when connecting SQL 2012 Management studio to SQL Server 2012 database

    I got this error message when I tried to connect to SQL Server 2012 using Management studio 2012.
    Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)

    Did this get this resolved?
    My SSMS 2012 was running without issue for several months until I installed VS2012. After the VS2012 I started getting "Service 'Microsoft.SqlServer.Management.IRegistrationService' not found" when connecting to database in SSMS 2012. I uninstalled VS2012
    and SSMS 2012 started working again. Installed VS2012 and SSMS 2012 is broken again.
    I tried the above suggestions without success. Here are the error details. Any help is greatly appreciated.
    ===================================
    Service 'Microsoft.SqlServer.Management.IRegistrationService' not found (Microsoft.SqlServer.Management.SDK.SqlStudio)
    Program Location:
       at Microsoft.SqlServer.Management.ServiceProvider.GetService[T](IServiceProvider serviceProvider, Boolean throwIfNotFound)
       at Microsoft.SqlServer.Management.SqlStudio.Explorer.NavigationService.Initialize()
       at Microsoft.SqlServer.Management.SqlStudio.Explorer.NavigationService.GetView(String urnPath)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.<GetColumnsFromNavigationService>d__11.MoveNext()
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.AddFields(List`1 list, IEnumerable`1 fields, IDictionary`2 allValidFields, AddFieldsFlags flags)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.GetParentFields(INodeInformation source, Dictionary`2& allValidColumns)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, String urnQuery, Boolean registerBuilder, Boolean registerBuiltItems)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)

  • Get error when CONNECT BY PRIOR used by where

    Hi
    I get "No more data to read from socket" error when the result of CONNECT BY PRIOR used after where, is there anybody encounter this error?
    example SQL:
    select
    from table_A
    where exists
    (select 1 from table_b
    START WITH table_b.col1 = 'value'
    CONNECT BY PRIOR table_b.col1 = table_b.col2)
    The sql select 1 from table_b START WITH table_b.col1 = 'value' CONNECT BY PRIOR table_b.col1 = table_b.col2 can return 2 row correct, but the whole sql does not work.

    Hi! Rahul,
    Thank you for your reply first. Your method doesn't work in my case.  Can you tell me the steps of creating a new layout for added records and draft documents.  I have created a quotation layout which work with added records only, the steps has been show below and please comments, thanks.
    1. In Crystal Report > new blank report > create new connection > Choose "SAP Business One" > Select OQUT under "B1 Tables".
    2. Insert "CardName" field to report > Create DocKey@ parameter and  set it equal to DocEntry in select expert record function
    3. Click Add-ins > SAP Business One > Save > Choose company database and input manager password.
    Regards,
    Ivan

  • Using DI API, getting error when connecting to database:

    The server is 2003. The sqlserver is 2005.
    We have a button that calles the DIapi function Connect().  He gets the following error: [Microsoft][ODBC SQL Server Driver][SQL Server]Conversion failed when converting the nvarchar value 'N' to data type int.
    We then tried to connect into another database in SAP we got the following error:
    1).[Microsoft][ODBC SQL Server Driver][SQL Server]Conversion failed when converting the nvarchar value 'UDOXX_Contract to data type int.
    There is a user-defined object called 'UDOXX_Contract', but our Add-On does not use any user-defined data object, so that must be from another add-on.  I really dont know anything about these user-defined objects.  Anyone have any idea what can be causing this problem, or what i can look at concerning this?
    thanks
    Bill

    Hi Bill,
    I am not sure why it is giving you the error messages and I have never seen these errors before. What you can possibly try is to see what SQL statements it is trying to execute. You can accomplish this with the SQL Profiler.
    Are you sure you're connecting correctly? Please post your code for the connection here.
    Hope it helps,
    Adele

  • PayPal transaction completing but getting error when connecting back to site.

    Hi there,
    I'm using PayPal standard to accept payment via my site. The transactions are being completed but it then fails to redirect properly to my site.  Im getting an error message of,
    An Error Occurred
    Please go back in your browser and try again.
    The domain seems to be correct.
    'https://ddfitness.worldsecuresystems.com/PaymentProcess.aspx?tx=3L296556310289342&st=Compl eted&amt=4%2e00&cc=GBP&cm=&item_number=101
    Any ideas?

    Thanks Liam.
    I'm using the paypal buttons rather than a web form.
    Yes I'm using paypal standard to sell access to a secure zone on an eCommerce package.

  • ERROR When coonecting to SQL via DBCO Connections

    Hi,
    Error when connecting to SQL using DBCO connections. I am getting an dump as "Set up of a secondary connection to the database system failed. It is possible that the data required for setting up the connection via EXEC SQL (Native SQL)is faulty."
    plaese help.
    Thanks

    Hi
    Checking the dbsl_w<NN> as it is explained in point 3 of the 'Troubleshooting' section of [SAP Note 738371|https://service.sap.com/sap/support/notes/738371] would help a lot to know the reason of the failure.
    It is most likely that, the information provided in DBCO are not complete/accurate
    Regards
    Raj

  • I keep getting the same error when connecting to itune for either update or download. error is we could not complete your itunes store request error 0x800B0101

    I keep getting the same error when connecting to itune for either update or download. error is we could not complete your itunes store request error 0x800B0101.
    My OS is Windows Vista and using Internet Explorer

    I keep getting the same error when connecting to itune for either update or download. error is we could not complete your itunes store request error 0x800B0101.
    My OS is Windows Vista and using Internet Explorer

  • I keep getting this error when connecting my phone (0xE8000001)

    I keep getting this error when connecting my phone (0xE8000001) to iTunes. Sometimes the phone will try and sync for a little bit then it disconnects. What gives?
    And yes, I do have the latest version of iTunes (7.3)

    i kept getting all the same errors and i just figured it out. after getting an iphone i went from pure excitment to anger as i plugged it in and realized i needed to upgrade to tiger. then i spent over an hour installing tiger and it still didnt work. i got the same itunes error of not recognizing. HERE IS THE FIX....TURN OFF THE IPHONE AND REMOVE FROM THE DOCK. DONT JUST PUT IT TO SLEEP, HOLD DOWN THE BUTTON UNTIL IT ASKS YOU TO SLIDE TO TURN OFF. THEN CLOSE ITUNES. NEXT TURN THE PHONE BACK ON BY RE-DOCKING. START UP ITUNES IF IT DOESNT START IMMEDIATELY. YOU SHOULD START HAVING FUN NOW, ALBEIT SLOW ON THE 1.1 USB.

  • Error when connecting to portal from some machines

    Hi all,
    Can anyone help me with this.
    I get this jserver error when connecting to portal from some
    client machines.
    I works fine from the others. Any ideas?
    This is the error I get:
    [08/01/2002 17:41:57:618 GMT+00:00] page/Timeout occurred,
    label=73 url=http://odeceixe:81/pls/portal30/!
    PORTAL30.wwpro_app_provider.execute_portlet time=15828ms
    [08/01/2002 17:41:57:618 GMT+00:00] page/ContentFetcher
    Unexpected Exception, name=content-fetcher5
    java.io.EOFException: Premature EOF encountered
         at HTTPClient.StreamDemultiplexor.read
    (StreamDemultiplexor.java, Compiled Code)
         at HTTPClient.RespInputStream.read(RespInputStream.java,
    Compiled Code)
         at java.io.InputStream.read(InputStream.java:95)
         at java.io.InputStreamReader.fill
    (InputStreamReader.java:163)
         at java.io.InputStreamReader.read
    (InputStreamReader.java:239)
         at oracle.webdb.page.ContentFetcher.run
    (ContentFetcher.java, Compiled Code)

    Did you ever find the cause of this, I am receiving the same message, but as you said, only when connecting to the portal via a certain pc.

  • Error When connecting proxy

    Hi,
    When I try to connect proxy in application, it is not connecting instead when I check whether it is going through proxy or not it is telling that it is establishing direct connection only. Here I have posted part of the coding. Please If any error give me a hint.
                System.setProperty("ProxySet", "true");
                SocketAddress addr = new InetSocketAddress("webcache.mydomain.com",80);
                proxy=new Proxy(Proxy.Type.HTTP,addr);here in this code part I am checking whether is connecting with proxy or not.
    URL u = new URL(url);
    URLConnection uu=u.openConnection(ScrapperInterface.proxy);
    try
                    URI uuu = uu.getURL().toURI();
                    List l=ProxySelector.getDefault().select(uuu);
                    for (Iterator iter = l.iterator(); iter.hasNext(); )
                         Proxy proxy = (Proxy) iter.next();
                         System.out.println("proxy hostname : " +proxy.type());
                         InetSocketAddress add = (InetSocketAddress)proxy.address();
                         if(add == null)
                             System.out.println("No Proxy");
                         else
                             System.out.println("proxy hostname : " +add.getHostName());
                             System.out.println("proxy port : " +add.getPort());
    catch (URISyntaxException ex)
                    Logger.getLogger(StartThread.class.getName()).log(Level.SEVERE, null, ex);
    }Output is:
    proxy hostname : DIRECT
    No Proxy

    Re: Error When connecting proxy You didn't get any error when you created the connection. Your title is misleading. Probably you are misleading yourself - see below.
    System.setProperty("ProxySet", "true");That does nothing. There is no such property, contrary to widespread belief.
    SocketAddress addr = new InetSocketAddress("webcache.mydomain.com",80);
    proxy=new Proxy(Proxy.Type.HTTP,addr);... and using java.net.Proxy has nothing to do with system properties in any case.
    URLConnection uu=u.openConnection(ScrapperInterface.proxy);Here you are opening a URLConnection via the proxy. As you got output from the code further down it is clear that this step must have succeeded. So all the code below is pointless.
    URI uuu = uu.getURL().toURI();Here you are getting the URI you created the connection for.
    List l=ProxySelector.getDefault().select(uuu);Here you are getting the Proxies the default ProxySelector would have given you for that URI. Nothing to do with the URLConnection you created, and nothing to do with the Proxy you created either.
    InetSocketAddress add = (InetSocketAddress)proxy.address();So here you are testing the proxy address for the system's default proxy for that URI. Again, nothing to do with what you did above.
    What you should be doing here is using the URLConnection you have already created. Not testing an address.

Maybe you are looking for