java.lang.IllegalArgumentException: Projection type must be an interface!

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

If you are trying to get a specific page of results, try first defining that page.

Solutions on the web

via Spring JIRA by Endre Czirbesz, 1 year ago
Projection type must be an interface!
via Spring JIRA by Endre Czirbesz, 1 year ago
Projection type must be an interface!
via Spring JIRA by Luke Taylor, 1 year ago
Required a single bean of type class org.springframework.security.ui.basicauth.BasicProcessingFilter but found 0
via Spring JIRA by Luke Taylor, 1 year ago
Required a single bean of type class org.springframework.security.ui.basicauth.BasicProcessingFilter but found 0
via Spring JIRA by Phil Webb, 1 year ago
PropertySource named [class path resource [override.properties]] cannot be added relative to itself
java.lang.IllegalArgumentException: Projection type must be an interface!
at org.springframework.data.projection.ProxyProjectionFactory.createProjection(ProxyProjectionFactory.java:80)
at org.springframework.data.projection.SpelAwareProxyProjectionFactory.createProjection(SpelAwareProxyProjectionFactory.java:41)
at org.springframework.data.repository.query.ResultProcessor$ProjectingConverter.convert(ResultProcessor.java:221)
at org.springframework.data.repository.query.ResultProcessor$ChainingConverter$1.convert(ResultProcessor.java:174)
at org.springframework.data.repository.query.ResultProcessor$ChainingConverter.convert(ResultProcessor.java:185)
at org.springframework.data.repository.query.ResultProcessor.processResult(ResultProcessor.java:148)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:482)
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.sun.proxy.$Proxy141.findCityForUser(Unknown Source)
at com.rungway.data.service.UserService.getUserCity(UserService.java:458)

Users with the same issue

2 times, 1 month ago
Once, 9 months ago
Once, 1 month ago
2 times, 4 months ago
5 times, 6 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.