Error in external call of authentication service in Genexus15 - genexus

I am trying to execute a war created in Genexus 15, in a CentOs 7 server with an Apache tomcat 9, the version of jdk is 1.8, I am having an error when I call to an external authentication service of certificates for server and trustore keystore client.
The error is the folowing:
java.lang.IllegalArgumentException: object is not an instance of declaring class
Fin de Ejecucion servicio sin errores
MsgRetornoSOAP: NRO: ERROR -10001error decoding server
certificate: java.lang.ClassCastException:
org.bouncycastle.asn1.DERUnknownTag cannot be cast to
org.bouncycastle.asn1.DERString
Cod retorno
Mensaje Retorno
Error GXSOAP
java.lang.IllegalArgumentException: object is not an
instance of declaring class
gmid: 271431
It seems that is a problem with decodification.

Related

Caused by: java.io.IOException: Invalid keystore format

I have a JBoss 7.4.0 installation running in domain mode on a RHEL 7 platform. The JDK version is java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
I am using the Jboss documentation How to Configure Server Security, specifically section 2.5: Configuring SSL/TLS for the legacy core management authentication mechanism. I am setting up Two-Way SSL/TLS.
I create a keystore, generate key pairs, export and import certificates. The storetype is JCEKS. (I have also tried using PCKS12 and JKS, same issue)
When I try to start the JBoss server I see the following error:
06:47:41,216 INFO [org.jboss.modules] (main) JBoss Modules version 1.11.0.Final-redhat-00001
06:47:41,498 INFO [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final-redhat-00001
06:47:41,514 INFO [org.jboss.as.process.Host Controller.status] (main) WFLYPC0018: Starting process 'Host Controller'
[Host Controller] 06:47:41,982 INFO [org.jboss.modules] (main) JBoss Modules version 1.11.0.Final-redhat-00001
...
[Host Controller] 06:47:43,848 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-1) WFLYDM0111: Keystore /u01/redhat/jboss/domain_74/domain/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
[Host Controller] 06:47:43,851 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 5.0.20.SP1-redhat-00001
[Host Controller] 06:47:43,852 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service org.wildfly.core.management.security.realm.CertificateRealm.key-manager: org.jboss.msc.service.StartException in service org.wildfly.core.management.security.realm.CertificateRealm.key-manager: Failed to start service
[Host Controller] at org.jboss.msc#1.4.12.Final-redhat-00001//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
...
[Host Controller] Caused by: java.lang.IllegalStateException: org.jboss.msc.service.StartException in anonymous service: WFLYDM0018: Unable to start service
...
[Host Controller] Caused by: java.io.IOException: Invalid keystore format
So my understanding is the issue is with the keystore format, yet if I use another keystore format I get the same issue.
And, when I run the following command I get success:
./keytool -list -keystore $EAP_HOME/vault/h1vault.jceks
Enter keystore password:
Keystore type: JCEKS
Keystore provider: SunJCE
Your keystore contains 3 entries
h1server_alias, Sep 20, 2022, PrivateKeyEntry,
Certificate fingerprint (SHA-256): 58:58:36:82:EE:B5:88:BB:AF:59:F6:17:F2:9B:D3:29:D6:CC:DD:02:04:E5:3B:50:8A:70:AB:5C:85:59:DD:25
h1vault, Sep 20, 2022, SecretKeyEntry,
host2_alias, Sep 20, 2022, trustedCertEntry,
Certificate fingerprint (SHA-256): 62:07:76:CB:B7:B8:9C:89:6D:36:82:8B:5B:8A:E9:7E:8E:6A:23:8E:51:56:03:B9:F9:98:D3:DA:D4:53:B5:57
I would expect this command to fail if the keystore format was incorrect.
I have read all sorts of threads and so on about this but cannot find an answer.
Appreciate if anyone can suggest possible solutions.
Thanks

Error in OAuth mediator version WSO2 EI 7.0.2

I am trying to use OAuth mediator for validating an API . I am using WSO2IS as my IAM server . OAUth mediator is configured to connect WSO2IS server . using URL 'https://localhost:9443/services' while invoking i get followign exceptions . Please see Exception stack below
[
2020-05-27 13:47:27,939] WARN {org.apache.synapse.commons.util.MiscellaneousUtil} - Error loading properties from a file at from the System defined location: nhttp.properties
[2020-05-27 13:48:01,105]
INFO {org.apache.axis2.transport.http.HTTPSender} - Unable to sendViaPost to url[https://localhost:9443/services/OAuth2TokenValidationService]
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:450)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:276)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:186)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at
I have updated keystore and it was working

Application team getting JMSFMQ6312: An exception occurred in the Java(tm) MQI

We are currently using web-sphere MQ 8.0..4,On linux machine.
Siel application connect to our queue manager with jndi. property and .binding files,earlier application working fine.but application upgraded from version 18 to 19 version also they have upgraded the java version from 1.7 to 1.8,post up gradation, application team facing below error. but we dont see any error in Queue manager logs. error written in application logs.
Application using below upgraded jdk version
D:\>java -version,java version "1.8.0_172",Java(TM) SE Run-time Environment (build 1.8.0_172-b11),Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)
Application uses MQ to communicate with the external systems. application jndi.property and .binding files
below jar files are related to websphere MQ version 8.0.0.7.
File based (current in config) application team needed the below JAR files, we have given below jar to application team which is related to MQ version 8.0.0.7 to.
a) jms.jar
b) fscontext.jar
c) connector.jar
d) providerutil.jar
e) jta.jar - optional
f) ldap.jar - optional
g) com.ibm.mq.jar (IBM)
h) com.ibm.mqjms.jar (IBM)
i) dhbcore.jar (IBM)- for MQ 7.5
j) com.ibm.mq.commonservices.jar
k) com.ibm.mq.jmqi.jar
l) com.ibm.mq.jms.Nojndi.jar
we have tried to placed the latest MQ client version( MQ client 9.0.0.7) jar files and tried it,but no luck we are facing same issue.
Application team tried placing one JAR at a time.which is available in my queue manager, While they have placed the all the JAR except JMS.Jar application team faced the below error:
ErrorCode = JMS_EXCEPTION
ErrorMessage = Exception: com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
The Java(tm) MQI has thrown an exception describing the problem.
See the linked exception for further information.; Message: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
StackTrace = com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI.
The Java(tm) MQI has thrown an exception describing the problem.
While placed all the Jar files including Jms.jar we get this error:
[SIEL ERROR] Thread[http-nio-8080-exec-13,5,main] [2:36:01.393 PM Tue Jul 23: ] Error:JNdi File
[SIEL ERROR] Thread[http-nio-8080-exec-13,5,main] [2:36:01.393 PM Tue Jul 23: ] Errorjava.lang.NullPointerException
#Josh: We have placed the 4 com.ibm.mq.allclient.jar, jms.jar (most be v2.0), fscontext.jar, and providerutil.jar, jar files post changes we are not getting earlier error( JMSFMQ6312),but now facing different exception in logs,please check below error.
Thread[http-nio-8080-exec-43,5,main] [12:09:06.850 PM Mon Jul 29: ] Receive failed.
[SIEL ERROR] Thread[http-nio-8080-exec-43,5,main] [12:09:06.850 PM Mon Jul 29: ] Exception during Receive:
javax.naming.NameNotFoundException: crmCF
[SIEL ERROR] Thread[http-nio-8080-exec-39,5,main] [12:33:24.911 PM Mon Jul 29: ] Threw SielBusinessServiceException with
ErrorCode = JMS_EXCEPTION
ErrorMessage = Exception: com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2002: Failed to get a message from destination 'CRM.CUSTOMER.OUT'.
IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error.
Use the linked exception to determine the cause of this error.; Message: JMSWMQ2002: Failed to get a message from destination 'CRM.CUSTOMER.OUT'.
StackTrace = com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ2002: Failed to get a message from destination 'CRM.CUSTOMER.OUT'.
IBM MQ classes for JMS attempted to perform an MQGET; however IBM MQ reported an error.
but we can see channel is running fine,no impact on messages transfer, application team wants to know why they are getting this exception.
AMQ8417: Display Channel Status details.
CHANNEL(SIEL.CLIENT) CHLTYPE(SVRCONN)
CONNAME(xxx.xx.xx.xx) CURRENT
STATUS(RUNNING) SUBSTATE(RECEIVE)

Pivotal Cloud Foundry - Spring Cloud Services

I am trying to push the company app into Pivotal Cloud Foundry. The app should be bound with service registry. I didn't do any changes in application.yml file. I had have service-registry service in my Pivotal apps manager console. After I pushed my company app into PCF and binded with service-registry service. I did restage my company app. The app is not registered in the service registry console.
2016-06-06T11:25:36.72+0530 [APP/0] OUT Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://p-spring-cloud-services.uaa.******.com/oauth/token":sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin
d valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.securit
y.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
and
2016-06-06T05:49:35.000+00:00 [APP] OUT 2016-06-06 05:49:35.668 ERROR 22 --- [pool-5-thread-1] com.netflix.discovery.DiscoveryClient : DiscoveryClient_COMPANY/https://p-spring-cloud-services.uaa.******.com/oauth/token:****** - was unable to refresh its cache! status = Error requesting access token.
How to solve these issues?
The cause of problem is ssl certification for PCF. I think you are not uploaded ssl certificate to your environment.
Your PCF instance should have valid root certificates of your apps installed at their side and vice versa....

calling ejb3.0 in action class. application server : websphere7.0 and IDE: RAD7.5

I have written one stateless session bean and deployed in the server. when i tried to access that particular ejb, it's throwing error.
Code sample:
TestServiceBeanRemote : Remore bean
TestServiceBean : Actual bean
Context context = new InitialContext();
TestServiceBeanRemote test = (TestServiceBeanRemote)context.lookup("com.test.ejb.TestServiceBean");
test.hello("ejb3.0");
Error :
[5/23/11 14:27:00:250 IST] 0000001b SystemErr R javax.naming.NameNotFoundException: Context: gopatilbNode01Cell/nodes/gopatilbNode01/servers/server1, name: com.test.ejb.TestServiceBean: First component in name com.test.ejb.TestServiceBean not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
[5/23/11 14:27:00:250 IST] 0000001b SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4365)
**: Do i need to configure anything in was7.0 ? or do i need to write any xml file for jndi lookup in ejb3.0 ? please help.
The default bindings in WebSphere Application Server are the interface name (e.g., com.test.ejb.TestService) and <app>/<module>/<bean>#<interface> (e.g., MyTest.ear/test.jar/TestServiceBean#com.test.ejb.TestService). These can be changed during the deploy process or using ibm-ejb-jar-bnd.xml. More information is available in the EJB 3.0 application bindings overview InfoCenter topic.

Resources