You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Player extends AbstractGraphDomain {
String name
List<Club> formerClubs = []
static hasMany = [formerClubs: Club]
static mapping = {
formerClubs lazy: false, fetch: "eager"
}
}
when we try to add a new object to the association we get this:
java.lang.reflect.InvocationTargetException: null
at org.grails.core.DefaultGrailsControllerClass$ReflectionInvoker.invoke(DefaultGrailsControllerClass.java:211)
at org.grails.core.DefaultGrailsControllerClass.invoke(DefaultGrailsControllerClass.java:188)
at org.grails.web.mapping.mvc.UrlMappingsInfoHandlerAdapter.handle(UrlMappingsInfoHandlerAdapter.groovy:90)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
at org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:77)
at org.grails.web.filters.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:67)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsupportedOperationException: null
at java.util.AbstractList.add(AbstractList.java:148)
at java.util.AbstractList.add(AbstractList.java:108)
at org.grails.datastore.mapping.dirty.checking.DirtyCheckingCollection.add(DirtyCheckingCollection.groovy:52)
at org.grails.datastore.gorm.neo4j.collection.Neo4jList.add(Neo4jList.groovy:59)
at org.sampleapp.core.PlayerController.$tt__updatePlayer4(PlayerController.groovy:68)
at grails.transaction.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:96)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at grails.transaction.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:93)
... 14 common frames omitted
@mburak When I run your example application with an embedded neo4j, I get org.neo4j.driver.v1.exceptions.ClientException: Unable to convert org.sampleapp.core.Club to Neo4j Value.
Edit: That was because the club assocation on Player was commented out
Having an association like this:
when we try to add a new object to the association we get this:
You can reproduce this by downloading the project at https://github.com/mburak/sampleapp and checking out branch called 'assoc-error'.
#1. Start the project on an empty db
#2. Do an ajax call to http://localhost:8080/player/updatePlayer4
The text was updated successfully, but these errors were encountered: