{code} java.lang.NullPointerException at org.hibernate.engine.query.spi.QueryPlanCache.getSQLParameterMetadata(QueryPlanCache.java:125) at org.hibernate.ogm.hibernatecore.impl.OgmSessionImpl.createNativeQuery(OgmSessionImpl.java:143) at org.hibernate.ogm.hibernatecore.impl.OgmSessionImpl.createSQLQuery(OgmSessionImpl.java:127) at org.hibernate.ogm.hibernatecore.impl.OgmSessionImpl.createSQLQuery(OgmSessionImpl.java:65) at org.hibernate.ogm.jpa.impl.OgmEntityManager.createNativeQuery(OgmEntityManager.java:497) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:344) at com.sun.proxy.$Proxy58.createNativeQuery(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:294) at com.sun.proxy.$Proxy58.createNativeQuery(Unknown Source) {code}
The entirety of my code attempting to execute the query/statement.
{code} @Override public void cullSecondMeasurementsBefore(Date date) { final String cql = "DELETE FROM second_measurement WHERE occurred_at < %(cutoff)"; final Query query = entityManager.createNativeQuery(cql); query.setParameter("cutoff", date); query.executeUpdate(); } {code} |
|