ESB Wrapper reading incorrect JAVA_HOME

Eight Stars

ESB Wrapper reading incorrect JAVA_HOME

I use TOS ESB 6.3.1.

 

I have multiple instances of JDK setup on my Windows 2012 server (1.7 &1.8)

 

System Variable JAVA_HOME is set to point to JDK 1.7

User Variable JAVA_HOME is set to point to JDK 1.8

I installed wrapper on the ESB so I can run it as a service. When the configuration files were generated, the etc/<service>.conf has the JAVA_HOME pointing to JDK1.8 (automatically).

 

However, when I start the service, the logs show that it is pointing to JDK1.7

 

I am not sure why is this discrepancy is present when the service conf file is clearly pointing to the JDK1.8 and the user variable JAVA_HOME is set correctly to JDK1.8

 

Any help is appreciated. Thanks

Sixteen Stars

Re: ESB Wrapper reading incorrect JAVA_HOME

How is your Windows service configured to run? Is it run under your user or a local user? I suspect that you have not configured the service user and as such it is taking the system environment variables. User environment variables should supersede the system ones, unless there isn't one for the user running the service.

Eight Stars

Re: ESB Wrapper reading incorrect JAVA_HOME

@rhall_2_0:
Currently, I am manually starting and stopping the service via the "net start <serviceName>" command.

After I logged in under my user account and setup the service. I added JAVA_HOME under "user" environment variable pointing to JDK1.8. Still, that did not help.

Any thing else I can check? Thank you.
Sixteen Stars

Re: ESB Wrapper reading incorrect JAVA_HOME

I was actually talking about the user configured to run the service. I believe that net start will just manually start the service as it is configured to run. Take a look at the screenshot I've attached.service.png

 

The other thing to test is changing the paths of your JAVA_HOME and restarting. You would do this to test that the paths have not actually been hardcoded somewhere in the config files. However I doubt that would be the case.

Six Stars

Re: ESB Wrapper reading incorrect JAVA_HOME

Do we have any update on this. I am also facing same issue. In my case the service is running with SYSTEM user, Default Path points to java 1.7 and I am setting it to 1.8 from wrapper.config file. But it is still picking java 1.7 environment.