Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
rid_rj
Contributor III
Contributor III

Erreur tJDBCConnection : Instruction fermée: getMetaData

Hello,

 

I I encountered a problem with reading data from  hybris database.

 

In the start, the job execute the sql request without problem but after some time i get the error 

[FATAL]: tJDBCInput_21 java.sql.SQLException: Instruction fermée: getMetaData

 

I don't understand why i get the data in 5 or 6 minutes after that i get this error.

 

In fact, there is a migration of hybris from 5.7 to 6.5, for the old version i used connection http to hybris

and for the new version i use https but i get a error of certificat :

[ERROR]: java.sql.SQLException: java.security.cert.CertificateException: No subject alternative names present

tJDBCConnection_1 java.sql.SQLException: java.security.cert.CertificateException: No subject alternative names present

 

How i can add this certificate in Talend ??

Thanks

 

 

 

 

Labels (4)
6 Replies
Anonymous
Not applicable

Hello,

Are you trying to import certification with the tSetKeyStore component to see if it works?

Best regards

Sabrina

rid_rj
Contributor III
Contributor III
Author

Thanks Sabrina.

I added the certification to JDK but the problem again exist 0683p000009MPcz.png

Anonymous
Not applicable

Hello,

How did you add certification to JDK?

Here is a related scenario about TalendHelpCenter:Extracting customer information from a private WSDL file

to see if you need keystore files in your work flow?

Best regards

Sabrina

rid_rj
Contributor III
Contributor III
Author

I added it by using this commande :

cd %JAVA_HOME%
bin\keytool -J-Duser.language=en -keystore jre\lib\security\cacerts -import -alias CERT_RECETTE -ext san=ip:'@IP' -file d:/certif.crt

But this not the solution.

I found another solution is to create this calss Java in routines to trust the certification

 

package routines;

import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;


public class TrustCertficate implements X509TrustManager  {

   
	public java.security.cert.X509Certificate[] getAcceptedIssuers() {
		   return null;
		}
	public void checkClientTrusted1(X509Certificate[] certs, String authType) {
	}

	public void checkServerTrusted1(X509Certificate[] certs, String authType) {
	}

	@Override
	 public void checkClientTrusted(java.security.cert.X509Certificate[]      paramArrayOfX509Certificate, String paramString)
	    throws CertificateException {
	  // TODO Auto-generated method stub

	}

	@Override
	public void checkServerTrusted(java.security.cert.X509Certificate[] paramArrayOfX509Certificate, String paramString)
	        throws CertificateException {
	    // TODO Auto-generated method stub
}
	
	public static void disableSSL() {
	      try {
	         TrustManager[] trustAllCerts = new TrustManager[] { new   TrustCertficate() };

	    // Install the all-trusting trust manager
	    SSLContext sc = SSLContext.getInstance("SSL");
	    sc.init(null, trustAllCerts, new java.security.SecureRandom());
	    HostnameVerifier allHostsValid = new HostnameVerifier() {
	        public boolean verify(String hostname, SSLSession session) {
	            return true;
	        }
	    };
	    HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
	    HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
	} catch (Exception e) {
	    e.printStackTrace();
	}}
	
}


just you need to call disableSSL in tjava component :

routines.TrustCertficate.disableSSL(); 

 

rid_rj
Contributor III
Contributor III
Author

Now, after solution of certification, i had the first problem :

tJDBCInput_21 java.sql.SQLException: Instruction fermée: getMetaData

so the problem is not in the certification, i can use the old method with http not https.

The problem is the connection closure after 5 or 6 minutes after execution.

I think it's a problem in hybris

 

Anonymous
Not applicable

Hi,

So far, we have no clue about your issue. Feel free to let us know if there is any further help we can give.

Best regards

Sabrina