Java issues with Windows Server 2016

Questions and answers for all installation-related topics for Servoy products

Java issues with Windows Server 2016

Postby Westy » Sun Mar 12, 2017 7:13 pm

What version of Java works with Servoy 6.x and Windows Server 2016? When I attempt to start Servoy as a service I see the following in the service_log.txt:

Unable to execute Java command. The system cannot find the file specified. (0x2)
FATAL | wrapper | 2017/03/12 11:41:22 | "java" -Djava.awt.headless=true -Duser.dir="C:\Servoy\application_server" -Djava.io.tmpdir="C:\Servoy\application_server\server\work" -XX:MaxPermSize=128m -Xms32m -Xmx6400m -Djava.library.path="C:\Servoy\application_server\service" -classpath ".;service\wrapper.jar;lib\activation.jar;lib\antlr.jar;lib\apache-mime4j.jar;lib\BrowserLauncher2.jar;lib\commons-codec.jar;lib\commons-collections.jar;lib\commons-dbcp.jar;lib\commons-fileupload.jar;lib\commons-io.jar;lib\commons-logging.jar;lib\commons-pool.jar;lib\dom4j.jar;lib\hibernate3.jar;lib\httpclient.jar;lib\httpclient-cache.jar;lib\httpcore.jar;lib\httpmime.jar;lib\j2db.jar;lib\j2dbdev.jar;lib\jabsorb.jar;lib\javassist.jar;lib\jcifs.jar;lib\joda-time.jar;lib\js.jar;lib\jta.jar;lib\jug.jar;lib\log4j.jar;lib\mail.jar;lib\MRJAdapter.jar;lib\networktnl.jar;lib\rmitnl.jar;lib\server-bootstrap.jar;lib\servlet-api.jar;lib\slf4j-api.jar;lib\slf4j-log4j.jar;lib\wicket.jar;lib\wicket-calendar.jar;lib\wicket-extentions.jar" -Dwrapper.key="IwIrmNIREbo_UERO8zBudtoEDiwWRt0R" -Dwrapper.port=1777 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=828 -Dwrapper.version="3.3.5-st" -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp com.servoy.j2db.server.main.ApplicationServer"

I first installed Java 8. Then I uninstalled and installed jre-7u7-windows-x64. I suspect that I need to make changes to my wrapper.conf file. Any suggestions will be greatly appreciated.

Dean
Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Java issues with Windows Server 2016

Postby patrick » Sun Mar 12, 2017 7:30 pm

It sounds more like the machine does not find java. What happens if you open a console and type "java -version"?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3594
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Java issues with Windows Server 2016

Postby Westy » Sun Mar 12, 2017 7:55 pm

It returns:

java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM 64-Bit Server VM (build 23.3-b01, mixed mode)

Dean
Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Java issues with Windows Server 2016

Postby patrick » Sun Mar 12, 2017 9:17 pm

Strange. Do you have any Java variable in your environment variables (JAVA_HOME) that points to the uninstalled Java 8? Or did you switch from Java 32 (your old Java 8) to 64 bit (your Java 7)?
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3594
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Java issues with Windows Server 2016

Postby Westy » Sun Mar 12, 2017 10:21 pm

Our situation is that we are trying to switch our Servoy 6.x solution from a Windows Server 2008 instance to a Windows Server 2016 instance, because Softlayer has announced end-of-life for Windows Server 2008.

The current message on the Windows Server 2016 staging server indicates a clash between 32 bit and 64 bit Java (as Patrick suggested). I went back and double-checked the Java version running on our Windows Server 2008 production server instance. It is:
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64 bit Server VM (build 24.65-b04, mixed mode)

Should I uninstall the 64 bit version of Java on the Windows Server 2016 instance and attempt to install the 32 bit version?

Dean
Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Java issues with Windows Server 2016

Postby Bernd.N » Sun Mar 12, 2017 11:29 pm

Just for info: I recently installed on a Windows Server 2016 Java 8u121, Servoy 7.4.9 and Postgres 9.4.11.
Worked fine. In general it should be the best to have just one Java installed.
I personally would try to deinstall Servoy and all Javas, then install latest Java 64 bit, then install Servoy again.
Last edited by Bernd.N on Mon Mar 13, 2017 12:25 pm, edited 1 time in total.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 474
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Java issues with Windows Server 2016

Postby jcompagner » Mon Mar 13, 2017 10:24 am

maybe if it still doesn't work really specify completely the full path of the java command in the wrapper.conf
So it doesn't have to find it on the path
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 7974
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Java issues with Windows Server 2016

Postby patrick » Mon Mar 13, 2017 10:26 am

Actually, Servoy doesn't mind if java is 32 or 64 bit, but parts of developer (eclipse) and the server's service wrapper do. So when you are running Java 64 bit and install Servoy, you'll get some 64 bit dependent components and cannot safely switch to 32 bit later.

I'd rather have a 64 bit Java, so if that is your problem (it actually sounds more like Java is not found, so some path variable pointing nowhere), I'd go back to Java 8, 64 bit, and reinstall Servoy instead.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3594
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Java issues with Windows Server 2016

Postby Westy » Mon Mar 13, 2017 3:58 pm

Bernd said: "I personally would try to deinstall Servoy and all Javas, then install latest Java 64 bit, then install Servoy again."

That worked. Thanks to all.

Dean
Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Java issues with Windows Server 2016

Postby Westy » Sun Mar 26, 2017 5:42 am

It turns out that we need to stay with Java version 1.7.0_67 (32 bit) and Servoy 6.x on Window Server 2016. This is because we need wrapper.java.maxmemory=6400. Java is installed and our solution appears to be working properly, however, the .service_log.txt file shows the following:

Launching a JVM...
INFO | jvm 1 | 2017/03/25 22:17:28 | WrapperManager: Initializing...
INFO | jvm 1 | 2017/03/25 22:17:28 | WrapperManager:
INFO | jvm 1 | 2017/03/25 22:17:28 | WrapperManager: WARNING - Unable to load the Wrapper's native library 'wrapper.dll'.
INFO | jvm 1 | 2017/03/25 22:17:28 | WrapperManager: The file is located on the path at the following location but
WrapperManager: could not be loaded:
WrapperManager: C:\Servoy\application_server\service\wrapper.dll
WrapperManager: Please verify that the file is readable by the current user
WrapperManager: and that the file has not been corrupted in any way.
WrapperManager: One common cause of this problem is running a 32-bit version
WrapperManager: of the Wrapper with a 64-bit version of Java, or vica versa.
WrapperManager: This is a 64-bit JVM.
WrapperManager: Reported cause:
WrapperManager: C:\Servoy\application_server\service\wrapper.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
WrapperManager: System signals will not be handled correctly."

Is the wrapper.dll necessary? If so, what can we do to make the wrapper.dll load? Also, it seems strange that above it says "This is 64-bit JVM". Doing java -version shows it to be 32-bit.

Dean
Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Java issues with Windows Server 2016

Postby Bernd.N » Sun Mar 26, 2017 6:27 am

Westy wrote:It turns out that we need to stay with Java version 1.7.0_67 (32 bit) and Servoy 6.x on Window Server 2016.

Sounds like another software system depends on that required settings.
If that is the case, is it impossible to replace that other software system?
Because running such an old Java version also has huge security issues.
Bernd Korthaus
LinkedIn
Servoy 7.4.9 SC postgreSQL 9.4.11 Windows 10 Pro
User avatar
Bernd.N
 
Posts: 474
Joined: Mon Oct 21, 2013 5:57 pm
Location: Langenhorn, North Friesland, Germany

Re: Java issues with Windows Server 2016

Postby patrick » Sun Mar 26, 2017 1:44 pm

Didn't you say it worked? The last error you posted suggests that you installed Servoy while a 32 bit Java version was active and now you try to start it while a 64 bit Java version is active. See this

Can't load IA 32-bit .dll on a AMD 64-bit platform
This is a 64-bit JVM


The library we use to start Servoy as a service uses a dll which is available for 32 bit and 64 bit environments. At the time of installation the installer uses the one that matches the Java environment that is currently active. So if you run Java 32 bit for example while installing Servoy and then later switch to Java 64 bit, you have a problem.

So again: removing Servoy and all Java installs, then install Java 8 64 bit, then install servoy should work. It's all about the dll in the "service" directory of application_server...
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3594
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Java issues with Windows Server 2016

Postby Westy » Sun Mar 26, 2017 4:22 pm

"At the time of installation the installer uses the one that matches the Java environment that is currently active."

Is that true for the Servoy 6.x installer?

Dean
Last edited by Westy on Sun Mar 26, 2017 4:32 pm, edited 2 times in total.
Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Java issues with Windows Server 2016

Postby patrick » Sun Mar 26, 2017 4:30 pm

That is true for every installer we ever had. The installer can just ask: hey, what Java is running and then decide what dll to install. You could have 10 different Java versions on your machine...
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3594
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Re: Java issues with Windows Server 2016

Postby Westy » Sun Mar 26, 2017 4:33 pm

Per instructions, I have removed Servoy and all Java installs, then installed Java 8 64 bit, then re-installed servoy. I ALSO changed wrapper.java.maxmemory=1280 in the wrapper.conf file to wrapper.java.maxmemory=6400 (server has 12GB of RAM), because we have up to 300 simultaneous webclient users. After re-starting the Servoy Application Server service, the .service_log.txt file now reads:

Wrapper Started as Service
Java Service Wrapper Standard Edition 64-bit 3.3.5
Copyright (C) 1999-2009 Tanuki Software, Ltd. All Rights Reserved.
http://wrapper.tanukisoftware.org
Licensed to Servoy for ServoyApplicationServer

Launching a JVM...
IWrapperManager: Initializing...
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
on_exit trigger matched. Restarting the JVM. (Exit code: 1)
Launching a JVM...
WrapperManager: Initializing...
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
on_exit trigger matched. Restarting the JVM. (Exit code: 1)
Launching a JVM...
WrapperManager: Initializing...
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
on_exit trigger matched. Restarting the JVM. (Exit code: 1)
Launching a JVM...
WrapperManager: Initializing...
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
on_exit trigger matched. Restarting the JVM. (Exit code: 1)
Launching a JVM...
WrapperManager: Initializing...
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
on_exit trigger matched. Restarting the JVM. (Exit code: 1)
There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
There may be a configuration problem: please check the logs.
S<-- Wrapper Stopped

If I uninstall the service, delete the .service_log.txt file, reset the wrapper.conf file's wrapper.java.maxmemory back to 1280, re-install service, and then restart the service, the resulting new .service_log.txt file shows the same failures. What to do?

Dean
Last edited by Westy on Sun Mar 26, 2017 7:02 pm, edited 15 times in total.
Westy
 
Posts: 833
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 3 guests

cron