0

I was running in some strange error message while defining a domain-model in Grails and applying a constraint to an integer variable.

package example

class Ip {

String inetAddress
String DNS
Integer Points


String toString(){
    "${inetAddress}"
}

static constraints = {
    inetAddress()
    DNS()
    Points(nullable: true)

  }

}

This created the following error message when starting the application

 Message:Can not set org.springsource.loaded.ISMgr field example.Ip.r$fields to java.lang.Class

1 Answer 1

1

Changing the variable definition from

 Integer Points

to

 Integer points

solved the problem.

Sign up to request clarification or add additional context in comments.

1 Comment

seems that "Points" is handled as an object and "points" as a property value. And objects are not allowed to be null

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.