Showing posts with label cars. Show all posts
Showing posts with label cars. Show all posts

Tuesday, April 7, 2015

Authenticator is not instantiated via the properties constructor

I am triggering a SOAP request from SOAP UI to a custom gateway of cordys environment which accepts user credentials in SOAP header.

For Ex :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ns="http://corp.alahli.com/middlewareservices/header/1.0/" xmlns:ns1="http://corp.alahli.com/middlewareservices/test/1.0/">
<soapenv:Header>
<oas:Security>
<oas:UsernameToken>
<oas:Username>${#Project#username}</oas:Username>
<oas:Password>${#Project#password}</oas:Password>
</oas:UsernameToken>
</oas:Security>
</soapenv:Header>
<soapenv:Body>
<!-- Main SOAP Request which is connected to service group SG1-->
</soapenv:Body>
</soapenv:Envelope>

Content which is shown in green color is the security information which I am passing from SOAP UI. I hope people are well aware what ${#Project#username} stands for (i.e., I am reading credentials from properties of SOAP Project).

Let's say the request is targeted to service group SG1 in this case. 

As we know that any cordys service is served using SAMLArt. In this case the SAMLArt will be provided by the custom gateway to the application container. Now when the custom gateway tries to get the SAMLArt it uses the property of the application container. If it does not find the property it might throw you an error which was my case.

I encountered an exception which says something like this,

com.eibus.security.authentication.InvalidAuthenticatorException: Authenticator is not instantiated through the properties constructor.
at com.eibus.security.authentication.AuthenticatorFactory.getAuthenticator(AuthenticatorFactory.java:78)
at com.eibus.security.identity.WSSecurityUsernameTokenIdentityType.validate(WSSecurityUsernameTokenIdentityType.java:64)
at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:349)
at com.eibus.soap.SOAPTransaction.<init>(SOAPTransaction.java:175)
at com.eibus.soap.Processor.onReceive(Processor.java:970)
at com.eibus.soap.Processor.onReceive(Processor.java:943)
at com.eibus.connector.nom.Connector.onReceive(Connector.java:417)
at com.eibus.transport.Middleware$NonTransactionalWorkerThreadBody.run(Middleware.java:1758)
at com.eibus.util.threadpool.WorkerThread.run(WorkerThread.java:64)

Now I found out the property that was missing i.e., the authenticator class. We need to add the authenticator property to the service group that was implementing my service. This should be done by using LDAP explorer,

The property which is to be added is below,

<authenticator implementation="com.eibus.security.authentication.CARSAuthenticator" /> 

Since I am using CARSAuthenticator in my case. This should be added to the service group SG1 (in the above explained scenario). An example of such updation can be found below,



 

Wednesday, February 5, 2014

Unable to start CARS Error 1067



When we try to restart cars we faced the error "Unable to start CARS ERROR 1067"


Reason :

Cars DB (berkely DB) is corrupted and hence has to be rolled back.

Resolution :

As a resolution to the above problem we have to recover the database of cars. Unfortunately there is no GUI to do this operation and one has to do it from command prompt,

The following command has to be executed,
db_recover -v -h "c:\Cordys\AdminRepositoryServer\CU17\bdb"

Note : This command has to be executed from the path "c:\Cordys\AdminRepositoryServer\CU17\bin"

above command can also be executed to a particular timestamp by using the parameter -t yyyyMMddHHmmSS (the modified time of the bdb folder).
db_recover -v -h "<<bdbFolder>>" -t "yyyyMMddHHmmSS"

A Sample error from event viewer captured in my case was given below,

Faulting application name: slapd.exe, version: 0.0.0.0, time stamp: 0x4c87499e
Faulting module name: MSVCR80.dll, version: 8.0.50727.4940, time stamp: 0x4ca2b4dd
Exception code: 0xc000000d
Fault offset: 0x0000000000056460
Faulting process id: 0x1378
Faulting application start time: 0x01cf2251bc1c2e2d
Faulting application path: D:\Program Files\Cordys\bop41cu6\bin\slapd.exe
Faulting module path: C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4940_none_88df89932faf0bf6\MSVCR80.dll

Report Id: fa9850c0-8e44-11e3-9814-005056c00008


--------------------------------------------------------------------------------------------------------
[Update : 06 Sept 2019] 

Before attempting db recovery, try to remove alock file which will be present in bdb folder and restart once. Even if the problem persists, then go for db recovery.

-- Credits @Mahipal Reddy