I am trying to deploy my server on heroku. I got this error:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
<
Since your this is not a Spring Boot app you should do something like this:
package introsde.document.endpoint;
import javax.xml.ws.Endpoint;
import introsde.assignment.soap.PeopleImpl;
public class PeoplePublisher {
public static String SERVER_URL = "http://localhost";
public String port;
public static String BASE_URL = "/ws/people";
public static String getEndpointURL() {
return SERVER_URL+":"+port+BASE_URL;
}
public static void main(String[] args) {
port = Integer.valueOf(args[0]);
String endpointUrl = getEndpointURL();
System.out.println("Starting People Service...");
System.out.println("--> Published at = "+endpointUrl);
Endpoint.publish(endpointUrl, new PeopleImpl());
}
}
And then on your Procfile:
web: java $JAVA_OPTS -jar target/*.jar $PORT
This way you'll bind your socket to the port Heroku is expecting you to listen at.