Sunday, 21 August 2011

Problem in creating service in Glassfish V3 in Windows 2003 server: The retunr value was: 128

Today I was trying to create windows service for a domain using Glassfish V3’s create-service command from asadmin command prompt in a Windows 2003 server. But it failed giving the following error:

I had successfully created Glassfish V3 windows service using create-service command in few Windows 2008 R2 servers.

 On some study I found that glassfish V3 uses Windows Service Wrapper ( tool for installing the service. Suppose we run the create-service command for domain2, then domain2Service.exe (default name) and configuration file domain2Service.xml will be created in the bin folder of that domain. The domain2Service.exe file can be used to start, stop and uninstall the service. After searching I found that Windows Service Wrapper requires .NET framework. So I installed .NET framework 4.0 and tried to create service again, and this time I got a different error:

Then I tried with .NET framework 3.5 sp1 and after that I used the command……. Voila, I got it right….the service is created.

Previously I installed Glassfish V3 in Windows 2008 R2, and Windows 2008 R2 comes with .NET framework 3.5.1. So I was successful in creating services using the create-service command.

Actually using Java based application, .NET dependency could come into play that did not come into my mind :)

জয় আই অসম,
প্রণব শর্মা