Service Virtualization

  • 1.  Error loading VS Model document: Could not initialize class com.itko.lisa.utils.ssl.VSESSLContext

    Posted Mar 01, 2018 07:26 PM

    Hi All, J_NeSmith

    I have recently installed DevTest 10.2 and getting following errors post installation.

     

    1) Unable to open sample projects and getting following error

      Error Message:Error loading VS Model document: Could not initialize class com.itko.lisa.utils.ssl.VSESSLContext"

     

    2) Unable to create a project suing RR pair and getting following error(I have not checked SSL check box this is simple HTTP call)

    Error Message: "An error occured writing recorded transactions to the database"

     

    3)  Getting SSL exception while executing REST step. The same VS was working fine on DevTest 9.5.2 and I have upgraded from 9.5.2 to 10.2 and local.properties file is having all the SSL configurations.

     

    ============================================================================ | HTTP ============================================================================ | Step: AuthenticationCode ---------------------------------------------------------------------------- | Message: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ---------------------------------------------------------------------------- | Trapped Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target | Trapped Message: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target ---------------------------------------------------------------------------- STACK TRACE javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:535) at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) at com.itko.lisa.test.CommTrans.doSend(CommTrans.java:1074) at com.itko.lisa.test.CommTrans.send(CommTrans.java:843) at com.itko.lisa.test.CommTrans.sendPOST(CommTrans.java:803) at com.itko.lisa.ws.rest.RESTNode.doSend(RESTNode.java:226) at com.itko.lisa.ws.rest.RESTNode.doWebTrans(RESTNode.java:171) at com.itko.lisa.ws.rest.RESTNodeBase.execute(RESTNodeBase.java:380) at com.itko.lisa.test.TestNode.executeNode(TestNode.java:984) at com.itko.lisa.test.TestCase.execute(TestCase.java:1297) at com.itko.lisa.test.TestCase.execute(TestCase.java:1198) at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183) at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1085) at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:72) at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:992) at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194) at java.lang.Thread.run(Thread.java:745) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491) ... 30 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 36 more ============================================================================

     

    Thanks,

    Narasimha.



  • 2.  Re: Error loading VS Model document: Could not initialize class com.itko.lisa.utils.ssl.VSESSLContext
    Best Answer

    Posted Mar 02, 2018 08:46 AM

    I do not know the exact problem except that it appears to be related to SSL.

    It would be best to open a ticket with CA Support so they can review your installation.

     

    I doubt that the VSESSLContext class is missing since this is in a JAR in LISA_HOME/lib/core.

    Upon opening the ticket, back track in order to rule configuration items out.  For example,

    - Install DevTest 10.2 without applying any security settings

    - Start the components and allow them to connect to the internal Derby database.

    - If successful and using an external DBMS, 

       - ensure the database is created with the correct codepage

       - connect to external DBMS, start everything and test

    - If successful, turn on DevTest SSL, retry everything

    - If successful, add JKS keys, etc. and test

    - ...  

    The idea is to enable features one at a time until you find the configuration that is creating the issue.

    I do not believe this was done, but do not copy/paste the 9.5.2 properties files into 10.2. Make changes to the .properties files on a line by line basis.  



  • 3.  Re: Error loading VS Model document: Could not initialize class com.itko.lisa.utils.ssl.VSESSLContext

    Posted Mar 12, 2018 05:28 PM

    Based on this fragment from the stack trace:  "unable to find valid certification path to requested target" there may be a self-signed certificate that's causing the problem.

     

    The VSESSLContext class has a static initializer that attempts to create two SSLContexts, one for the client and one for the server (i.e., the clientContext enables 2-way SSL, the serverContext enables 1-way SSL).  The clientContext is going to need the client keystore path and keystore password; the serverContext is going to need the server keystore path and server keystore password.   The default client keystore path is DEVTEST_HOME/webreckeys.ks or whatever lisa.default.keystore is set to.  The default server keystore path is DEVTEST_HOME/vse.ks or whatever ssl.server.cert.path is set to.   If creating either of these SSLContexts fails, the VSESSLContext class fails to initialize and the NoClassDefFoundException is thrown.

     

    To help troubleshooting, add -Djavax.net.debug=ssl to the vmoptions files (probably workstation and VSE, but it won't hurt to add it to the Coordinator.vmoptions and Simulator.vmoptions).  The SSL handshake debug messages may reveal where the SSL handshake is failing; especially, if its a certificate issue, which certificate is raising the error.