Java.io.IOException: TLS SSLContext not available

Hi all,
I'm new to https and SSL. I had my eclipse configured for non-ssl mode and working fine. now I'm trying to change my tomcat to HTTPS.
I created a new certificate using the keytool and gave the password changeit. I found the .keystore file in my user home directory.
I added the following lines to my %TOMCAT_HOME%/conf/server.xml
<Connector port="443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
And the following line to %TOMCAT_HOME%/conf/web.xml
      <security-constraint>
<web-resource-collection>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
     </security-constraint>
I copied both jce.jar and jsse.jar to %TOMCAT_HOME%/common/lib
When I try to start my tomcat using eclipse tomcat plugin, It is giving me the following error
java.io.IOException: TLS SSLContext not available
     at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:125)
     at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88)
     at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)
     at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
     at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
     at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
     at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
Jun 22, 2007 10:35:38 AM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.io.IOException: TLS SSLContext not available
     at org.apache.catalina.connector.Connector.initialize(Connector.java:930)
     at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
     at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
Can any one help me to resolve this issue

No. I tried to give
<Connector port="443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" debug="0" scheme="https" secure="true"
clientAuth="false" sslProtocol="SSL" />
then it is giving the following error
java.io.IOException: SSL SSLContext not available
     at org.apache.tomcat.util.net.jsse.JSSE14SocketFactory.init(JSSE14SocketFactory.java:125)
     at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:88)
     at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)
     at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:142)
     at org.apache.catalina.connector.Connector.initialize(Connector.java:928)
     at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
     at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)
Jun 22, 2007 12:14:05 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.io.IOException: SSL SSLContext not available
     at org.apache.catalina.connector.Connector.initialize(Connector.java:930)
     at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
     at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:764)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:490)
     at org.apache.catalina.startup.Catalina.load(Catalina.java:509)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:243)
     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:408)

Similar Messages

  • Java.security.NosuchAlgorithmException: Algorithm DESede not available

    Dear All,
    I have created an adapter module using 3DES encryption/decryption algorithm for File/FTP adapter configuration and have deployed it at J2EE server of respective XI system.
    The alogorithm and adapter module are working fine in DEV & QA environments but in Mirror system(which is similar to Prod), I have been encountering Error:-
    java.security.NosuchAlgorithmException: Algorithm DESede not available
    Code snippet for reference:-
    // Convert the raw bytes to a secret key
    DESedeKeySpec keyspec = new DESedeKeySpec(rawkey);
    SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("DESede");SecretKey key = keyfactory.generateSecret(keyspec);
    return key;
    Can you please suggest what could be issue here? Any inputs will be highly appreciated.
    Thanks and Best Regards
    Prashant Rajani

    Hi prometheuzz,
    Thanks for your inputs.
    Please find below the results we received on comparing the files on QA & mirror systems:-
    GXB - QA
    baup22g0:gxbdb:gxbadm 13> ls -lrt
    total 104
    -rwxr-xr-x 1 bin bin 2212 May 12 2004 local_policy.jar
    -rwxr-xr-x 1 bin bin 2199 May 12 2004 US_export_policy.jar
    -rwxr-xr-x 1 bin bin 6593 Oct 16 19:49 java.security
    -rwxr-xr-x 1 bin bin 2652 Oct 16 19:49 java.policy
    -rwxr-xr-x 1 bin bin 30337 Oct 16 19:49 cacerts
    GXC-Mirror
    bauc52g0:gxcdb:gxcadm 2> ls -lrt
    total 104
    -rwxr-xr-x 1 bin bin 2212 May 12 2004 local_policy.jar
    -rwxr-xr-x 1 bin bin 2199 May 12 2004 US_export_policy.jar
    -rwxr-xr-x 1 bin bin 6593 Oct 16 19:49 java.security
    -rwxr-xr-x 1 bin bin 2652 Oct 16 19:49 java.policy
    -rwxr-xr-x 1 bin bin 30337 Oct 16 19:49 cacerts
    bauc52g0:gxcdb:gxcadm 3>
    The results seem identical. Can you please let us know where we should target exactly?
    Thanks & Best Regards
    Prashant

  • Secured webservice java net socketexception ssl implementation not avail

    Hi all,
    i am trying to call a secured webservice (which has authentication and trusted certificate) from plsql by using a java stub generated using JDeveloper 10.1.
    I called the java method using a wrapper procedure for the java class in plsql.
    While trying to call the webservice i am gettting the following exception
    SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.SocketException: SSL >>implementation not available; targetException=java.lang.IllegalArgumentException: Error opening socket: >>java.net.SocketException: SSL implementation not available
    *** 2010-02-06 18:32:14.155
    at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:436)
    at org.apache.soap.messaging.Message.send(Message.java:125)
    The problem happens only when i call a secured webservice, whereas i can able to call the certificate less common webservices. Please provide a way to proceed.
    Thanks,
    Ramesh.R

    The name of this forum is "Database - General" not "Java and SOAP and stuff"
    Please change the subject to "Please Ignore" and post in the correct Java group.
    Thank you.

  • Java.io.IOException: Transport scheme NOT recognized: [tcp]

    Hi everyone, I developed a Java class that allow me to connect, create, send and receive information to an ActiveMQ queues.
    However when I loaded this java class to Oracle 11gR2 (11.2), the java class did not show any error message (its status is active and without errors. The output I got in SqlDeveloper is
    *java.io.IOException: Transport scheme NOT recognized: [tcp].* When I called this Java Class from Jdeveloper 11g It worked but PL/SQL did not.
    This is the Java Class I have been using
    import javax.jms.JMSException;
    import javax.jms.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import org.apache.activemq.ActiveMQConnectionFactory;
    public class ActiveMQRequest {
    // URL of the JMS server. DEFAULT_BROKER_URL will just mean
    // that JMS server is on localhost
    // Name of the queue we will be sending messages to
    // private static String destMameReq = "QueueIN"; // request
    // private static String destNameResp = "QueueOUT"; // response
    public static String Request(String urlMQ,
    String destNameReq,
    String destNameResp,
    String OperationType,
    String XMLmessage) throws JMSException {
    int JMSDeliveryMode=2 ; //for PERSISTENT
    QueueConnectionFactory connectionFactory =null;
    Context jndiContext =null;
    Queue destRequ =null;
    Queue destResp =null;
    QueueSession session =null;
    QueueConnection connection =null;
    String messageID = null;
    QueueReceiver queueReceiver =null;
    QueueSender queueSender =null;
    String replyString =null;
    boolean transacted = false;
    TextMessage outMessage = null;
    try {
    jndiContext = new InitialContext();
    } catch (NamingException e) {
    //System.out.println("Could not create JNDI API context: " + e.toString());
    //System.exit(1);
    return "Error: Initial Context Failed";
    try {
    connectionFactory = new ActiveMQConnectionFactory(urlMQ);
    //connectionFactory = (QueueConnectionFactory) jndiContext.lookup("connectionFactory");
    //destRequ = (Queue) jndiContext.lookup(destNameReq); // Request queue
    // destResp = (Queue) jndiContext.lookup(destNameResp); // Response queue
    } catch (Exception e) {
    //System.out.println("JNDI API lookup failed: " + e.toString());
    //System.exit(1);
    return "Error: MqConnection Factory failed: " + e.toString();
    // begin
    try {
    connection = connectionFactory.createQueueConnection();
    connection.start();
    } catch (JMSException jmse) {
    //System.out.println("Error:JMS Exception occurred: " + jmse.toString());
    return "Error:JMS Exception occurred Create Queue Connection: " + jmse.toString();
    } catch (Exception e) {
    //System.out.println("JNDI API lookup failed: " + e.toString());
    //e.printStackTrace();
    return "Error:JNDI API lookup failed Create Queue Connectio: " + e.toString();
    try {
    session = connection.createQueueSession( transacted,Session.AUTO_ACKNOWLEDGE);
    // check this instead of using JNDI
    destRequ = session.createQueue(destNameReq);
    destResp = session.createQueue(destNameResp);
    } catch (JMSException jmse) {
    //System.out.println("Error:JMS Exception occurred: " + jmse.toString());
    return "Error:JMS Exception occurred createQueueSession: " + jmse.toString();
    } catch (Exception e) {
    //System.out.println("JNDI API lookup failed: " + e.toString());
    //e.printStackTrace();
    return "Error:JNDI API lookup failed createQueueSession: " + e.toString();
    try {
    queueSender = session.createSender(destRequ);
    outMessage = session.createTextMessage(XMLmessage);
    // Sets other properties of the message
    outMessage.setJMSPriority(7);
    outMessage.setJMSReplyTo(destResp);
    outMessage.setJMSDeliveryMode(JMSDeliveryMode);
    //outMessage.setJMSType("Interval"); Interval
    outMessage.setJMSType(OperationType); // ODR , Interval, Ping
    System.out.println("Sending message.: " + outMessage.getText());
    } catch (JMSException jmse) {
    //System.out.println("Error:JMS Exception occurred: " + jmse.toString());
    return "Error:JMS Exception occurred createSender: " + jmse.toString();
    } catch (Exception e) {
    //System.out.println("JNDI API lookup failed: " + e.toString());
    //e.printStackTrace();
    return "Error:JNDI API lookup failed: createSender " + e.toString();
    // Here we are sending the message!
    try {
    queueSender.send(outMessage);
    System.out.println("Message Sent....: " + outMessage.getText() + "'");
    // Receiving
    messageID = outMessage.getJMSMessageID();
    String selector = "JMSCorrelationID = '"+messageID+"'";
    System.out.println("JMSCorrelationID = '"+messageID+"'");
    queueReceiver = session.createReceiver(destResp, selector);
    System.out.println("Receiving Message.");
    Message inMessage = queueReceiver.receive(2000);
    if ( inMessage instanceof TextMessage ) { 
    replyString = ((TextMessage) inMessage).getText();
    System.out.println("Message Received: " + replyString + "'");
    else
    replyString = "Error: TextMessage is empty";
    } catch (JMSException jmse) {
    //System.out.println("Error:JMS Exception occurred: " + jmse.toString());
    return "Error:JMS Exception occurred Receiving: " + jmse.toString();
    } catch (Exception e) {
    //System.out.println("JNDI API lookup failed: " + e.toString());
    //e.printStackTrace();
    return "Error:JNDI API lookup failed Receiving: " + e.toString();
    } finally {
    queueReceiver.close();
    queueSender.close();
    session.close();
    connection.close();
    return replyString;
    This is th pl/sql wrapper
    create or replace
    function ActiveMQRequest( url in varchar2,
    destNameReq in varchar2,
    destNameResp in varchar2,
    OperationType in varchar2,
    XMLmessage in varchar2) return varchar2
    as language java
    name 'ActiveMQRequest.Request( java.lang.String,java.lang.String, java.lang.String , java.lang.String , java.lang.String ) return java.lang.String';
    and this is the JDeveloper Output
    Sending message.:
    <Message>
    <Header>
    <SourceID >sourceid</SourceID>
    <TransactionID>11111111111</TransactionID><MeterID>AAAAAAA</MeterID><REPID>41679178</REPID><TransactionDate>2010-10-08T02:00:00</TransactionDate><UserID>Sensus</UserID><CustomerID>Customer</CustomerID></Header><Body><StarDate>2010-10-01T14:00:00</StartDate><EndDate>2010-10-06T14:00:00</EndDate><IntervalFlag>Y</IntervalFlag><MeterFlag>Y</MeterFlag></Body>
    JMSCorrelationID = 'ID:W05834007-3793-1286901259437-0:0:1:1:1'
    Receiving Message.
    Message Received: <Message>
    <Header>
    <TransactionID>11111111111</TransactionID>
    <SourceID>sourceid</SourceID>
    </Header>
    <Body>
    <TransactionStatus>Acknowledge</TransactionStatus>
    <TransactionMessage>Interval Flag null is not Y or N</TransactionMessage>
    </Body>
    </Message>'
    Result is :<Message>
    <Header>
    <TransactionID>4444444444444444</TransactionID>
    <SourceID>RNI</SourceID>
    </Header>
    <Body>
    <TransactionStatus>Acknowledge</TransactionStatus>
    <TransactionMessage>Interval Flag null is not Y or N</TransactionMessage>
    </Body>
    </Message>
    When I run in Oracle Sqldeveloper the output was
    Error:JMS Exception occurred Create Queue Connection: javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [tcp]
    Do you know what do I do in the Oracle 11gR2 configuration for making this work. I would appreciate your help.
    Thanks

    Perhaps you did not notice that you posted to a forum named "Database - General" with a question that is neither general nor related to the Oracle Database.
    Please update this thread (use Edit) and change the subject to "Please Ignore."
    Then repost your question in a Java related forum.
    Thank you.
    ~ Posted from PEOUG: Lima Peru

  • System copy : As Java : Non-unicode kernel Option not available

    Dear All,
    we are performing AS Java system copy to create a new system , same SID , same HOST and same Configuration except OS is upgraded.
    Susle Linux OS - 11 SP3
    As Java Nw 701
    kernel version -
    NW701 - Kernel 721_Ext - Non_unicode - 201 patch level
    We have successfully completed export and now we are importing the same export in new server,now while performing taget installation we are not getting option to install NON UNICODE kernel , except it is only asking for UC Kernel 7.20/7.21.
    Current version of system is non-unicode and we will like to keep it that way.
    May I know is non-unicode system copy option is not available? is it removed ?
    and if we want to install non-unicode then how we can perform that ?
    Can we install target system using UC kernel and later just perform NON-unicode kernel upgrade, will this work?
    Has anyone faced such concern?
    Guidance will be appreciated.
    Regards,
    Bond

    Thanks for  update RB.
    We have tried this method as in we stop SAP and sync file systems and perform DB/Backup restore method. This method works but unfortunately I am not able to find any SAP relevant document to support this method for so called "java" systems.
    SAP only suggest to perform system copy for "java" hence we are trying via export import. Currently I am looking into options of using old master installation software.
    although, can i request you if you any SAP relevant note or kba or any other in which SAP support/suggest we can perform file system copy and db restore for "Java" systems then it will be just a thing which I need to go ahead with method you suggested.
    Thanks , kindly update.
    Warm Regards,

  • Cr xi / java / export to excel is not available

    Post Author: Aron Sereny
    CA Forum: General
    java / cr xi
    the list of export formats does not show excel as an option.  how do i add excel or excel - data only to the list?
    do i need some excel/cr driver?
    the export options are rpt, pdf and rtf.  where are all the other ones i used to see in CR 5?
    thanks for any help
    [email protected]

    Post Author: Manuel de Kleine
    CA Forum: General
    Aron,You may need to select these exporting formats while installing CR XI.(With my install, I selected all options, so I do have Excel as an exporting format.)

  • TLS(Transaport Layer Security) algorithm not available...JSSE sample codes

    I am using the sample codes provided with the JSSE1.0.2, but I get the following exception" when TLS algorithm not available". I do not get the error when using Java Forte( UI), but when I use the dos prompt to execute the sample codes, I get the error.Please advice.
    Thank You,
    Shafique Razzaque,
    Java Certified Programmer,
    Singapore.

    My email : [email protected]
    If you want to send me any running programme
    Hi
    I�m a student working on a Sun JSSE Samples for many weeks and I couldn�t run anyone ..!
    I am using the last JSSE 1.02 , the jdk 1.31, working on Jbuilder4
    I am working on both RMI and sockets samples.
    On the RMI sample I got this Exception : no such algorithm �TSL�
    �TSL� not supported
    I searched in the posted messages in the forum and I found someone had the same problem
    I followed all what he did but no way �!
    I don�t know what I forget to do, see what I did and tell me please what is wrong.
    I installed the JSSE as followed in the install file. I am sure that it is well installed
    How to compile???!!!
    1.I configured the rmic parameters to generate only the stub compatible only with java 2
    2.I compiled the project I got the stub
    3.I put theses parameters in
    Project Properties /Run/ field : VM parameters
    -Djava.rmi.server.codebase=file:/c:/windows/jbproject/Sunrmissl/classes/ -Djava.security.policy=file:/c:/windows/jbproject/Sunrmissl/policy.policy -Djavax.net.ssl.trustStore=file:/c:/windows/jbproject/Sunrmissl/testkeys.key
    4.I run the rmiregistry
    5.i run the HelloImp but every time exceptions :
    C:\JBUILDER4\JDK1.3\bin\javaw -classpath "C:\WINDOWS\jbproject\Sunrmissl\classes;C:\jsse-1_0_2-gl\jsse1.0.2\lib\jcert.jar;C:\jsse-1_0_2-gl\jsse1.0.2\lib\jnet.jar;C:\jsse-1_0_2-gl\jsse1.0.2\lib\jsse.jar;C:\JBUILDER4\JDK1.3\demo\jfc\Java2D\Java2Demo.jar;C:\JBUILDER4\JDK1.3\jre\lib\i18n.jar;C:\JBUILDER4\JDK1.3\jre\lib\jaws.jar;C:\JBUILDER4\JDK1.3\jre\lib\rt.jar;C:\JBUILDER4\JDK1.3\jre\lib\sunrsasign.jar;C:\JBUILDER4\JDK1.3\lib\dt.jar;C:\JBUILDER4\JDK1.3\lib\tools.jar" -Djava.rmi.server.codebase=file:/c:/windows/jbproject/Sunrmissl/classes/ -Djava.security.policy=file:/c:/windows/jbproject/Sunrmissl/policy.policy -Djavax.net.ssl.trustStore=file:/c:/windows/jbproject/Sunrmissl/testkeys.key sunrmissl.HelloImpl
    java.security.NoSuchAlgorithmException: Algorithm TLS not available
         at com.sun.net.ssl.b.a([DashoPro-V1.2-120198])
         at com.sun.net.ssl.SSLContext.getInstance([DashoPro-V1.2-120198])
         at sunrmissl.RMISSLServerSocketFactory.createServerSocket(RMISSLServerSocketFactory.java:39)
         at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:559)
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:200)
         at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:172)
         at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:319)
         at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:119)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:125)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:109)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:278)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:209)
         at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObHelloImpl err: null
    ject.java:100)
         at sunrmissl.HelloImpl.<init>(HelloImpl.java:27)
         at sunrmissl.HelloImpl.main(HelloImpl.java:41)
    java.lang.NullPointerException
         at sunrmissl.RMISSLServerSocketFactory.createServerSocket(RMISSLServerSocketFactory.java:51)
         at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:559)
         at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:200)
         at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:172)
         at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:319)
         at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:119)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:125)
         at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:109)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:278)
         at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:209)
         at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:100)
         at sunrmissl.HelloImpl.<init>(HelloImpl.java:27)
         at sunrmissl.HelloImpl.main(HelloImpl.java:41)

  • GlobalSign: java.io.IOException: signed fields ove

    Hi
    I'm useing JSSE to open SSL connection like this:
         Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
         System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
         URL verisign = new URL("https://www.globalsign.net/index.cfm");
         BufferedReader in = new BufferedReader(new InputStreamReader(verisign.openStream()));
    Unfortunately an exception is thrown during the handshake, because some GlobalSign SSL server certificates cannot be used with JSSE.
    I saw in this topic:
    http://forum.java.sun.com/thread.jsp?forum=2&thread=4135
    that it is possible to use Bouncy Castle, http://www.bouncycastle.org, to workaround this. Can anybody tell me how, or is there any other way I could do this?

    Hello!!
    I Have same problem.
    I tried to use org.bouncycastle.jce.provider.BouncyCastleProvider, but there appears new problem.
    when I use
    Security.addProviderAt(new com.sun.net.ssl.internal.ssl.Provider())
    I have stacktrace
    java.io.IOException: signed fields overrun
         at com.sun.net.ssl.internal.ssl.HandshakeMessage$CertificateMsg.<init>(DashoA12275)
         at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(DashoA12275)
         at com.sun.net.ssl.internal.ssl.Handshaker.process_record(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
         at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA12275)
    whin I try to use BouncyCastleProvider stacktrace is
    init keymanager of type SunX509
    default context init failed: java.security.PrivilegedActionException <<java.security.NoSuchAlgorithmException: Algorithm SunX509 not available>>
    java.net.SocketException: SSL implementation not available
         at javax.net.ssl.DefaultSSLSocketFactory.createSocket(DashoA12275)
         at HTTPClient.JsseSSL.getSSLSocket(JsseSSL.java:57)
         at HTTPClient.HTTPConnection.getSSLSocket(HTTPConnection.java:4221)
         at HTTPClient.HTTPConnection.doConnect(HTTPConnection.java:4038)
         at HTTPClient.HTTPConnection.sendRequest(HTTPConnection.java:3003)
         at HTTPClient.HTTPConnection.handleRequest(HTTPConnection.java:2843)
         at HTTPClient.HTTPConnection.setupRequest(HTTPConnection.java:2635)
         at HTTPClient.HTTPConnection.Post(HTTPConnection.java:1107)
    Please, can you write how I can use BouncyCastleProvider for SSL connections? Or where I can get documentation?
    Sorry for my bad english.

  • Java.io.IOException in OPP for XML Publisher Report

    Hi,
    When we run the XML Publisher report for more data we get an exception in the OPP log as
    [9/27/10 10:26:37 AM] [UNEXPECTED] [1805143:RT102444048] java.io.IOException: There is not enough space in the file system.
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:266)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:76)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:89)
    at java.io.DataOutputStream.writeInt(DataOutputStream.java:191)
    at oracle.apps.xdo.generator.ProxyGenerator.writeInt(ProxyGenerator.java:613)
    at oracle.apps.xdo.generator.ProxyGenerator.setColor(ProxyGenerator.java:1161)
    at oracle.apps.xdo.template.fo.area.BorderArea.renderBorder(BorderArea.java:775)
    at oracle.apps.xdo.template.fo.area.BorderArea.outBorders(BorderArea.java:206)
    at oracle.apps.xdo.template.fo.area.BorderArea.outBorders(BorderArea.java:147)
    at oracle.apps.xdo.template.fo.area.TableArea.doOutput(TableArea.java:271)
    at oracle.apps.xdo.template.fo.area.BlockArea.doOutput(BlockArea.java:427)
    at oracle.apps.xdo.template.fo.area.NormalFlowReferenceArea.doOutput(NormalFlowReferenceArea.java:58)
    at oracle.apps.xdo.template.fo.area.SpanReferenceArea.doOutput(SpanReferenceArea.java:188)
    at oracle.apps.xdo.template.fo.area.BodyRegionArea.doOutput(BodyRegionArea.java:122)
    at oracle.apps.xdo.template.fo.area.PageArea.doOutput(PageArea.java:666)
    at oracle.apps.xdo.template.fo.area.AreaTree.doOutput(AreaTree.java:483)
    at oracle.apps.xdo.template.fo.elements.FormattingEngine.startLayout(FormattingEngine.java:243)
    at oracle.apps.xdo.template.fo.elements.FormattingEngine.run(FormattingEngine.java:121)
    at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:600)
    at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(XSLTHandler.java:594)
    at oracle.apps.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:51)
    at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)
    at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:307)
    at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1045)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
    at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:259)
    at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:172)
    [9/27/10 10:26:37 AM] [1805143:RT102444048] Completed post-processing actions for request 102444048.

    Check the error: There is not enough space in the file system.

  • Primary key not available

    Hi!
    When i run my appication client to connect to Oracle9i database i have a next exception:
    javax.ejb.CreateException: java.lang.IllegalStateException: Primary key not available.
    In Oracle i set a primary key field ID.
    Here is my code:
    /* Generated by Together */
    package ejb;
    import javax.ejb.EntityBean;
    import javax.ejb.EntityContext;
    import javax.ejb.EJBException;
    import javax.ejb.CreateException;
    import java.sql.SQLException;
    import java.sql.Connection;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.sql.PreparedStatement;
    import javax.ejb.NoSuchEntityException;
    import java.sql.ResultSet;
    import javax.ejb.DuplicateKeyException;
    import javax.ejb.RemoveException;
    import java.util.Collection;
    import java.util.ArrayList;
    import javax.ejb.FinderException;
    import javax.sql.DataSource;
    import java.lang.Integer;
    import java.lang.String;
    import java.rmi.RemoteException;
    import javax.sql.*;
    import java.sql.DriverManager;
    public class TestingBean implements EntityBean {
    private EntityContext ctx;
    public Integer userID;
    public String userLogin;
    public String userPassword;
    public String userPrivilege;
    static private final String users_res_ref = "jdbc/Oracle";
    public void setEntityContext(EntityContext context) throws EJBException {
    System.out.println("EntityContext before = " + ctx);
    ctx = context;
    System.out.println("EntityContext after = " + ctx);
    public void unsetEntityContext() throws EJBException {
    ctx = null;
    public void ejbActivate() throws EJBException {
    public void ejbPassivate() throws EJBException {
    public void ejbRemove() throws EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    userID = (Integer)ctx.getPrimaryKey();
    ps = con.prepareStatement("DELETE FROM TLogon WHERE Id = ?");
    ps.setInt(1, userID.intValue());
    if (!(ps.executeUpdate() > 0)) {
    throw new RemoveException ("ejbLoad: Can't remove user - " + userID);
    catch (Exception e) {
    throw new EJBException(e);
    finally {
    closeStatement(ps);
    closeConnection(con);
    public void ejbStore() throws EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    ps = con.prepareStatement("UPDATE TLogon SET Login = ?, Password = ?, Privilege = ? WHERE Id = ?");
    ps.setString(1, userLogin);
    ps.setString(2, userPassword);
    ps.setString(3, userPrivilege);
    ps.setInt(4, userID.intValue());
    ps.executeUpdate();
    catch (Exception e) {
    throw new EJBException(e);
    finally {
    closeStatement(ps);
    closeConnection(con);
    public void ejbLoad() throws EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    userID = (Integer)ctx.getPrimaryKey();
    try {
    con = getConnection();
    ps = con.prepareStatement("SELECT Id, Login, Password, Privilege FROM TLogon WHERE Id = ?");
    ps.setInt(1, userID.intValue());
    ps.executeQuery();
    ResultSet rs = ps.getResultSet();
    rs.next();
    userLogin = rs.getString("Login");
    userPassword = rs.getString("Password");
    userPrivilege = rs.getString("Privilege");
    catch (Exception e) {
    throw new EJBException("ejbLoad: Can't load user - " + userID);
    finally{
    closeStatement(ps);
    closeConnection(con);
    public Integer ejbCreate(Integer aUserID, String aUserLogin, String aUserPassword, String aUserPrivilege) throws CreateException, EJBException, SQLException {
    System.out.println("Inititialization parameters...");
    this.userID = aUserID;
    this.userLogin = aUserLogin;
    this.userPassword = aUserPassword;
    this.userPrivilege = aUserPrivilege;
    System.out.println("Setting connection to null...");
    Connection con = null;
    PreparedStatement ps = null;
    try {           
    System.out.println("Getting connection...");
    con = getConnection();
    System.out.println("EntityContext before getting primary key... = " + ctx);
    System.out.println("Getting primary key...");
    userID = (Integer)ctx.getPrimaryKey();
    System.out.println("Primary key is done...");
    ps = con.prepareStatement("INSERT INTO TLogon (Id, Login, Password, Privilege) VALUES (?,?,?)");
    System.out.println("Inserting data...");
    ps.setInt(1, userID.intValue());
    ps.setString(2, userLogin);
    ps.setString(3, userPassword);
    ps.setString(4, userPrivilege);
    ps.executeUpdate();
    return aUserID;
    catch (Exception e) {
    throw new CreateException(e.toString());
    finally{
    closeStatement(ps);
    closeConnection(con);
    public Integer ejbFindByPrimaryKey(java.lang.Integer pk) throws FinderException, EJBException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    ps = con.prepareStatement("SELECT Id, Login, Password, Privilege FROM TLogon WHERE Id = ?");
    ps.setInt(1, pk.intValue());
    ps.executeQuery();
    ResultSet rs = ps.getResultSet();
    rs.next();
    return pk;
    catch(Exception e) {
    throw new FinderException (e.toString());
    finally {
    closeStatement(ps);
    closeConnection(con);
    public void ejbPostCreate(Integer aUserID, String aUserLogin, String aUserPassword, String aUserPrivilege) throws CreateException, EJBException, SQLException {
              /* Write your code here */
    public Collection ejbFindAllUsers() throws EJBException, FinderException {
    Connection con = null;
    PreparedStatement ps = null;
    try {
    con = getConnection();
    ps = con.prepareStatement("SELECT Id FROM TLogon");
    ps.executeQuery();
    ResultSet rs = ps.getResultSet();
    ArrayList v = new ArrayList();
    Integer pk;
    while(rs.next()) {
    pk = new Integer(rs.getInt(1));
    v.add(pk);
    return v;
    catch(Exception e) {
    throw new FinderException(e.toString());
    finally {
    closeStatement(ps);
    closeConnection(con);
    public Integer getUserID() throws RemoteException, EJBException {return userID;}
    public void setUserID(Integer param) throws RemoteException, EJBException {this.userID = param;}
    public String getUserLogin() throws RemoteException, EJBException {return userLogin;}
    public void setUserLogin(String param) throws RemoteException, EJBException {this.userLogin = param;}
    public String getUserPassword() throws RemoteException, EJBException {return userPassword;}
    public void setUserPassword(String param) throws RemoteException, EJBException {this.userPassword = param;}
    public String getUserPrivilege() throws RemoteException, EJBException {return userPrivilege;}
    public void setUserPrivilege(String param) throws RemoteException, EJBException {this.userPrivilege = param;}
    private Connection getConnection() throws SQLException {
    InitialContext initCtx = null;
    try {
    initCtx = new InitialContext();
    DataSource ds = (javax.sql.DataSource)initCtx.lookup("java:comp/env/" + users_res_ref);
    return ds.getConnection();
    catch (Exception e) {
    throw new EJBException(e);
    private void closeStatement(PreparedStatement ps) {
    try {
    if (ps != null) {ps.close();}
    catch (Exception e) {
    throw new EJBException(e);
    private void closeConnection(Connection con) {
    try {
    if(con != null) {con.close();}
    catch(Exception e) {
    throw new EJBException(e);
    What i do wrong?
    Please help!!!!

    Very BIG thank you!!!!
    That's right, but i must delete this method only in ejbCreate?
    And i have a next exception: java.sql.SQLException: ORA-00947: not enough values. Why?
    Here is my code db:
    CREATE TABLE "SYSTEM"."TLOGON" ("ID" NUMBER(20) NOT NULL, "LOGIN"
    VARCHAR2(20 byte) NOT NULL, "PASSWORD" VARCHAR2(20 byte) NOT
    NULL, "PRIVILEGE" VARCHAR2(20 byte) NOT NULL,
    CONSTRAINT "ID" PRIMARY KEY("ID")
    USING INDEX
    TABLESPACE "SYSTEM"
    STORAGE ( INITIAL 12K NEXT 12K MINEXTENTS 1 MAXEXTENTS
    2147483645 PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1)
    PCTFREE 10 INITRANS 2 MAXTRANS 255)
    TABLESPACE "SYSTEM" PCTFREE 10 PCTUSED 40 INITRANS 1
    MAXTRANS 255
    STORAGE ( INITIAL 12K NEXT 12K MINEXTENTS 1 MAXEXTENTS 249
    PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1)
    LOGGING
    And my client:
    package ejb.client;
    import javax.naming.Context;
    import javax.rmi.PortableRemoteObject;
    import ejb.TestingHome;
    import ejb.Testing;
    import java.util.Collection;
    import java.rmi.RemoteException;
    import javax.ejb.FinderException;
    import javax.naming.InitialContext;
    public class TestingClient {
    public static void main(String []args) {
    try {
    System.out.println("Step #1");
    Context initial = new InitialContext();
    System.out.println("Step #2");
    Object objref = initial.lookup("java:comp/env/ejb/SimpleTesting");
    System.out.println("Step #3");
    ejb.TestingHome home = (ejb.TestingHome)PortableRemoteObject.narrow(objref, ejb.TestingHome.class);
    System.out.println("Step #4");
    ejb.Testing aTesting;
    for(int i = 0; i < 3; i++) {
    String login = users[0];
    String password = users[i][1];
    String privilege = users[i][2];
    System.out.println("Adding user..." + login + "\n" + password + "\n" + privilege);
    home.create(new Integer(i+1), login, password, privilege);
    Integer i = new Integer(2);
    home.create(i, "Zatoka", "password", "admin");
    catch(Exception e) {
    e.printStackTrace();
    //private static String JNDI = "ejb.TestingHome";
    private final static String[][] users = {{"Zatoka","*****","admin"}, {"Ivanov","234fds","user"},{"Petrov","dcd2","user"}};
    BIG thanks!!!

  • ECDSA KeyPairGenerator not available

    Hello Everybody,
    I installed JDK 1.5 on my computer and I want to generate ECC key pairs. But when I tried run my utility whith this part of source code:
    KeyPairGenerator g = KeyPairGenerator.getInstance("ECDSA");
    I got this exception:
    java.security.NoSuchAlgorithmException: ECDSA KeyPairGenerator not available
         at java.security.KeyPairGenerator.getInstance(KeyPairGenerator.java:169)
         at test.Untitled1.generuj(Untitled1.java:70)
         at test.Sprav.main(Sprav.java:19)
    My utility run OK with "RSA" and "DSA" algorithm.
    Maybe its problem with providers, but I dont know what I shall do.
    Can some body help me?
    Thanks

    aybe its problem with providers, but I dont know what
    I shall do.
    Can some body help me?
    SunJCE provider does not provide ECDSA. Try BouncyCastle provider.

  • NoSuchAlgorithmException : Algorithm DESede not available

    Hi,
    Could any one tell me why this error comes
    The particular method which throws the Exception is
    SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
    The Exception stackTrace is
    java.security.NoSuchAlgorithmException: Algorithm DESede not available
    at javax.crypto.SunJCE_b.a(DashoA6275)
    at javax.crypto.SecretKeyFactory.getInstance(DashoA6275)
    at com.orbitech.armor.syncd.server.ArmorKeyTabFile.ReadKeyTabFile(ArmorK
    eyTabFile.java:173)
    at com.orbitech.armor.syncd.server.OracleRegistryPlugin.init(OracleRegis
    tryPlugin.java:210)
    at ArmorSystemServlet.processPrnInfo(ArmorSystemServlet.java:194)
    at ArmorSystemServlet.doPost(ArmorSystemServlet.java:137)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:826)
    at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRun
    ner.java:533)
    com.orbitech.armor.syncd.server.ArmorException: Error in Reading Keytab file
    at com.orbitech.armor.syncd.server.ArmorKeyTabFile.ReadKeyTabFile(ArmorK
    eyTabFile.java:212)
    at com.orbitech.armor.syncd.server.OracleRegistryPlugin.init(OracleRegis
    tryPlugin.java:210)
    at ArmorSystemServlet.processPrnInfo(ArmorSystemServlet.java:194)
    at ArmorSystemServlet.doPost(ArmorSystemServlet.java:137)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:826)
    at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRun
    ner.java:533)
    Im trying to use JCE api's in a servlet running under a iplanet ssl server. Also my classpath setting contains the jce jars as well.
    I am able to see very well the SunJCE provider and the algorithm are installed. The code I used too see them is
    System.out.println("Cipher algorithms : ");
    Object[] o = Security.getAlgorithms("Cipher").toArray();
    for (int i=0; i<o.length; i++) {
    System.out.println((String) o[ i ]);
    Cipher algorithms :
    BLOWFISH
    DESEDE
    PBEWITHMD5ANDTRIPLEDES
    DES
    PBEWITHMD5ANDDES
    System.out.println("MessageDigest algorithms : ");
    o = Security.getAlgorithms("MessageDigest").toArray();
    for (int i=0; i<o.length; i++) {
    System.out.println((String) o[ i ]);
    MessageDigest algorithms :
    MD5
    SHA
    System.out.println("Signature algorithms : ");
    o = Security.getAlgorithms("Signature").toArray();
    for (int i=0; i<o.length; i++) {
    System.out.println((String) o[ i ]);
    Signature algorithms :
    MD2WITHRSA
    MD5WITHRSA
    SHA1WITHDSA
    SHA1WITHRSA
    System.out.println("Mac algorithms : ");
    o = Security.getAlgorithms("Mac").toArray();
    for (int i=0; i<o.length; i++) {
    System.out.println((String) o[ i ]);
    Mac algorithms :
    HMACSHA1
    HMACMD5
    System.out.println("Keystore algorithms : ");
    o = Security.getAlgorithms("Keystore").toArray();
    for (int i=0; i<o.length; i++) {
    System.out.println((String) o[ i ]);
    Keystore algorithms :
    PKCS12
    JCEKS
    JKS
    System.out.println("Providers : ");
    Provider p[] = Security.getProviders();
    for(int i = 0; i<p.length; i++) {
    System.out.println( p.getName());
    Providers :
    SUN
    SunJSSE
    SunRsaSign
    SunJCE
    SunJGSS
    Thanks in advance
    regds........jp

    try this...it worked for me......
    put all four JCE jar files in the ext folder buried deep inside ur program files ...I have it in >> "C:\Program Files\Java\j2re1.4.1_02\lib\ext" folder .Now edit the file "C:\Program Files\Java\j2re1.4.1_02\lib\security\java.security" and add register ur provider by adding the line>> security.provider.2=com.sun.crypto.provider.SunJCE
    save the file and rerun the program..the exception should vanish..
    Sanjit R
    US Software Pvt Ltd
    Technopark,
    Trivandrum
    Kerala
    India

  • SocketException: SSL implementation not available

    Anyone every see this error? I have the three JSSE1.0.2 jar files in my classpath. Anyone know what I'm missing to get this error? I also get the same error running the Sample SSLSocketClient that comes with JSSE1.0.2

    even i am trying to invoke a servlet through java Client
    using an "https" protcol.i am using jsse 1.0.2 .i got all the three jar files installed in my classpath and my code all contains
    java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
         System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
         System.setProperty("javax.net.ssl.trustStore","d:\\certificate");
    where d:\\certificate is the path where i have my client side certificate
    but i am getting the Error
    keyStore is :
    keyStore type is : jks
    init keystore
    init keymanager of type SunX509
    trustStore is: d:\certificate
    trustStore type is : jks
    default context init failed: java.security.PrivilegedActionException <<java.io.FileNotFoundExcepti
    on: d:\certificate (Access is denied)>>
    java.net.SocketException: SSL implementation not available
    at javax.net.ssl.DefaultSSLSocketFactory.createSocket([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect([DashoPro-V1.2-120198
    at com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer([DashoPro-V1.2-120
    198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpClient.l([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpClient.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.<init>([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2-120198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect([DashoPro-V1.2-1
    20198])
    at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getOutputStream([DashoPr
    o-V1.2-120198])
    at JavaClient.main(JavaClient.java:57)
    can anybody help me out.
    I thank you guys for your help in advanced,
    Taimina

  • SSL implementation not available on WebSphere 4.0

    I am hitting a wall. I am trying to make an https connection from my servlet code on WebSphere 4.0 to another server. I've installed the jsse as an extension into the java/jre/lib/ext in the websphere directory. I've updated the java.security to the following:
    security.provider.1=sun.security.provider.Sun
    security.provider.2=com.sun.net.ssl.internal.ssl.Provider
    security.provider.3=com.ibm.crypto.provider.IBMJCE
    security.provider.4=com.ibm.jsse.JSSEProvider
    I have my cacerts configured with the cert for the other system imported. This is killing me because it works without a problem on ServletExec. The stack trace follows...
    java.net.SocketException: SSL implementation not available at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown Source) at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.doConnect([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.NetworkClient.openServer([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.HttpClient.l([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.HttpClient.([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect([DashoPro-V1.2-120198]) at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getOutputStream([DashoPro-V1.2-120198]) at testjsp_9._jspService(_test_jsp_9.java:100) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.dynacache.CacheHook.handleFragment(CacheHook.java:245) at com.ibm.servlet.dynacache.CacheHook.handleServlet(CacheHook.java:89) at com.ibm.servlet.dynacache.CacheManager.handleServlet(CacheManager.java:223) at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:299) at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:445) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:579) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:665) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:124) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:218) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315) at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137)

    I think my problem is with the keystore/truststore....
    previous postings made it sound like you could do this programatically by pointing to truststore rather than adding certs to cacerts with keytool? In this case I a just running a main pgm from wsad-ide.
    Oh yeah, we are behind a firewall and use a proxy-server to get out. the settings provided were gotten from ie:tools:options:connections tab, lan settings; I am not sure if that is what is supposed to be supplied for https:proxyport and https:proxyhost parms.
    (I get the dreaded "untrusted server cert chain")
    thanks in advance for any help.
    -Rick V.
    public static void performTaskTest() {
    StringBuffer outXML = null;
    StringBuffer url = null;
    String responseString = null;
    StringBuffer responseSB = new StringBuffer();
    java.net.URL urlClass = null;
    com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection urlConn = null;
    java.io.DataOutputStream printout = null;
    java.io.DataInputStream input = null;
    try {
         responseSB = new StringBuffer();
         outXML = new StringBuffer();
         url = new StringBuffer();
         url.append("https://blah.com/blahServlet");
         System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
         Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
         System.getProperties().put( "https.proxyHost", "www-proxy.myco.com" );
         System.getProperties().put( "https.proxyPort", "80" );
         System.setProperty("javax.net.ssl.trustStore","C:\\Program Files\\IBM\\Application Developer\\jre\\lib\\security\\cacerts");
         System.setProperty("javax.net.ssl.keyStorePassword","changeit");
         urlClass = new java.net.URL(url.toString());
         urlConn = (com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection) urlClass.openConnection();
         urlConn.setDoInput(true);
         urlConn.setDoOutput(true);
         urlConn.setUseCaches(false);
         urlConn.setRequestMethod("POST");
         urlConn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
         printout = new java.io.DataOutputStream(urlConn.getOutputStream());
         StringBuffer content = new StringBuffer();
         content.append("?");
         content.append("&");
         content.append("XMLData");
         content.append("=");
         content.append(java.net.URLEncoder.encode("aaaaaaaaaa"));
         printout.writeBytes(content.toString());
         printout.flush();
         printout.close();
         java.io.BufferedReader outXMLBR =
                   new java.io.BufferedReader(
                        new java.io.InputStreamReader(urlConn.getInputStream()));
         String str;
         while (null != ((str = outXMLBR.readLine()))) {
              responseSB.append(str);
         outXMLBR.close();
              // the result!!!!
         System.out.println(responseSB);
    } catch (Throwable e) {
         System.out.println(e.getMessage());

  • KeyPairGenerator not available

    Hi,
    I am new to JCE. I have a public key to decrypt an encrypted file. I am using the following code
    to decrypt the file. I am getting the following exception at runtime.
    java.security.NoSuchAlgorithmException: PGP KeyPairGenerator not available
    I do not know where to specify the "public key" I have got. So that the encrypted file can be decrypted.
    Can someon throw some light one this please?
    Thanks
    Mathew
    KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("PGP");
    keyPairGenerator.initialize(1024);
    KeyPair keyPair = keyPairGenerator.genKeyPair();
    Cipher cipher = Cipher.getInstance("PGP");
    cipher.init(Cipher. DECRYPT_MODE, keyPair.getPublic());
    //encrypted file that needs to be decrypted
    FileInputStream fis1 = new FileInputStream("C:\\cert\\sample.txt");
    InputStreamReader inputStream = new InputStreamReader(fis1);
    messageReader = new BufferedReader(inputStream);
    response = new StringBuffer();
    String line;
    while((line = messageReader.readLine()) != null)
         byte[] raw = decoder.decodeBuffer(line);
         byte[] decryptedBytes = cipher.doFinal(raw);
         String output = new String(decryptedBytes, "UTF8");
         System.out.println("\nstring = " + output + "\n");
    }

    PGP is not available in the SunJCE provider. As far as I am aware, only BouncyCastle provide PGP stuff. The distributiion has several good examples of how to use it.
    I have never used it in anger.

Maybe you are looking for