In This Chapter
Servoy Application Server
Server doesn't start
When the Servoy Application Server will not start, there are two likely reasons for it:
- The Servoy Application Server cannot access the Servoy Repository database. As the Servoy Application Server required the Servoy Repository database to be available on launch, failure to connect to the database will prevent the Servoy Application Server from starting. The most likely reasons for the Repository Database not being accessible are:
- The Database Server that hosts the Servoy Repository database is not running. Note that the Servoy Application Server does NOT start any database server!
- The Database Server runs on another Server which cannot be reached by Servoy due to network configuration
- Invalid configuration of the database server connection named "repository_server" in Servoy
- No database server setup within Servoy with the name "repository_server"
- The Servoy Application Server fails to start after updating the SSL configuration or disabling SSL. Any property in the servoy.properties file that contains the word "password" is automatically encrypted using the SSL settings configured (if SSL is enabled). If the configuration is changed, the Servoy Application Server is unable to decrypt the passwords. The solution is to set the passwords back to plain text in the servoy.properties file and starting the server again.
When this scenario happens, the following error appears in the console, when starting the Servoy Application Server in a console/command window: javax.crypto.BadPaddingException: Given final block not properly padded
If the above mentioned items are not the the reason for the Servoy Application Server not starting, the next step would be to analyse the Application Server log files located in {servoyInstall}/application_server/servoy_log.txt
Network errors
Some Java environments start with IPv6 Stack. If this happens, while actually running IPv4, the result might be network errors. In order to prevent errors, the Servoy Application Server can be started with a preference to use the IPv4 Stack.
- Open servoy_server.sh/servoy_server.bat in the <servoy>/application_server/ directory using a text editor
- Add '-Djava.net.preferIPv4Stack=true' to the end of the line that starts with 'java'
- Save the change made
- Restart the Servoy Application Server
Server crashes
- java.util.NoSuchElementException: Timeout waiting for idle object
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:801)
Such exceptions in the Server log indicate the database connection pool being exhausted: The maximum Active Connection limit is reached, while there is demand for more connections. Solution is setting the maximum allowed connection to a higher value
The Servoy Application Server is very robust and is known for its stability and extreme long uptime. In the unlikely event of a crash, this is most likely caused by an out of memory exception, caused by
Servoy Smart Client
When experiencing problems with Smart Client starting or loosing connections, the following items might offer resolution. At any time, more information can be retrieved by enabling the Java WebStart console on the client machine prior to launching the Smart Client. This will open an additional console on the client machine with a client-side log. The Java WebStart console can be enabled in the Java Control Panel > Advanced > Java Console by checking the Show console option
Error: cannot find dataservice, it may not be running on server
This error is displayed in the Servoy Smart Client when it can't properly connect to the Servoy Application Server at startup. Most likely cause of this message is incorrect configuration of the Network Settings in combination with firewalls and proxies
Error: Connection to Servoy server is invalid
Invalid SSL Certificate or using a self-signed certificate, which is not supported for Smart Clients
SSL Related Exceptions
sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors: https://forum.startcom.org/viewtopic.php?f=15&t=1815
Microsoft JScript compilation error: syntax error (Windows only)
!WS JScript.png|align=center!When during launching the Smart Client a Syntax error dialog pops up with the title Microsoft JScript compilation error, this means that on the client machine Java WebStart is configured to look at the browser for the Proxy settings. On Windows this means that it is looking at the Local Area Network (LAN) Settings under Connections of Internet Properties. Where these setting are located differs per Windows version, but they can usually be accessed through the (advanced) network settings of a browser.
The solution is to either configure Java WebStart to use "Direct connection" (Not to be confused with Servoy's Direct Connection mode) or to uncheck all options in the LAN Settings of Windows. As both options are system-wide settings they can influence other applications.
Q: IS THIS ONLY RELEVANT WHEN USING TWO-WAY SOCKET, OR ALWAY, ALSO WHEN USING THE TUNNEL?
Proxy Settings in Java Webstart, causing fallback to Direct Connection, for which requirements aren't met
JNLP gets downloaded as file
Slow performance
Check memory
Check connection
Plugin or bean not loading in the Client
If one specific plugin or bean doesn't seem to load in the Client, check the server log around the time when the Servoy Application Server got started. At server startup, all the plugins and beans are loaded. If there is an issue with the plugin or bean, it will be excluded from the list of plugins and beans send to the client. Any issue with the plugin or bean would result in errors in the server log when the server gets started.
You can review the list of plugins that are send to the client by adding "?raw=true" to the url of the Smart Client (http://domain:post/servoy-client/solutionName.jnlp) and then viewing the content of the JNLP file by looking at the source code of the page in the browser.
-----------------------
Troubleshooting
Problems with Smart Clients fall into different categories and can be caused by a number of different reasons. Below an overview per category, with investigation guidelines and possible solutions.
Smart Client starting issues
Smart Client starting issues can have different causes.
JScript errors when starting the Smart Client (Windows only)
Enable "direct connections" on under the Network Settings of the Java Console on the client machine
Accessing the .jnlp file doesn't start Java Web Start
This means that either Java Web Start is not (properly) installed (see [#Prerequisites]) or that the .jnlp extention is not assosiated with Java Web Start.
Java Web Start error: Problem downloading the application
webstart issue
raw=true option
Enable wire logging
In case of connection issues between the Smart Client and the Application Server and all
Enabling of WebStart loggin
Enabling of WebStart console
Enabling of tracing
Smart Client disconnection issues
Smart Clients operate connected to the Application Server. When the connection is lost, the Smart Client will automatically try to reconnect. When reconnection is not possible, the Smart Client will automatically provide the user with an error message and the option to close the Smart Client or to continue to try and reconnect.
Smart Client crash issues
When a Smart Client quits unsuspectedly or hangs, the first thing to do it enable the Java console
Smart Client update issues
flush
remove app from java
remove temp internet files
Solution issues
----------------------
Database Connectivity
General
Is the required JDBC driver available?
Servoy comes bundled with a limited set of JDBC drivers, due to licensing. For example, it is not allowed to bundle JDBC drivers of Oracle or the official Microsoft SQL server JDBC driver. See the database section of the Servoy stack info for a list of the shipped JDBC drivers. If no JDBC driver is listed for the database to which a connection needs to be made, it needs to be added manually. See Database Connectivity > JDBC Drivers for more details on which JDBC driver to use and how to add it.
Is the database up and running?
While obvious that the database needs to be up and running in order for it to be used, it does happen quite often that the source of connectivity issues boils down to the database not being started. Note that the Servoy Application Server doesn't start any database!
The Tables & views do not show up in Servoy Developer/errors on the server about missing tables/views while the connection itself seems to work
heck that the schema and catalog properties of the database server settings are set correctly. These two properties are send to the database and based on those the database/JDBC driver filters the visible Tables/views for the connection
Errors because the connection to the database is lost
Oracle
When connecting to Oracle databases, make sure to use the correct version of the Oracle JDBC driver. Each Oracle database version has it's own version of a JDBC driver and when connecting to Oracle with a JDBC driver that was meant for another version of Oracle, the results can be mixed
Servoy doesn't see the tables in the database
Most likely cause is the 'Schema' property for the connection. This property must be set to the appropriate 'Schema' in the Oracle database. The value for the 'Schema' property must be all uppercase when connecting to an Oracle Database.
SQL Server
Failed to establish a connection
In order to connect to SQL Server using JDBC, the TCP/IP option of SQL server needs to be enabled, which it isn't by default. If this is the case, a error similar to the following can be found in the log: "com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed."
System tables and Views show up in Servoy Developer, despite the "Skip System Tables" in the Database Server definition
This is a known issue with the SQL Server driver
MySQL
Connection to database lost
MySQL is notorious for dropping idle connections after a certain timeout. This can be prevented by using the following "validation query" for the Database Server connection: "select 1", at the cost of a little overhead. It's preferred to configure MySQL to use longer timeouts.