LOOKER API -Java Integration

Hi Team,

I followed as suggested in the documentation for Looker SDK integration with Java (maven):
https://github.com/looker-open-source/sdk-codegen/tree/23b3dbfa1761d8b5d6abf6bbaf59318b91082393/exam...

Question 1: Can I use this Looker SDK integration with Java (maven) approach in Production..?
 

Question 2: when I followed steps and run project, getting below error. kindly guide what I’m missing here..?

Running on Java 8

mvnw exec:java
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.looker:example_maven:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.systemPath' for com.looker:kotlin-sdk:jar should not point at files within the project directory, ${basedir}/lib/looker-kotlin-sdk.jar will be unresolvable by dependent projects @ line 64, column 19
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------------< com.looker:example_maven >----------------------
[INFO] Building example_maven 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec-maven-plugin:3.0.0:java (default-cli) @ example_maven ---
java.lang.NoClassDefFoundError: io/ktor/client/features/json/GsonSerializer
        at com.looker.rtl.TransportKt$customClient$1$1.invoke(Transport.kt:183)
        at com.looker.rtl.TransportKt$customClient$1$1.invoke(Transport.kt:182)
        at io.ktor.client.HttpClientConfig$install$2.invoke(HttpClientConfig.kt:64)
        at io.ktor.client.HttpClientConfig$install$2.invoke(HttpClientConfig.kt:18)
        at io.ktor.client.features.json.JsonFeature$Feature.prepare(JsonFeature.kt:132)
        at io.ktor.client.features.json.JsonFeature$Feature.prepare(JsonFeature.kt:128)
        at io.ktor.client.HttpClientConfig$install$3.invoke(HttpClientConfig.kt:72)
        at io.ktor.client.HttpClientConfig$install$3.invoke(HttpClientConfig.kt:18)
        at io.ktor.client.HttpClientConfig.install(HttpClientConfig.kt:92)
        at io.ktor.client.HttpClient.<init>(HttpClient.kt:168)
        at io.ktor.client.HttpClient.<init>(HttpClient.kt:81)
        at io.ktor.client.HttpClientKt.HttpClient(HttpClient.kt:43)
        at com.looker.rtl.TransportKt.customClient(Transport.kt:181)
        at com.looker.rtl.AuthSession.doLogin(AuthSession.kt:222)
        at com.looker.rtl.AuthSession.login(AuthSession.kt:102)
        at com.looker.rtl.AuthSession.login$default(AuthSession.kt:102)
        at com.looker.rtl.AuthSession.getToken(AuthSession.kt:83)
        at com.looker.rtl.AuthSession.authenticate(AuthSession.kt:66)
        at com.looker.rtl.APIMethods$authRequest$1.invoke(APIMethods.kt:34)
        at com.looker.rtl.APIMethods$authRequest$1.invoke(APIMethods.kt:34)
        at com.looker.rtl.Transport.httpRequestBuilder(Transport.kt:332)
        at com.looker.sdk.LookerSDK.me(methods.kt:20659)
        at com.looker.sdk.LookerSDK.me$default(methods.kt:9041)
        at com.looker.sdk.LookerSDK.me(methods.kt)
        at com.looker.example.ExampleRunner.runCallMe(ExampleRunner.java:44)
        at com.looker.example.ExampleRunner.main(ExampleRunner.java:20)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:254)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: io.ktor.client.features.json.GsonSerializer
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 28 more

0 1 806
1 REPLY 1

I'm not sure if you are using eclipse development environment for windows environment.

If so, you need to first confirm whether these jars have been added to your java build path.

螢幕擷取畫面 2024-02-16 220834.png