Thymeleaf registration page - Error during execution of processor 'org.thymeleaf.spring4.processor.attr.SpringInputGeneralFieldAttrProcessor'
<p>I'm making a registration page for a website. I understand that in order for a new User to be created, an id is required, so we have the field:</p>

<pre><code>&lt;input type="hidden" th:field="{*id} /&gt;
</code></pre>

<p>However, when I go to the page, I get the error I mentioned in this post's title.</p>

<p>Here is the form in question:</p>

<pre><code>&lt;form th:action="@{/users/register}" th:object="${user}" class="form-signin" method="POST"&gt;
    &lt;h2 class="form-signin-heading"&gt;Register&lt;/h2&gt;
    &lt;input type="hidden" th:field="*{id}" /&gt;
    &lt;label for="inputUsername" class="sr-only"&gt;Username*&lt;/label&gt;
    &lt;input type="text" th:field="*{username}" name="username" id="inputUsername" class="form-control" placeholder="Username" required="required" autofocus="autofocus" /&gt;
    &lt;label for="inputEmail" class="sr-only"&gt;Email Address*&lt;/label&gt;
    &lt;input type="text" th:field="*{email}" name="email" id="inputEmail" class="form-control" placeholder="Email address" required="required" autofocus="autofocus" /&gt;
    &lt;label for="inputPassword" class="sr-only"&gt;Password&lt;/label&gt;
    &lt;input type="password" th:field="*{password}" name="password" id="inputPassword" class="form-control" placeholder="Password" required="required" /&gt;
    &lt;label for="inputConfirmPassword" class="sr-only"&gt;Confirm Password&lt;/label&gt;
    &lt;input type="password" th:field="${confirmPassword}" name="confirmPassword" id="inputConfirmPassword" class="form-control" placeholder="Confirm password" required="required" /&gt;
    &lt;button class="btn btn-lg btn-primary btn-block" type="submit"&gt;Register&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>Here is my UserController:</p>

<pre><code>@RequestMapping("/register")
public String registerAction(Model model) {
    model.addAttribute("user", new User());
    model.addAttribute("confirmPassword", "");
    return "views/users/register";
}

@RequestMapping(value="/register", method = RequestMethod.POST)
public String doRegister(User user) {
    User savedUser = userService.save(user);
    return "redirect:/"; //redirect to homepage
}
</code></pre>

<p>And the first part of the User entity:</p>

<pre><code>@Entity
@Table(name = "users")
public class User {

// Default constructor require by JPA
public User() {}

@Column(name = "id")
@Id @GeneratedValue
private Long id;

public void setId(long id) {
    this.id = id;
}

public long getId() {
    return id;
}
</code></pre>

<p>From what I can see, there's nothing wrong here so I'm stuck. </p>

<p>I'm following this example: <a href="https://github.com/cfaddict/spring-boot-intro" rel="noreferrer">https://github.com/cfaddict/spring-boot-intro</a></p>

<p>Any ideas?</p>