title: Failed to convert property value of type [java.lang.String] to required type [java.lang.Integer]
body: <p>I am using Spring MVC and Spring Security and hibernate. iam having problem with save 'Phone Number" to "database". where is mistake?</p>
  
  <p>I get the Following Error When i submit my form</p>
  
  <pre><code>Failed to convert property value of type [java.lang.String] to required type [java.lang.Integer] for property Phone_Number; nested exception is java.lang.NumberFormatException: For input string: "(020)828-5852"
  </code></pre>
  
  <p>this is my view:</p>
  
  <pre><code>    &lt;div class="control-group "&gt;
   &lt;label class="control-label" for="phone" &gt;Phone Number&lt;/label&gt;
    &lt;div class="controls"&gt;
    &lt;form:input id="phone" path="Phone_Number" type="text"
     class="form-control span4"/&gt;
     &lt;div class="has-error"&gt;
     &lt;form:errors path="Phone_Number" class="help-inline" /&gt;
     &lt;/div&gt;
      &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>The model:</p>
  
  <pre><code>@NotNull
      @Column(name="PHONE_NUMBER", nullable=false)
      private Integer Phone_Number;
  </code></pre>
  
  <p>My Controller:</p>
  
  <pre><code>@RequestMapping(value = { "/newuser" }, method = RequestMethod.GET)
      public String newUser(ModelMap model) {
          UsersInfo usersInfo = new UsersInfo();
          model.addAttribute("usersInfo", usersInfo);
          model.addAttribute("edit", false);
          model.addAttribute("loggedinuser", getPrincipal());
          return "adduser";
      }
  
      @RequestMapping(value = { "/newuser" }, method = RequestMethod.POST)
      public String saveUser(@Valid UsersInfo usersInfo, BindingResult result, ModelMap model) {
  
  
          if (result.hasErrors()) {
              return "adduser";
          }
  
  
          if (!userInfoService.isUserUserNameUnique(usersInfo.getIdUsers(), usersInfo.getUserName())) {
              FieldError UsernameError = new FieldError("usersInfo", "UserName", messageSource
                      .getMessage("non.unique.UserName", new String[] { usersInfo.getUserName() }, Locale.getDefault()));
              result.addError(UsernameError);
              return "adduser";
          }
  </code></pre>
  
  <p>I read i am to add this Bean to my hibernate configuration </p>
  
  <pre><code>@Bean
      public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
          return new PropertySourcesPlaceholderConfigurer();
      }
  </code></pre>
  
  <p>But the Error Message is still there.</p>