Invalid WSDL - Certificate not trusted - Exception while publishing WSDL in OSR from HTTPS Server
Hi,
I am publishing a Web Service in OSR from an HTTPS Server. I am getting exception as
Error message:
WSDLException: faultCode=INVALID_WSDL: java.io.IOException: java.security.cert.CertificateException: Server certificate ....... is not trusted!
To remove this exception I have done following steps
a) Added Certificate from remote server in Identity Store of WebLogic Server using keytool utilitity
keytool -import -alias devCertificate -file c:/certificates/okdsoa.cer -truststore demoIdentityStore.jks
b) Added Certificate from remote server in the trust store of weblogic server using keytool utility
keytool -import -alias devCertificate -file c:/certificates/okdsoa.cer -truststore demoTrust.jks
This didnot help.
Then I imported certificate to OSR using PStoreTool command as
PStoreTool.bat add -config C:/OSRHome/registry111/conf/clientconf.xml -certFile c:/certificates/okdsoa.cer
Bounced the servers but that also didnot help.
Can you please suggest?
Thanks,
Parshant
I found the fix from Oracle Support Knowlededge Base
sslTool serverInfo --url https://HOST:9043 --certFile newcert.cer
PStoreTool located in REGISTRY_HOME/bin/PStoreTool add -config
WEBLOGIC_HOME/user_projects/domains/[osr_domain_name]/servers/[osr_server_name]/tmp/_WL_user/registry/[unique id]/public/conf/pstore.xml -certFile newcert.cer
I was updating wrong file with the certificate. It had to be pstore.xml. This solved my issue.
Thanks & Regards,
Parshant
Similar Messages
-
Certificate not Trusted Exception
Hi,
I am trying to invoke Axis soap call from webshpere (my requirement is to trust all certificates), but getting certificate not trusted exception. Appreciate any suggestions for fixing this issue.
Code:
public String transport(String strMessage, String strParticipantUrl, String methodName, String keyStorePwd) throws RouterException {
String result = null;
boolean isErrorOccured = false;
String errorMessage = null;
LOGGER.info("Calling Carrier Web Service.......");
LOGGER.info("Web Service URL is :" + strParticipantUrl);
LOGGER.info("Web Service Method Name is :" + methodName);
ServiceFactory serviceFactory = new ServiceFactory();
Service service = null;
try {
service = (Service) serviceFactory.createService(new QName(
FundTransferConstants.QNAME_SERVICE));
} catch (ServiceException e) {
isErrorOccured = true;
Integer connectionTimeOut = FundTransferContext.getInstance()
.getConnectionTimeOut();
org.apache.axis.client.Call call = null;
if (null != service) {
try {
LOGGER.info("setting ssl status to debug");
System.setProperty("javax.ssl.debug", "all");
String proxyHost = FundTransferUtil.getProperty("PROXY.HOST");
String proxyPort = FundTransferUtil.getProperty("PROXY.PORT");
String username = FundTransferUtil.getProperty("PROXY.USER");
String password = FundTransferUtil
.getProperty("PROXY.PASSWORD");
if (proxyHost != null && !"".equals(proxyHost)) {
System.setProperty("proxySet", "true");
System.setProperty("http.proxyHost", proxyHost);
if (proxyPort != null && !"".equals(proxyHost)) {
System.setProperty("http.proxyPort", proxyPort);
if (username != null && !"".equals(username)) {
System.setProperty("http.proxyUser", username);
if (password != null && !"".equals(password)) {
System.setProperty("http.proxyPassword", password);
String keyStoreLocation = FundTransferUtil
.getProperty("KEYSTORE_LOCATION");
String keystore = keyStoreLocation + "/"
+ FundTransferConstants.KEYSTORE_FILE_NAME;
String storetype = FundTransferConstants.KEYSTORE_FILE_TYPE;
String][ props = {
{ FundTransferConstants.TRUST_STORE, keystore, },
{ FundTransferConstants.KEY_STORE, keystore, },
{ FundTransferConstants.KEY_STORE_PWD, keyStorePwd, },
{ FundTransferConstants.KEY_STORE_TYPE, storetype, },
{ FundTransferConstants.TRUST_STORE_PWD, keyStorePwd, }, };
// Commented loading the keystore to test outbound calls
/*for (int index = 0; index < props.length; index++)
System.getProperties().setProperty(propsindex[0],
propsindex[1]);*/
// Commented all trusting trust manager
/*LOGGER.info("Creating TrustManager...");
TrustManager] trustAllCerts = new TrustManager[ { new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
LOGGER.info("Acception all issuers");
return null;
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs,
String authType) {
LOGGER.info("checkClientTrusted method");
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs,
String authType) {
LOGGER.info("checkServerTrusted method");
// Install the all-trusting trust manager
try {
LOGGER.info("Creating SSLContext...");
SSLContext sc = SSLContext.getInstance("SSL");
LOGGER.info("Created SSLContext..." + sc);
sc.init(null, trustAllCerts,
new java.security.SecureRandom());
LOGGER.info("Created SSLContext initiated...");
LOGGER.info("sslDefaultSocketFactory......"
+ sc.getSocketFactory());
HttpsURLConnection.setDefaultSSLSocketFactory(sc
.getSocketFactory());
LOGGER.info("sslDefaultSocketFactory......"
+ sc.getSocketFactory());
} catch (Exception e) {
LOGGER.error("Exception is occuring...");
LOGGER.error(e.getMessage());
call = (Call) service.createCall();
} catch (ServiceException ex) {
LOGGER.error(ex.getMessage());
errorMessage = ex.getMessage();
isErrorOccured = true;
if (null != call) {
LOGGER.info("Web Service TimeOut setting :"
+ connectionTimeOut.intValue());
LOGGER.info("Setting axis propeties to use IBMFakeTrustSocketFactory");
// This will allow web service requests using the HTTPS protocol without having a valid SSL certificate installed and configured.
AxisProperties.setProperty("axis.socketSecureFactory","org.apache.axis.components.net.IBMFakeTrustSocketFactory");
call.setTimeout(connectionTimeOut);
call.setTargetEndpointAddress(strParticipantUrl);
call.setProperty(Call.SOAPACTION_USE_PROPERTY,
new Boolean(true));
call.setProperty(Call.SOAPACTION_URI_PROPERTY,
FundTransferConstants.EMPTY_STRING);
QName qnameTypeStr = new QName(FundTransferConstants.NS_XSD,
FundTransferConstants.QNAME_TYPE);
QName header = new QName(FundTransferConstants.NS_XSD,
FundTransferConstants.QNAME_TYPE);
call.setReturnType(qnameTypeStr);
call
.setOperationStyle(FundTransferConstants.WEB_SERVICE_OPERATION_RPC_STYLE);
call
.setOperationName(new QName(
FundTransferConstants.BODY_NAMESPACE_VALUE,
methodName));
call.addParameter("String_1", qnameTypeStr, ParameterMode.IN);
String[] params = { strMessage };
if (FundTransferConstants.CARRIER_RESEND_METHOD
.equalsIgnoreCase(methodName)) {
try {
call.invoke(params);
} catch (Exception ex) {
errorMessage = ex.getMessage();
isErrorOccured = true;
LOGGER.info(ex.getMessage());
} else {
int counter = 0;
while (counter < 3) {
counter++;
try {
// Here making the call which is failing
result = (String) call.invoke(params);
counter = 4;
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
errorMessage = axisFault.getMessage();
isErrorOccured = true;
LOGGER.error(axisFault.getMessage());
} catch (Exception ex) {
ex.printStackTrace();
errorMessage = ex.getMessage();
isErrorOccured = true;
if (isErrorOccured) {
throw new RouterException(errorMessage);
return result;
System Error:
12/7/07 13:43:41:639 EST 000000bb SystemErr R AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted
at com.ibm.jsse2.bx.a(bx.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java:473)
at com.ibm.jsse2.w.a(w.java(Compiled Code))
at com.ibm.jsse2.w.a(w.java(Compiled Code))
at com.ibm.jsse2.v.a(v.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java(Compiled Code))
at com.ibm.jsse2.by.l(by.java(Compiled Code))
at com.ibm.jsse2.by.startHandshake(by.java(Compiled Code))
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:224)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.dtcc.insurance.fundtransfer.transport.TransportHandler.transport(TransportHandler.java:245)
at com.dtcc.insurance.fundtransfer.router.MessageRouter.transport(MessageRouter.java:112)
at com.dtcc.insurance.fundtransfer.controller.MessageController.processMessage(MessageController.java:155)
at com.dtcc.insurance.fundtransfer.service.FundTransferServiceImpl.fundTransferRequest(FundTransferServiceImpl.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3174)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:253)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:229)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1970)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:114)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:950)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:582)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1704)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.security.cert.CertificateException: Certificate not Trusted
at com.ibm.jsse.bi.a(Unknown Source)
at com.ibm.jsse.bi.checkServerTrusted(Unknown Source)
at com.ibm.jsse2.ba.checkServerTrusted(ba.java:16)
... 57 more
12/7/07 13:43:41:640 EST 000000bb SystemErr R AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted
at com.ibm.jsse2.bx.a(bx.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java:473)
at com.ibm.jsse2.w.a(w.java(Compiled Code))
at com.ibm.jsse2.w.a(w.java(Compiled Code))
at com.ibm.jsse2.v.a(v.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java(Compiled Code))
at com.ibm.jsse2.by.l(by.java(Compiled Code))
at com.ibm.jsse2.by.startHandshake(by.java(Compiled Code))
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:224)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.dtcc.insurance.fundtransfer.transport.TransportHandler.transport(TransportHandler.java:245)
at com.dtcc.insurance.fundtransfer.router.MessageRouter.transport(MessageRouter.java:112)
at com.dtcc.insurance.fundtransfer.controller.MessageController.processMessage(MessageController.java:155)
at com.dtcc.insurance.fundtransfer.service.FundTransferServiceImpl.fundTransferRequest(FundTransferServiceImpl.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3174)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:253)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:229)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1970)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:114)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:950)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:582)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1704)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.security.cert.CertificateException: Certificate not Trusted
at com.ibm.jsse.bi.a(Unknown Source)
at com.ibm.jsse.bi.checkServerTrusted(Unknown Source)
at com.ibm.jsse2.ba.checkServerTrusted(ba.java:16)
... 57 more
javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.dtcc.insurance.fundtransfer.transport.TransportHandler.transport(TransportHandler.java:245)
at com.dtcc.insurance.fundtransfer.router.MessageRouter.transport(MessageRouter.java:112)
at com.dtcc.insurance.fundtransfer.controller.MessageController.processMessage(MessageController.java:155)
at com.dtcc.insurance.fundtransfer.service.FundTransferServiceImpl.fundTransferRequest(FundTransferServiceImpl.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java(Compiled Code))
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3174)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:253)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:229)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1970)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:114)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:472)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:411)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:288)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:950)
at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:582)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1704)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificate not Trusted
at com.ibm.jsse2.bx.a(bx.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java:473)
at com.ibm.jsse2.w.a(w.java(Compiled Code))
at com.ibm.jsse2.w.a(w.java(Compiled Code))
at com.ibm.jsse2.v.a(v.java(Compiled Code))
at com.ibm.jsse2.by.a(by.java(Compiled Code))
at com.ibm.jsse2.by.l(by.java(Compiled Code))
at com.ibm.jsse2.by.startHandshake(by.java(Compiled Code))
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:224)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:157)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:114)
... 48 more
Caused by: java.security.cert.CertificateException: Certificate not Trusted
at com.ibm.jsse.bi.a(Unknown Source)
at com.ibm.jsse.bi.checkServerTrusted(Unknown Source)
at com.ibm.jsse2.ba.checkServerTrusted(ba.java:16)
... 57 moreI found the fix from Oracle Support Knowlededge Base
sslTool serverInfo --url https://HOST:9043 --certFile newcert.cer
PStoreTool located in REGISTRY_HOME/bin/PStoreTool add -config
WEBLOGIC_HOME/user_projects/domains/[osr_domain_name]/servers/[osr_server_name]/tmp/_WL_user/registry/[unique id]/public/conf/pstore.xml -certFile newcert.cer
I was updating wrong file with the certificate. It had to be pstore.xml. This solved my issue.
Thanks & Regards,
Parshant -
Keychain root certificate not trusted (?)
I see a couple of items in keychain access that say "root certificate not trusted"
what is this and should they be deleted or somehow modified?
I looked at certificates with Certificate assistant "evaluate certificate"
but do not quite understand.
ThanksOk I'll try not to...
Thanks -
Hi All,
While i'm trying to activate FORM (Interactive Form in Transaction SFP), i'm getting error -
ADS: com.adobe.ProcessingException: Class not found exception while loading class SAPForm, classpath: /usr/sap/AHS/DVEBMGS00/exe/jstart7 1.jar/usr/sap/AHS/DVEBMGS00/exe.
Could anyone let me know the way to resolve this issue.
Thanks and Regards,
SunilMany Thanks for the reply-It's working now
I added the MySQL connector in the following manner
1)Open the Tom Cat server console by Selecting 'Servers' in Package Explorer
2)Right Click 'Tomcat v5.5 at localhost.server'
3)Select 'Open Launch Configuration' under 'General Information'
4)Select the 'Classpath' tab in the Edit configuration window that opens
5)Select 'Add External Jars' and add the required connector -
Linksys Certificate Not Trusted
...how can I trust it? Every time I go to my Linksys router with HTTPS, I receive a certificate not trusted error in my browser. I have already imported the certificate into my keychain on OS X, what else can I do?
It would be great if there was a "Trust" option next to the various errors which are displayed.
O.S. = OS X 10.73
Browser = Chrome
Thanks in advance for any ideas.I am using a WRT54GS running firmware 4.70.6. Mozilla Firefox has the option to explicitly trust the certificate and Safari will use keychains certs to repudiate. Google Chrome (my primary browser) shows the following result.
Internet Explorer (9) shows the following, which is similar to the screen posted. I have tried to import the certificate into trusted publishers, but it won't take. -
This shows up in my certificates in red: com.apple.systemdefault organization system identity certificate not trusted. Should I be concerned about this...does it indicate a security breach?
Can you please let us know, how you have resolved the issue. We are also getting the similar issue with the Certificate.
-
Class not Found Exception while running an EJB
I have created and published a EJB in Oracle 8i (in a particular
schema) by running the deployejb tool supplied. The ejb was
published successfully. On running the client program I get an
error saying that the mybeans's HomeHelper class cannot be
found. This error occurs when there is a lookup to the home
interface of the bean. The exception thrown says Reasons are
unknown. On checking the objects of type 'JAVA CLASS' I found
that the homeHelper class object had been created automatically
be the deploy process. What is the reason for the class not
found exception and what can I do to correct it. ?
The code for the beans is as given below :
Home Interface
package mituser ;
import javax.ejb.*;
import java.rmi.RemoteException;
public interface MITUserHome extends EJBHome {
public MITUser create()
throws CreateException, RemoteException;
Remote Interface
package mituser ;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface MITUser extends EJBObject {
public int validateUserName (String username)
throws java.sql.SQLException, RemoteException;
public int validatePassword (String username, String password)
throws java.sql.SQLException, RemoteException;
public String validateSearchAccess (String username, String
password)
throws java.sql.SQLException, RemoteException;
Bean
package mituserServer ;
import java.sql.*;
import java.rmi.RemoteException;
import javax.ejb.*;
public class MITUserBean implements SessionBean {
SessionContext ctx;
public void ejbCreate() throws CreateException,
RemoteException {
public void ejbActivate() {
public void ejbPassivate() {
public void ejbRemove() {
public void setSessionContext(SessionContext ctx) {
this.ctx = ctx;
public int validateUserName (String username) throws
SQLException, RemoteException
int count = 0 ;
Connection conn =
new oracle.jdbc.driver.OracleDriver().defaultConnection ();
PreparedStatement ps =
conn.prepareStatement ("select count(username) from
useraccountinfo where username = ?");
try {
ps.setString (1, username);
ResultSet rset = ps.executeQuery ();
if (!rset.next ())
throw new RemoteException ("no registered user with User
Name " + username);
count = rset.getShort(1) ;
return count ;
} finally {
ps.close();
public int validatePassword (String username, String password)
throws SQLException, RemoteException
int count = 0 ;
Connection conn =
new oracle.jdbc.driver.OracleDriver().defaultConnection ();
PreparedStatement ps =
conn.prepareStatement ("select count(username) from
useraccountinfo where username = ? and password = ?");
try {
ps.setString (1, username);
ps.setString(2, password);
ResultSet rset = ps.executeQuery ();
if (!rset.next ())
throw new RemoteException ("Invalid Password ");
count = rset.getShort(1) ;
return count ;
} finally {
ps.close();
public String validateSearchAccess (String username, String
password) throws SQLException, RemoteException
String searchaccess = "" ;
Connection conn =
new oracle.jdbc.driver.OracleDriver().defaultConnection ();
PreparedStatement ps =
conn.prepareStatement ("select searchprofileaccess from
useraccountinfo where username = ? and password = ?");
try {
ps.setString (1, username);
ps.setString(2, password);
ResultSet rset = ps.executeQuery ();
if (!rset.next ())
throw new RemoteException ("Access Denied for " +
username );
searchaccess = rset.getString(1) ;
return searchaccess ;
} finally {
ps.close();
Client program
import mituser.MITUser;
import mituser.MITUserHome;
import oracle.aurora.jndi.sess_iiop.ServiceCtx;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Hashtable;
public class Client {
public static void main (String [] args) throws Exception {
int count = 0 ;
String access = "" ;
if (args.length != 4) {
System.out.println("usage: Client serviceURL objectName
user password");
System.exit(1);
String serviceURL = args [0];
String objectName = args [1];
String user = args [2];
String password = args [3];
Hashtable env = new Hashtable();
env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
env.put(Context.SECURITY_PRINCIPAL, user);
env.put(Context.SECURITY_CREDENTIALS, password);
env.put(Context.SECURITY_AUTHENTICATION,
ServiceCtx.NON_SSL_LOGIN);
Context ic = new InitialContext(env);
MITUserHome home = (MITUserHome)ic.lookup (serviceURL +
objectName);
MITUser testBean = home.create ();
count = testBean.validateUserName("MITA");
if (count > 0 )
System.out.println ("Valid User");
else
System.out.println ("Invalid User");
count = testBean.validatePassword("MITA", "MITA");
if (count > 0 )
System.out.println ("Valid Password");
else
System.out.println ("Invalid Password");
access = testBean.validateSearchAccess("MITA", "MITA");
if ( access.equalsIgnoreCase("YES") )
System.out.println ("Search Access Available");
else
System.out.println ("Search Access Denied");
The Descriptor file
// MIT UserBean EJB deployment descriptor
SessionBean mituserServer.MITUserBean {
BeanHomeName = "test/mitUserJDBCBean";
RemoteInterfaceClassName = mituser.MITUser;
HomeInterfaceClassName = mituser.MITUserHome;
AllowedIdentities = {MIT};
SessionTimeout = 20;
StateManagementType = STATEFUL_SESSION;
RunAsMode = CLIENT_IDENTITY;
TransactionAttribute = TX_REQUIRED;
Batch File for deploying the ejb
@echo off
if (%ORACLE_HOME%)==() goto usage
if (%ORACLE_SERVICE%)==() goto usage
if (%JDK_CLASSPATH%)==() goto usage
@echo on
set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
\jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
JDK_CLASSPATH%
javac -g mituser\MITUser.java
javac -g mituser\MITUserHome.java
javac -g mituserServer\MITUserBean.java
jar cf0 mituser.jar mituser\MITUser.class
mituser\MITUserHome.class mituserServer\MITUserBean.class
javac -g Client.java
call deployejb -republish -temp temp -u mit -p mit -s %
ORACLE_SERVICE% -descriptor mituser.ejb mituser.jar
@echo off
goto done
:usage
@echo -------------------------------------------------------
@echo Following are the requirements to run this script
@echo set ORACLE_HOME to installed Oracle home
@echo set ORACLE_SERVICE to the CORBA service name of
your databae
@echo for example sess_iiop://localhost:2481:ORCL
@echo set JDK_CLASSPATH to the full path of your JDK
classes.zip
@echo -------------------------------------------------------
:done
Batch file for running the cleint program
@echo off
if (%ORACLE_HOME%)==() goto usage
if (%ORACLE_SERVICE%)==() goto usage
if (%JDK_CLASSPATH%)==() goto usage
@echo on
set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
\jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
JDK_CLASSPATH%;server_generated.jar
java Client %ORACLE_SERVICE% /test/mitUserJDBCBean mit mit
@echo off
goto done
:usage
@echo -------------------------------------------------------
@echo Following are the requirements to run this script
@echo set ORACLE_HOME to installed Oracle home
@echo set ORACLE_SERVICE to the CORBA service name of
your databae
@echo for example sess_iiop://localhost:2481:ORCL
@echo set JDK_CLASSPATH to the full path of your JDK
classes.zip
@echo -------------------------------------------------------
:done
I know this is not strictly to do with JDBC but there appears to
be no discussion forum for EJB
Hoping for a response soon as it us very URGENT
Thanks
Mita
nullI have created and published a EJB in Oracle 8i (in a particular
schema) by running the deployejb tool supplied. The ejb was
published successfully. On running the client program I get an
error saying that the mybeans's HomeHelper class cannot be
found. This error occurs when there is a lookup to the home
interface of the bean. The exception thrown says Reasons are
unknown. On checking the objects of type 'JAVA CLASS' I found
that the homeHelper class object had been created automatically
be the deploy process. What is the reason for the class not
found exception and what can I do to correct it. ?
The code for the beans is as given below :
Home Interface
package mituser ;
import javax.ejb.*;
import java.rmi.RemoteException;
public interface MITUserHome extends EJBHome {
public MITUser create()
throws CreateException, RemoteException;
Remote Interface
package mituser ;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface MITUser extends EJBObject {
public int validateUserName (String username)
throws java.sql.SQLException, RemoteException;
public int validatePassword (String username, String password)
throws java.sql.SQLException, RemoteException;
public String validateSearchAccess (String username, String
password)
throws java.sql.SQLException, RemoteException;
Bean
package mituserServer ;
import java.sql.*;
import java.rmi.RemoteException;
import javax.ejb.*;
public class MITUserBean implements SessionBean {
SessionContext ctx;
public void ejbCreate() throws CreateException,
RemoteException {
public void ejbActivate() {
public void ejbPassivate() {
public void ejbRemove() {
public void setSessionContext(SessionContext ctx) {
this.ctx = ctx;
public int validateUserName (String username) throws
SQLException, RemoteException
int count = 0 ;
Connection conn =
new oracle.jdbc.driver.OracleDriver().defaultConnection ();
PreparedStatement ps =
conn.prepareStatement ("select count(username) from
useraccountinfo where username = ?");
try {
ps.setString (1, username);
ResultSet rset = ps.executeQuery ();
if (!rset.next ())
throw new RemoteException ("no registered user with User
Name " + username);
count = rset.getShort(1) ;
return count ;
} finally {
ps.close();
public int validatePassword (String username, String password)
throws SQLException, RemoteException
int count = 0 ;
Connection conn =
new oracle.jdbc.driver.OracleDriver().defaultConnection ();
PreparedStatement ps =
conn.prepareStatement ("select count(username) from
useraccountinfo where username = ? and password = ?");
try {
ps.setString (1, username);
ps.setString(2, password);
ResultSet rset = ps.executeQuery ();
if (!rset.next ())
throw new RemoteException ("Invalid Password ");
count = rset.getShort(1) ;
return count ;
} finally {
ps.close();
public String validateSearchAccess (String username, String
password) throws SQLException, RemoteException
String searchaccess = "" ;
Connection conn =
new oracle.jdbc.driver.OracleDriver().defaultConnection ();
PreparedStatement ps =
conn.prepareStatement ("select searchprofileaccess from
useraccountinfo where username = ? and password = ?");
try {
ps.setString (1, username);
ps.setString(2, password);
ResultSet rset = ps.executeQuery ();
if (!rset.next ())
throw new RemoteException ("Access Denied for " +
username );
searchaccess = rset.getString(1) ;
return searchaccess ;
} finally {
ps.close();
Client program
import mituser.MITUser;
import mituser.MITUserHome;
import oracle.aurora.jndi.sess_iiop.ServiceCtx;
import javax.naming.Context;
import javax.naming.InitialContext;
import java.util.Hashtable;
public class Client {
public static void main (String [] args) throws Exception {
int count = 0 ;
String access = "" ;
if (args.length != 4) {
System.out.println("usage: Client serviceURL objectName
user password");
System.exit(1);
String serviceURL = args [0];
String objectName = args [1];
String user = args [2];
String password = args [3];
Hashtable env = new Hashtable();
env.put(Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
env.put(Context.SECURITY_PRINCIPAL, user);
env.put(Context.SECURITY_CREDENTIALS, password);
env.put(Context.SECURITY_AUTHENTICATION,
ServiceCtx.NON_SSL_LOGIN);
Context ic = new InitialContext(env);
MITUserHome home = (MITUserHome)ic.lookup (serviceURL +
objectName);
MITUser testBean = home.create ();
count = testBean.validateUserName("MITA");
if (count > 0 )
System.out.println ("Valid User");
else
System.out.println ("Invalid User");
count = testBean.validatePassword("MITA", "MITA");
if (count > 0 )
System.out.println ("Valid Password");
else
System.out.println ("Invalid Password");
access = testBean.validateSearchAccess("MITA", "MITA");
if ( access.equalsIgnoreCase("YES") )
System.out.println ("Search Access Available");
else
System.out.println ("Search Access Denied");
The Descriptor file
// MIT UserBean EJB deployment descriptor
SessionBean mituserServer.MITUserBean {
BeanHomeName = "test/mitUserJDBCBean";
RemoteInterfaceClassName = mituser.MITUser;
HomeInterfaceClassName = mituser.MITUserHome;
AllowedIdentities = {MIT};
SessionTimeout = 20;
StateManagementType = STATEFUL_SESSION;
RunAsMode = CLIENT_IDENTITY;
TransactionAttribute = TX_REQUIRED;
Batch File for deploying the ejb
@echo off
if (%ORACLE_HOME%)==() goto usage
if (%ORACLE_SERVICE%)==() goto usage
if (%JDK_CLASSPATH%)==() goto usage
@echo on
set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
\jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
JDK_CLASSPATH%
javac -g mituser\MITUser.java
javac -g mituser\MITUserHome.java
javac -g mituserServer\MITUserBean.java
jar cf0 mituser.jar mituser\MITUser.class
mituser\MITUserHome.class mituserServer\MITUserBean.class
javac -g Client.java
call deployejb -republish -temp temp -u mit -p mit -s %
ORACLE_SERVICE% -descriptor mituser.ejb mituser.jar
@echo off
goto done
:usage
@echo -------------------------------------------------------
@echo Following are the requirements to run this script
@echo set ORACLE_HOME to installed Oracle home
@echo set ORACLE_SERVICE to the CORBA service name of
your databae
@echo for example sess_iiop://localhost:2481:ORCL
@echo set JDK_CLASSPATH to the full path of your JDK
classes.zip
@echo -------------------------------------------------------
:done
Batch file for running the cleint program
@echo off
if (%ORACLE_HOME%)==() goto usage
if (%ORACLE_SERVICE%)==() goto usage
if (%JDK_CLASSPATH%)==() goto usage
@echo on
set CLASSPATH=.;%ORACLE_HOME%\lib\aurora_client.jar;%ORACLE_HOME%
\jdbc\lib\classes111.zip;%ORACLE_HOME%\sqlj\lib\translator.zip;%
ORACLE_HOME%\lib\vbjorb.jar;%ORACLE_HOME%\lib\vbjapp.jar;%
JDK_CLASSPATH%;server_generated.jar
java Client %ORACLE_SERVICE% /test/mitUserJDBCBean mit mit
@echo off
goto done
:usage
@echo -------------------------------------------------------
@echo Following are the requirements to run this script
@echo set ORACLE_HOME to installed Oracle home
@echo set ORACLE_SERVICE to the CORBA service name of
your databae
@echo for example sess_iiop://localhost:2481:ORCL
@echo set JDK_CLASSPATH to the full path of your JDK
classes.zip
@echo -------------------------------------------------------
:done
I know this is not strictly to do with JDBC but there appears to
be no discussion forum for EJB
Hoping for a response soon as it us very URGENT
Thanks
Mita
null -
Firefox blocks sites certificate not trusted
I reset firefox to try and cure a email printing issue where firefix was printing all emails in tiny font. After the reset firefox would not access sites like google because the certificate was not trusted. I tried turning off my security system - Norton - but that didn't correct the problem. I also reinstalled firefox but the problem persisted. Also made sure that I had the proper time set in the computer. I'm using IE to get my emails and access sites that firefox is blocking me from but would like to cure the firefox issue.
hello, a possible solution depends on different factors:
* what is the '''error code''' shown under ''technical details'' on the error page?
in case the error code equals ''sec_error_unknown_issuer'', please attempt to add an exception on the bottom of the error page & inspect the certificate (see the screenshot attached for instructions):
* which '''issuer information''' does the certificate contain?
thank you!
[["This Connection is Untrusted" error message appears - What to do]] -
This Connection is untrusted (issuer certificate not trusted)
For the past week I have been unable access internet sites via firefox. I keep getting the "The connection is untrusted" error. It does not matter what site, be it google, Mozilla or Yahoo mail.
I have deleted the cert8.db file, cleaned my history and cache and reset firefox but nothing helps. When I go through the "I understand the risk" steps the sites load but not properly. Usually no pictures will load.www.google.com uses an invalid security certificate.
The certificate is not trusted because the issuer certificate is not trusted.
(Error code: sec_error_untrusted_issuer)
It is a work computer and I believe we use McAffee.
I follow the other directions and viewed the certificate. All looks OK, my time is correct, the certificate isn't set to expire till sometime in October. -
Safari 5.1.7 "Invalid URL" & "certificate not valid"-Google won't even work! HELP
I have the newest version of Safari and as far as I know everything else on my computer is up-to-date. I checked for a software update and it claims everything is up to date. This has been happening for a little while and started with the invalid site certificates. I never was sure if I should click "continue" or "cancel". I first was clicking cancel and continue trying to see what changed. Cancel would keep me on the same page (I think, if I remember correctly) and continue would usually take me to the desired site. But recently this problem with site certificates has been happening more and more on different sites (I believe it began on facebook; and on sites I use daily). I just tried to google the problem and of course a web page of "Invalid URL" comes up. So I tried to see if it would work on a different browser (Firefox and Chrome), I had the same problem on those two, too, which makes me think a Google problem. However, this happens on other sites, such as facebook, and the site doesn't work for a little while (usually a period of X minutes). Even when I completely quit Safari, this doesnt change.
I reset Safari tonight, and I've cleared the cookies, and I've emptied the cache, but nothing seems to be working. Im starting to wonder if there is a way to downgrade just one version of Safari to see if maybe this is a bug on this version of Safari, but I have no idea if that's possible or if it'll work.
Please help!I hear ya...irritating as ****. It's on all the other I've followed th other threads and tried the fixes, so far nothing. Hit me up if you ever find a workable solution other than going back to a PC. :s You'd think Apple would've fixed this by now, cause they're supposedly very very very very good.
-
Digital ID certificate not trusted
I'm trying to add digital ID certificates for governmental employees with whom I communicate by e-mail. I used an e-mail including those certificates (*.cer format) to transmit the certs to the new IPad, and I was able to install them, but they are all listed as "Not Trusted". How do I go about designating that they are to be trusted?
I also added my own digital ID cert (*pfx format), and it has exactly the same situation: installed, but "not trusted."
Thanks.Thanks for reply but the message comes up every time I log into Santander. Interestingly this happens on Safari and Chrome but if I use my old browser Camino it comes up as secure. Will ring Santander again today and my ISP to see if they can shed any light. The same issue has occurred on ebay too but that seems to have resolved itself. Will let you know if I make any progress
-
Hi,
We have a requirement to purge the Azure WADLogs table on a periodic basis. We are achieving this by using Entity group transactions to delete the
records older than 15 days. The logic is like this.
bool recordDoesNotExistExceptionOccured = false;
CloudTable wadLogsTable = tableClient.GetTableReference(WADLogsTableName);
partitionKey = "0" + DateTime.UtcNow.AddDays(noOfDays).Ticks;
TableQuery<WadLogsEntity> buildQuery = new TableQuery<WadLogsEntity>().Where(
TableQuery.GenerateFilterCondition("PartitionKey",
QueryComparisons.LessThanOrEqual, partitionKey));
while (!recordDoesNotExistExceptionOccured)
IEnumerable<WadLogsEntity> result = wadLogsTable.ExecuteQuery(buildQuery).Take(1000);
//// Batch entity delete.
if (result != null && result.Count() > 0)
Dictionary<string, TableBatchOperation> batches = new Dictionary<string, TableBatchOperation>();
foreach (var entity in result)
TableOperation tableOperation = TableOperation.Delete(entity);
if (!batches.ContainsKey(entity.PartitionKey))
batches.Add(entity.PartitionKey, new TableBatchOperation());
// A Batch Operation allows a maximum 100 entities in the batch which must share the same PartitionKey.
if (batches[entity.PartitionKey].Count < 100)
batches[entity.PartitionKey].Add(tableOperation);
// Execute batches.
foreach (var batch in batches.Values)
try
await wadLogsTable.ExecuteBatchAsync(batch);
catch (Exception exception)
// Log exception here.
// Set flag.
if (exception.Message.Contains(ResourceDoesNotExist))
recordDoesNotExistExceptionOccured = true;
break;
else
break;
My questions are:
Is this an efficient way to purge the WADLogs table? If not, what can make this better?
Is this the correct way to handle the "Specified resource does not exist exception"? If not, how can I make this better?
Would this logic fail in any particular case?
How would this approach change if this code is in a worker which has multiple instances deployed?
I have come up with this code by referencing the solution given
here by Keith Murray.Hi Nikhil,
Thanks for your posting!
I tested your and Keith's code on my side, every thing worked fine. And when result is null or "result.count()<0", the While() loop is break. I found you code had some logic to handle the error "ResourceDoesNotExist" .
It seems that the code worked fine. If you always occurred this error, I suggest you could debug your code and find which line of code throw the exception.
>> Is this an efficient way to purge the WADLogs table? If not, what can make this better?
Base on my experience, we could use code (like the above logic code) and using the third party tool to delete the entities manually. In my opinion, I think the code is every efficient, it could be auto-run and save our workload.
>>Is this the correct way to handle the "Specified resource does not exist exception"? If not, how can I make this better?
In you code, you used the "recordDoesNotExistExceptionOccured " as a flag to check whether the entity is null. It is a good choice. I had tried to deleted the log table entities, but I used the flag to check the result number.
For example, I planed the query result count is 100, if the number is lower than 100, I will set the flag as false, and break the while loop.
>>Would this logic fail in any particular case?
I think it shouldn't fail. But if the result is "0", your while loop will always run. It will never stop. I think you could add "recordDoesNotExistExceptionOccured
= true;" into your "else" block.
>>How would this approach change if this code is in a worker which has multiple instances deployed?
You don't change anything expect the "else" block. It would work fine on the worker role.
If any question about this issue, please let me know free.
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Apple root certificates not trusted?
I was looking through Keychain Access, and came across these two Apple root certificates that Keychain reports as "This root certificate is not trusted."
com.apple.kerberos.kdc
com.apple.systemdefault
There was also a "localhost" certificate with a Comcast email address that was similarly marked as not trusted.
Any idea why any of these would not be trusted?
Thanks,
JCYes, reinstalling is the backup plan.
But this Macbook is about one year old. I should not cause that much trouble. -
Hello all.......
I have issues w/ "com.apple.systemdefault" certificate (& other Apple certificates) not being trusted... I have yet to find a response to queries re: same.... Is this something no one can answer OR maybe a too simple a problem to take time with?
TIA, JackHello all.......
I have issues w/ "com.apple.systemdefault" certificate (& other Apple certificates) not being trusted... I have yet to find a response to queries re: same.... Is this something no one can answer OR maybe a too simple a problem to take time with?
TIA, Jack -
Irdeto certificate, not trusted by iPad, why
I've just joined EE film. When I've tried to download, not stream, a film, to my ipad, the EE app require an Ideto Certificate. When I've started to download the certificate, ipad says this is not trusted.
Any ideas why & should I download it anyway?Having spoken to the EE help desk re this problem. They told me it now appears that you can't play any EE films on apple products as Apple have restricted it. So I am all Appled up & can't play any films from EE. Having only swithced to EE for this reason I'm now stuck with an Iphone 5 I didn't need. GREAT!
Maybe you are looking for
-
Grey screen appears at startup the install disc is not recognised & will not eject every boot is met with grey screen revolving apple logo&folder&circle with diagonal and console error says start up item is in the trash also cannot access external Fi
-
Approver Invoice history (AP Module)
Hello All, I am a beginner to EBS and currently learning AP module. I have a quick question and hoping to get some assistance The question is, Is there any "find" function in AP module where an approver could see one year old approved invoices?? I ha
-
I need help with smart builds.
*1st thing I want to do:* Show a big picture, then have it shrink and move to the bottom left corner at the same time *2nd thing I want to do* Show a large picture of a house, then zoom in to the truss of that house, while the masking region stays th
-
Is there a point in buying HD movies on iTunes?
I have a 13.3" MacBook Pro, Basic model. I was browsing movies on iTunes and was thinking of buying one. It's $9.99 for the regular version and $12.99 for the HD version. My husband said there's no point in buying the HD version as my computer wil
-
All of sudden, I am unable to highlight a portion of text, or drag music or photos. I can't seem to right-click anymore either. Help!