Issue in Spring Boot Collibra integration with the Marketplace library
I am trying to access Collibra assets via Spring Boot application using Collibra Marketplace Integration library(1.0.2) but am getting below exception :
Caused by: java.lang.IllegalStateException: original request is required
I have provided all the connection settings , as per the documentation(Host,username,password,proxy_host,proxy_port), but still its not working.
shashikumari
8 comments
springboot_team
Hello Saumya,
Regarding the SAPBOAPIRequest class error, can you please provide the following information:
Thank you
saumyasrivastava
@spring-team.collibra.com I am getting below error when running the SAP BO Integration. Could you please help?
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2022-02-16 13:38:34,417 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘SAPBOAPIRequest’: Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.collibra.marketplace.sap.businessobjects.component.SAPBOAPIRequest] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@6d5380c2]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:289) ~[spring-beans-5.3.13.jar:5.3.13]
shashikumari
OPThanks team, My issue is resolved.
springboot_team
Hello Shashi,
Thanks for the trying the Collibra Integration Library.
To be able to help you with this error we would require some more information to understand what caused it.
Therefore, can you please let us know:
At which stage does it fail (e.g. during/after the Spring Boot integration being started)?
Which classes/methods of the Collibra Integration library are being used?
Whether the properties – collibra.url, collibra.username, collibra.password, collibra.proxy.host, collibra.proxy.port, collibra.proxy.username, and collibra.proxy.password – are defined in the Spring Boot application properties file (assuming basic authentication with a proxy connection)?
Additionally, would it be possible to provide the full stack trace and maybe the previous few log records? (If so and they do not contain any sensitive information they can posted it here, otherwise, we can provide an alternative method.)
Thank you
shashikumari
OPHi Team,
Thanks for your reply. Below are the required details :
At which stage does it fail (e.g. during/after the Spring Boot integration being started)?
Its failing while connecting to Collibra platform. Basically in code its failing at getAsset call to assetsApi that am getting via below call.
AssetsApi assetsApi = apiClient.buildClient(AssetsApi.class);
assetsApi.getAsset(UUID.fromString(testUUID)); ----> failing here
Which classes/methods of the Collibra Integration library are being used?
I am using below classes from the integration library (1.0.2):
import com.collibra.marketplace.library.generated.core.ApiClient;
import com.collibra.marketplace.library.generated.core.api.AssetsApi;
import com.collibra.marketplace.library.generated.core.model.AssetImpl;
Yes, there is no username & password for proxy so that’s not provided , apart from that all other properties are properly defined in application.properties file.
Below is log trace when we run this application :
2021-11-30 10:06:03.357 INFO 20420 — [ main] c.rabo.testhelloworld.Demo1Application : Started Demo1Application in 5.216 seconds (JVM running for 6.446)
2021-11-30 10:06:06.441 WARN 20420 — [ main] o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: “Set-Cookie: AWSALB=Rz7tNCkX0XOARw82hTXNOSvK8jgG6gU5hHdn9N6sfZRaZVVOnhPJ5glpBEU4dVEjhrSYd7Xox/Vq+VsA9Cg4q2ck87TJx2VEGVgzChXow+o00P2cu3xHCasPIe0J; Expires=Tue, 07 Dec 2021 09:06:05 GMT; Path=/”. Invalid ‘expires’ attribute: Tue, 07 Dec 2021 09:06:05 GMT
2021-11-30 10:06:06.442 WARN 20420 — [ main] o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: “Set-Cookie: AWSALBCORS=Rz7tNCkX0XOARw82hTXNOSvK8jgG6gU5hHdn9N6sfZRaZVVOnhPJ5glpBEU4dVEjhrSYd7Xox/Vq+VsA9Cg4q2ck87TJx2VEGVgzChXow+o00P2cu3xHCasPIe0J; Expires=Tue, 07 Dec 2021 09:06:05 GMT; Path=/; SameSite=None; Secure”. Invalid ‘expires’ attribute: Tue, 07 Dec 2021 09:06:05 GMT
2021-11-30 10:06:06.447 WARN 20420 — [ main] c.c.m.library.generated.core.ApiClient : Retrying the HTTP request to the Collibra Platform. Attempt: 1
2021-11-30 10:06:09.810 WARN 20420 — [ main] o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: “Set-Cookie: AWSALB=X8LR0ZfwNenmU1zM1BkvHmg+HKYE/q/ljS+GMOb00F7m1q2MCbK8ZU6UFgv7A/BfGxT6aOkDa5KN4gf9J16ba1QDCrXVZGCXBjew+7ZggkidUXjJ/NoTGlDwTsQv; Expires=Tue, 07 Dec 2021 09:06:09 GMT; Path=/”. Invalid ‘expires’ attribute: Tue, 07 Dec 2021 09:06:09 GMT
2021-11-30 10:06:09.811 WARN 20420 — [ main] o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: “Set-Cookie: AWSALBCORS=X8LR0ZfwNenmU1zM1BkvHmg+HKYE/q/ljS+GMOb00F7m1q2MCbK8ZU6UFgv7A/BfGxT6aOkDa5KN4gf9J16ba1QDCrXVZGCXBjew+7ZggkidUXjJ/NoTGlDwTsQv; Expires=Tue, 07 Dec 2021 09:06:09 GMT; Path=/; SameSite=None; Secure”. Invalid ‘expires’ attribute: Tue, 07 Dec 2021 09:06:09 GMT
2021-11-30 10:06:09.812 WARN 20420 — [ main] c.c.m.library.generated.core.ApiClient : Retrying the HTTP request to the Collibra Platform. Attempt: 2
2021-11-30 10:06:14.179 WARN 20420 — [ main] o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: “Set-Cookie: AWSALB=96BcwXjZwT1etmkjbcUWW9tifzQ7QcfaoDcWpt0Z1JVM/N7ASI6AHv3kMcRhyBEb23sFI5Ag9ybR0Z5gdUiquk5BCQjeotcvOlGuI1O3tDZq+CYIp0ALQ0NF00SY; Expires=Tue, 07 Dec 2021 09:06:14 GMT; Path=/”. Invalid ‘expires’ attribute: Tue, 07 Dec 2021 09:06:14 GMT
2021-11-30 10:06:14.180 WARN 20420 — [ main] o.a.h.c.protocol.ResponseProcessCookies : Invalid cookie header: “Set-Cookie: AWSALBCORS=96BcwXjZwT1etmkjbcUWW9tifzQ7QcfaoDcWpt0Z1JVM/N7ASI6AHv3kMcRhyBEb23sFI5Ag9ybR0Z5gdUiquk5BCQjeotcvOlGuI1O3tDZq+CYIp0ALQ0NF00SY; Expires=Tue, 07 Dec 2021 09:06:14 GMT; Path=/; SameSite=None; Secure”. Invalid ‘expires’ attribute: Tue, 07 Dec 2021 09:06:14 GMT
java.lang.IllegalStateException: original request is required
at feign.Util.checkState(Util.java:129)
at feign.Response.(Response.java:34)
at feign.Response.(Response.java:25)
at feign.Response$Builder.build(Response.java:135)
at feign.httpclient.ApacheHttpClient.toFeignResponse(ApacheHttpClient.java:190)
at feign.httpclient.ApacheHttpClient.execute(ApacheHttpClient.java:88)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:119)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
at com.sun.proxy.$Proxy69.getAsset(Unknown Source)
at com.rabo.testhelloworld.CollibraIntegration.callApi(CollibraIntegration.java:43)
at com.rabo.testhelloworld.Demo1Application.main(Demo1Application.java:14)
In case if any further details is required then please let me know.
springboot_team
Hi Shashi,
Are you initialising apiClient using @Autowired, as follows?:
@Autowired
private ApiClient apiClient;
This must be done for Core API calls to be authenticated.
shashikumari
OPYes, I am initializing it using @Autowired and I have one configuration class where am initializing it as below :
@Bean
public ApiClient apiClient() {
LOGGER.info(“Initialising the apiClient…”);
ApiClient apiClient = new ApiClient(3, 3000);
BasicAuthRequestInterceptor interceptor = new BasicAuthRequestInterceptor(platformUsername,platformPassword);
springboot_team
Hi Shashi,
You don’t need to add the configuration class. This logic is included inside the library. You just need to autowire apiClient, that’s it.
Thanks