Q:

issue while posting data using spring and AngularJS :: The request sent by the client was syntactically incorrect

I am getting below error while POSTING to a rest service. Please help me understanding what I am missing here?
The request sent by the client was syntactically incorrect.

My Controller Code is:
@RequestMapping(method = RequestMethod.POST)
public @ResponseBody String addUser(@RequestBody UserDomain userDomain, BindingResult result) {
    System.out.println("UserDomain :: " + userDomain);
    userService.addUser(userDomain);
    return "redirect:/";
}

Services.js
services.factory('UserFactory', ['$resource', function ($resource) {

return  {
    usercreation: $resource('/ngdemo/web/users', {}, {
        query: {method: 'GET', isArray: true },
        create: {method: 'POST'}
    })

};
}]);
Controller.js
    app.controller('DemoCtrl', ['$scope', 'UserFactory', '$facebook', 'NotificationFactory', '$location', function ($scope, UserFactory, $facebook, NotificationFactory, $location) {

        $scope.UserDomain = { firstname: null };

        $scope.isLoggedIn = false;
        $scope.login = function () {
            $facebook.login().then(function () {
                refresh();
            });
        }

        function refresh() {
            $facebook.api("/me").then(
                function (response, Userfactory) {
                    $scope.welcomeMsg = "Welcome " + response.name;
                    $scope.result = response;
                    console.log("console ctrl demo12 - " + $scope.welcomeMsg);
                    alert($scope.result);
                    $scope.isLoggedIn = true;

                    //$scope.UserDomain.id = $scope.result.id;
                    $scope.UserDomain.socialId = $scope.result.id;
                    $scope.UserDomain.gender = $scope.result.gender;
                    $scope.UserDomain.firstname = $scope.result.first_name;
                    $scope.UserDomain.hometown = $scope.result.hometown.name;
                    $scope.UserDomain.currentLocation = $scope.result.location.name;
                    $scope.UserDomain.lastname = $scope.result.last_name;
                    $scope.UserDomain.email = $scope.result.email;
                    $scope.UserDomain.username = $scope.result.username;
                    $scope.UserDomain.link = $scope.result.link;
                    $scope.UserDomain.relationshipStatus = $scope.result.relationship_status;

                    console.log("$scope.result - " + $scope.result.relationship_status);
                    console.log("$scope.UserDomain - " + $scope.UserDomain.relationshipStatus);

                    //making call to add user
                    UserFactory.usercreation.create($scope.UserDomain);
                },
                function (err) {
                    $scope.welcomeMsg = "Please log in";
                });
        }
    }]);

JSON formed and checked in mozilla console::
{"firstname":"Naveuuuin","socialId":"7048797897728972","gender":"male","hometown":"Udaipur, Rajasthan","currentLocation":"Bangalore, India","lastname":"Vyas","email":"vyas@gmail.com","username":"vyas","link":"https://www.facebook.com/vyas","relationshipStatus":"Single"}

UserDomain Class is:
    package ngdemo.domain;

    import javax.persistence.*;

    @Entity
    @Table(name = "P_USER")
    public class UserDomain {

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

        @Column(name = "SOCIAL_ID")
        private String socialId;

        @Column(name = "FIRSTNAME")
        private String firstname;

        @Column(name = "LASTNAME")
        private String lastname;

        @Column(name = "EMAIL")
        private String email;

       /* @Column(name = "PHONENUMBER")
        private String telephone;*/

        @Column(name = "HOMETOWN")
        private String homeTown;

        @Column(name = "GENDER")
        private String gender;

        @Column(name = "LINK")
        private String link;

        @Column(name = "CURRENT_LOCATION")
        private String currentLocation;

        @Column(name = "RELATIONSHIP_STATUS")
        private String relationshipStatus;

        @Column(name = "USERNAME")
        private String username;

        public String getSocialId() {
            return socialId;
        }

        public void setSocialId(String socialId) {
            this.socialId = socialId;
        }

        public String getCurrentLocation() {
            return currentLocation;
        }

        public void setCurrentLocation(String currentLocation) {
            this.currentLocation = currentLocation;
        }

        public String getGender() {
            return gender;
        }

        public void setGender(String gender) {
            this.gender = gender;
        }

        public String getHomeTown() {
            return homeTown;
        }

        public void setHomeTown(String homeTown) {
            this.homeTown = homeTown;
        }

        public String getLink() {
            return link;
        }

        public void setLink(String link) {
            this.link = link;
        }

        public String getRelationshipStatus() {
            return relationshipStatus;
        }

        public void setRelationshipStatus(String relationshipStatus) {
            this.relationshipStatus = relationshipStatus;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getEmail() {
            return email;
        }

       /* public String getTelephone() {
            return telephone;
        }*/

        public void setEmail(String email) {
            this.email = email;
        }

       /* public void setTelephone(String telephone) {
            this.telephone = telephone;
        }*/

        public String getFirstname() {
            return firstname;
        }

        public String getLastname() {
            return lastname;
        }

        public void setFirstname(String firstname) {
            this.firstname = firstname;
        }

        public void setLastname(String lastname) {
            this.lastname = lastname;
        }

        public Integer getId() {
            return id;
        }

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

        @Override
        public String toString() {
            return "UserDomain{" +
                    "currentLocation='" + currentLocation + '\'' +
                    ", id=" + id +
                    ", socialId=" + socialId +
                    ", firstname='" + firstname + '\'' +
                    ", lastname='" + lastname + '\'' +
                    ", email='" + email + '\'' +
                    ", homeTown='" + homeTown + '\'' +
                    ", gender='" + gender + '\'' +
                    ", link='" + link + '\'' +
                    ", relationshipStatus='" + relationshipStatus + '\'' +
                    ", username='" + username + '\'' +
                    '}';
        }
    }

A:

Thanks all anyways!
Everything was right, only problem was with casing in my JSON returned and domain model.

