4 Messages
Springboot collibra-integration-library issues
I have installed the library in local maven repository and updated the build.gradle to use maven local repository as suggested in the spring boot integration documentation. But its not detecting the collibra built-in classes when I am trying to access them in the code. Can some someone please help on this.
Community_Alex
711 Messages
•
19.2K Points
3 years ago
@spring-team.collibra.com, can you help @vamsikrishna.nimmaraju or should they submit a Support ticket?
0
0
springboot_team
368 Messages
3 years ago
Hello Vamsikrishna,
Thanks for trying the Collibra Integration Library.
To be able to use it in a Gradle project, the following needs to be done:
Install the Collibra Integration Library in your local Maven repository using the following command as specified in the documentation:
mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file -Dfile=<path-to-jar-file>
Update the build.gradle file to include the following:
where:
<library_version>
should be replaced with the respective Collibra Integration Library version that was installed in step 1.0
0
vamsikrishnanimmaraju
4 Messages
3 years ago
Thanks for the reply. I have followed the same steps given. And I tried to call ApiClient buildClient method as mentioned in the document given below.
But When I try to bring up the tomcat in local, its giving the following error.
Field apiClient in .***. required a bean of type ‘com.collibra.marketplace.library.generated.core.ApiClient’ that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type ‘com.collibra.marketplace.library.generated.core.ApiClient’ in your configuration.
Also I don’t see any properties to be set for ApiClient in the documentation, do we need to set any?
0
0
springboot_team
368 Messages
3 years ago
Hello Vamsikrishna,
Thanks for the update.
Can you please try using the attached Java class?
Once the
test
method is called, it should print the asset name for the provided asset ID.sample.java
Additionally, can you please confirm that:
@SpringBootApplication(scanBasePackages = {"com.collibra", ...})
Regarding the properties, there are no specific properties that should be set to use the ApiClient. For more information, you can refer to the " Configuration Properties" section of the Collibra Integration Library documentation.
0
0
vamsikrishnanimmaraju
4 Messages
3 years ago
Thank you for the quick responses! I had used the same code which is given by you.
I am using a spring boot project only and also tested the sample end points in localhost. Its working fine. Only with Collibra library integration, I am getting that error.
I have tried including the scan base packages for both springbootapplication and componentscan also. But still same result when I try to bring up the localhost.
1
0
springboot_team
368 Messages
3 years ago
Hello Vamsikrishna,
Thanks for the information provided.
To confirm, when calling the test method from the provided Java class, using the same Spring Boot project (e.g. from the controller, does it work please?
Also, can you please confirm that when adding the following annotation to the main class, the package name of you application (e.g. my.custom.package.name) was also added?
Additionally, can you please confirm that the class where the ApiClient is being used, is annotated with a @Component / @Service / any other Spring Boot annotation?
0
0