We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

vpuri
Posts: 4
Joined: Thu Apr 05, 2018 12:15 pm

Problem starting Java application as a Windows service

Problem description - I have a Java Spring Boot application that I converted to a Windows service using Advanced Installer. When I attempt to start the Windows service using the Windows Service Control Manager (SCM) or sc.exe on a Windows 2012 server, I get the error, "The service did not respond to the start or control request in a timely fashion.” error. However, the logs created by the service indicate that it started. Also, I can execute the service executable created by Advanced Installer manually and the java application starts without any issues.

How to reproduce ? - The main class for a Spring Boot application needs to be initialized to "org.springframework.boot.loader.JarLauncher" and not the application's actual main class.
vpuri
Posts: 4
Joined: Thu Apr 05, 2018 12:15 pm

Re: Problem starting Java application as a Windows service

I forgot to specify the Java "Application Type" as "Win32 Service" when configuring the project. Setting this properly allows the service to start.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Problem starting Java application as a Windows service

Hi and welcome to our forums.

I'm glad you solved the problem. If you get into other issues, just let us know.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”