Hi everyone! I have a Spring Boot project with Kot...
# spring
l
Hi everyone! I have a Spring Boot project with Kotlin, and I’m using the Redis OM Library (https://github.com/redis/redis-om-spring). I’m trying to do a query with Entity Streams (https://github.com/redis/redis-om-spring#-querying-with-entity-streams) but I have to configure the annotation processor (https://github.com/redis/redis-om-spring#-maven-configuration). I did that with kapt
Copy code
<plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>kapt</id>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>src/main/kotlin</sourceDir>
                            </sourceDirs>
                            <annotationProcessorPaths>
                                <annotationProcessorPath>
                                    <groupId><http://com.redis.om|com.redis.om></groupId>
                                    <artifactId>redis-om-spring</artifactId>
                                    <version>0.8.0</version>
                                </annotationProcessorPath>
                            </annotationProcessorPaths>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <args>
                        <arg>-Xjsr305=strict</arg>
                    </args>
                    <compilerPlugins>
                        <plugin>spring</plugin>
                    </compilerPlugins>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-allopen</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
But I’m getting this error:
exception java.lang.NoSuchFieldException is never thrown in body of corresponding try statement
And this is the generated class
Copy code
public final class UserInfoHash$ {
  public static MetamodelField<UserInfoHash, String> _KEY;

  static {
    try {
      _KEY = new MetamodelField<UserInfoHash, String>("__key", String.class, true);
    } catch(NoSuchFieldException | SecurityException e) {
      System.err.println(e.getMessage());
    }
  }
}
Can someone help me with this please?