title: Deploying app to Heroku throwing a 500 Internal Server Error in Back End Java Spring Boot while works perfect on local enviroment
body: <p>Good Day developers.In this app i'm building im having a little issue with a rating process i want to implement. Being the app working on local host is perfect but once i posted in Heroku , its error log throws me this error on 500 Internal Error.</p>
  
  <p>I just posted this videos in order you could see either cases i try to apply:</p>
  
  <p>1rst case (Either passing object or integer to request body parameter  with app working in local , perfect performance)
  <a href="https://youtu.be/IdpHQg4FW7k" rel="nofollow noreferrer">https://youtu.be/IdpHQg4FW7k</a></p>
  
  <p>2nd case(Passing integer to request body parameter with app in heroku, error 500)
  <a href="https://youtu.be/eJHSA_h8R3Y" rel="nofollow noreferrer">https://youtu.be/eJHSA_h8R3Y</a></p>
  
  <p>3rd case(Passing object to request body parameter with  app in heroku ,error 500)
  <a href="https://youtu.be/_l-Z0I3hNZU" rel="nofollow noreferrer">https://youtu.be/_l-Z0I3hNZU</a></p>
  
  <p>Guess with this videos i expose more on detail what's going on, notwithstanding , i'm going to leave the code below before this current edit.Thanks for your support</p>
  
  <p>Basically from my front end i just send through a request body parameter a rate(selected by user among 1-5 integer-numbers) :</p>
  
  <pre><code>COMPONENT in VUE
          functionx(){
           this.$store.dispatch("rateUpdater", {
              ratePack: {
                productRate: 4,
              },
              product_id: this.ProductCard.product_id,
  
            });
          }
  
  VUEX Process
  
       rateUpdater({ dispatch }, { product_id, ratePack }) {
          fetch(url+"mini/all_products/user/product_rated/" + product_id, {
          credentials: "include",
          headers: {
            "Content-Type": "application/json",
          },
          method: "POST",
          body: JSON.stringify(ratePack),
        })
          .then((newData) =&gt; {
            return newData.json();
          })
          .then((data) =&gt; {
            if (data.Error) {
              data.Error
            } else {
              data;
              dispatch("fetchAllProducts");
            }
          })
          .catch((error)=&gt; {
            alert("Request on Rate: ", error);
          });
      },
  
  </code></pre>
  
  <p>Thus then  receiving that data in my back end , i just initially get initialized that variable on my request body as Integer , cause is the way it comes from front-end, then basically i change it to a Double believing that could work :</p>
  
  <pre><code>CONTROLLER
  
  importations
  
  package com.miniAmazon;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.http.HttpStatus;
  import org.springframework.http.ResponseEntity;
  import org.springframework.security.core.Authentication;
  import org.springframework.security.crypto.password.PasswordEncoder;
  import org.springframework.web.bind.annotation.*;
  import java.util.*;
  import java.util.stream.Collectors;
  
  
  @RequestMapping(value="/mini/all_products/user/product_rated/{id}",method = RequestMethod.POST)
      public ResponseEntity &lt;Map&lt;String,Object&gt;&gt;rateProductOnBuy(@PathVariable("id") Long id,  Authentication authentication
                                                                  ,@RequestBody Integer productRated
      ){
          SOME CODE.....
  
          Product product=productRepository.getOne(id);
  
          Double rate=new Double(productRated)-----------&gt;transforming integer of request body to double 
  
  
          ---------------process of calculating average rate--------------------
          Double deframingRate=product.getProductRate()*product.getPeopleRating()+rate;
          Integer deframingPeopleVoting=product.getPeopleRating()+1;
          Double finalAverage=deframingRate/deframingPeopleVoting;
  
         -----------setting new Rate-------------
          product.setProductRate(finalAverage);
  
          ---------setting new amount of voters-----------
          product.setPeopleRating(deframingPeopleVoting);
  
          ---------saving repository----
          productRepository.save(product);
  
          return new ResponseEntity&lt;&gt;(makeMapResponse("Success","Product Rated"), HttpStatus.CREATED);
      }
  </code></pre>
  
  <p>but Basically that little change didn't work .....Any idea about how could i deal with this problem ?
  thanks in advance</p>