WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Socket Factories in WebSphere

    Posted Wed June 18, 2014 03:19 PM
    We are getting issues trying to invoke a secure service from one of our application servers. Here is the  prime error

    java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory.

    After a bit of research, I came to a conclusion that I will need to change the socket factories  in APPServer_Home/java/jre/lib/security/java/security file to use the Default JSSE factoried rather than Websphere Socket factories

    # Default JSSE socket factories
    #ssl.SocketFactory.provider=com.ibm.jsse2.SSLSocketFactoryImpl
    #ssl.ServerSocketFactory.provider=com.ibm.jsse2.SSLServerSocketFactoryImpl
    # WebSphere socket factories (in cryptosf.jar)
    ssl.SocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLSocketFactory
    ssl.ServerSocketFactory.provider=com.ibm.websphere.ssl.protocol.SSLServerSocketFactory

    Since this is a shared environment, and this needs to be done at a profile level I am a bit hesitant. Can this be changed more at a jvm level, may be add them as a custom property or any other alternative.

    I am at WAS 7.0.0.29 and here  is my java version 


    java version "1.6.0_65"
    Java(TM) 2 Runtime Environment, Standard Edition (IBM build 1.6.0_65-b14 19_Nov_2013_12_51 solaris sparcv9 (SR15+IX90131+IX90132))
    Java HotSpot(TM) Server VM (build 20.65-b04, mixed mode)
    IBM Java ORB build orb60ifx-20131001.01 (SR15_IX90131_IX90132)
    XML build XL TXE Java 1.0.36
    XML build IBM JAXP 1.4.10
    XML build XML4J 4.5.22 

    If there is no alternative, is it safe to change this and is there any other additonal config I need to take care of?

    Thanks a lot in ADVANCE 




     


     


  • 2.  Socket Factories in WebSphere

    Posted Wed June 18, 2014 07:23 PM
    Hi,

      Maybe configuring the outbound to invoke your concrete service can be an option

      www-01.ibm.com/support/knowledgecenter/S...

      www-01.ibm.com/support/knowledgecenter/a...
      
      Hope this helps.

    Regards


  • 3.  Socket Factories in WebSphere

    Posted Wed June 18, 2014 07:57 PM
    Thanks Gabriel.

    I am trying to implement your suggestion, but I was not able to go all the way. I am at  step where I selected the SSL configurations for the interested cluster  undr Outbound  but not sure what else needs to be done after I hit the create New button.
     


  • 4.  Socket Factories in WebSphere

    Posted Fri June 20, 2014 07:31 AM
    Hi,

      I suggest not to change APPServer_Home/java/jre/lib/security/java/security file
     
      Your requiered classes are on those files
     
      APPServer_Home/plugins/com.ibm.ws.security.crypto.jar
      APPServer_Home/plugins/com.ibm.ffdc.jar
     
      Put in your server JVM Classpath properties
     
      Application servers > SERVER_NAME > Process definition > Java Virtual Machine > Classpath
     
      Or if you want more granularity create a shared library put the jar files and add to your application as classloader.
     
      Hope this helps.
     
    regards


  • 5.  Socket Factories in WebSphere

    Posted Mon July 14, 2014 12:26 PM
    Thanks Gabriel. 

    I have added these classes under the shared libraries and referencing it from the application. But the issue is still there. I also checked using the classloader viewer to make sure they are loading and I can see them under "Module - com.ibm.ws.classloader.CompoundClassLoader".

    Does it depend on where I am adding these classes?