Hi, I’m a Spring Boot backend developer who is trying to ease his way in to Vaadin. I love the concept and as I understand it, Vaadin has a lot in commmon with GWT, which I used on several projects years ago.
I’m trying to get a Spring Boot app to use Vaadin, primarily because I loath front-end/JS/HTML coding and love the idea that Vaadin wil generate all the front-end “stuff” for me.
I created a simple [Spring Boot & Vaadin project]
(https://github.com/bitbythecron/vaadin-spring-example) and uploaded it to GitHub. From what I can tell, I may have discovered a bug in the Vaadin Spring Boot Starter library. In that GitHub example, I’m pretty sure that I’ve pulled in the correct versions of the correct dependencies to get a simple starter app up and running, however on app startup I get this:
java.lang.reflect.MalformedParameterizedTypeException: null
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(ParameterizedTypeImpl.java:58)
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(ParameterizedTypeImpl.java:51)
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(ParameterizedTypeImpl.java:92)
at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(CoreReflectionFactory.java:105)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:140)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:68)
at java.lang.reflect.Method.getGenericReturnType(Method.java:255)
at org.springframework.core.MethodParameter.getGenericParameterType(MethodParameter.java:382)
at org.springframework.core.SerializableTypeWrapper$MethodParameterTypeProvider.getType(SerializableTypeWrapper.java:337)
at org.springframework.core.SerializableTypeWrapper.forTypeProvider(SerializableTypeWrapper.java:149)
at org.springframework.core.ResolvableType.forType(ResolvableType.java:1346)
at org.springframework.core.ResolvableType.forMethodParameter(ResolvableType.java:1249)
at org.springframework.core.ResolvableType.forMethodParameter(ResolvableType.java:1217)
at org.springframework.core.ResolvableType.forMethodReturnType(ResolvableType.java:1160)
The full stack trace can be found by going to that GitHub project, cloning it and running the commands to package and run it.
It is important to note here that, although no Vaadin-specific classes seem to show up on the full stack trace, if you comment out the com.vaadin:vaadin-spring-boot-starter:13.0.8
dependency in the build file, and then comment out the Vaadin API code in the EmployeeEditor
and MainView
classes (so that it compiles again), the problem goes away and the app starts up just fine!
So there is clearly something in that Vaadin Spring Boot Starter that the core Spring Boot framework doesn’t like. Please advise!
And sorry if this isn’t the right place to report it, I’m happy to report it elsewhere if there’s a better way to go about it!