Spring Projects Issues

Results 1262 comments of Spring Projects Issues
trafficstars

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be...

**[Oliver Drotbohm](https://jira.spring.io/secure/ViewProfile.jspa?name=olivergierke)** commented I wonder how you expect that to work from a semantic point of view: you have a query that's relying on an authentication and you want to...

**[Stefano Bertini](https://jira.spring.io/secure/ViewProfile.jspa?name=sbertini)** commented Sorry, I did not specify that my query does not use any parameter such as ?#\{principal.username} I'm just trying a "normal" query

**[Oliver Drotbohm](https://jira.spring.io/secure/ViewProfile.jspa?name=olivergierke)** commented Can you post what the query on `myqueryannotatedmethod` looks like? I don't see a reason why the `Authentication` instance should be accessed if there's no security expression...

**[Stefano Bertini](https://jira.spring.io/secure/ViewProfile.jspa?name=sbertini)** commented ```java @Repository public interface ExecutionRepository extends JpaRepository, JpaSpecificationExecutor\ {         @Modifying       @Query("UPDATE QueryResult qr1 SET qr1.duplicated = true WHERE qr1.execution=:# {#execution} AND qr1.link IN (select qr.link from QueryResult...

**[Oliver Drotbohm](https://jira.spring.io/secure/ViewProfile.jspa?name=olivergierke)** commented Okay, it looks like the issue is triggered by our general context extension handling. Would you mind adding the complete stack trace, not just the snippet you...

**[Stefano Bertini](https://jira.spring.io/secure/ViewProfile.jspa?name=sbertini)** commented Of course !   ``` org.springframework.dao.InvalidDataAccessApiUsageException: Authentication object cannot be null; nested exception is java.lang.IllegalArgumentException: Authentication object cannot be null at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:384) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:246) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:525) at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:59)...

**[Andrey Akifev](https://jira.spring.io/secure/ViewProfile.jspa?name=andreyakifev)** commented I have the same issue. When I call repository method:   ```java @Query(value = "...some native query...", nativeQuery = true) List findInRadius(@Param("point") GeoPoint point, @Param("radiusMeters") int radiusMeters); ```    ...

**[Marcel Overdijk](https://jira.spring.io/secure/ViewProfile.jspa?name=marceloverdijk)** commented I created a PR for this here https://github.com/spring-projects/spring-data-examples/pull/296 which contains 2 failing tests. This is related to https://jira.spring.io/browse/DATAJPA-393 and https://jira.spring.io/browse/DATAJPA-749 (I cannot link the issues)

**[Marcel Overdijk](https://jira.spring.io/secure/ViewProfile.jspa?name=marceloverdijk)** commented Might be the same issue as https://jira.spring.io/browse/DATAJPA-1185 but good to check by adding tests for it