0

I'm fairly new to Gradle and I have a project which uses JPA modelgen. Said project depends on another project which is our own and the annotation processor can't find this dependency. It has no issues resolving external dependencies.

Relevant part of my build.gradle:

dependencies {
compile project(":my-other-project")

//Omitted irrelevant stuff


annotationProcessor 'org.hibernate:hibernate-jpamodelgen:5.4.18.Final'
}

Now I'm probably missing something super simple, but I can't find the cause of this error, which occurs when building:

symbol:   class [my-other-class]
location: class [my-class]
C:\[path]\:94: error: cannot find symbol
DataProvider<[my-other-class], String> createDataProvider([my-class] service) {
              ^

Now when I start the application, it compiles and runs, just without layouting (this is a Vaadin Java application)

  • Can you post your class with line 94? – flaxel Sep 24 '20 at 13:21
  • @flaxel `DataProvider<[my-other-class], String> createDataProvider([my-other-class]Service service) {` Does this suffice? It's just a method header which uses [my-other-class] from [my-other-project] – mackesmilian Sep 24 '20 at 13:23
  • I guess this is not really the correct name of the class? Otherwise I can recommend [this post](https://stackoverflow.com/questions/25706216/what-does-a-cannot-find-symbol-or-cannot-resolve-symbol-error-mean). – flaxel Sep 24 '20 at 13:29
  • Is there maybe a way to limit the projects/classes AnnotationProcessor sees/processes? I don't need the classes from [my-other-project] for this, but I didn't find a way to exclude [my-other-project] from AnnotationProcessor – mackesmilian Sep 24 '20 at 13:31
  • @flaxel Thanks, it suggested what I suspect, namely that there's something wrong with the dependencies. But I don't know what to be honest – mackesmilian Sep 24 '20 at 13:53

0 Answers0