Contains troubleshooting information
This article identifies the following issues you might encounter and how to resolve them:
CA Live API Creatoris not working properly, you can:
- View the logs.
- View the container's logs, such as Apache Tomcat or Jetty.
- (If the problem is client-only) View the browser's debug page.
For more information about how to resolve known error conditions, see Error Codes.
General Connection Issues
To assist CA Support with troubleshooting your connection issues, identify:
- The main container log (catalina.outfor Tomcat, console output for Jetty).
- The exact steps that you used to connect to the database.
- An export of the database, whenever possible, so that Support can identify issues.
You can encounter firewalls issues, particularly in large organizations. Verify that you can connect to the database from the machine hosting
CA Live API Creatorusing SQL Tools (for example Toad, DbVisualizer, Razor, MySQL Workbench, and Microsoft SQL Server Management Studio).
MySQL SSL Exception
Recent versions of MySQL might require that you connect to a MySQL database using Secure Sockets Layer (SSL). The following error message indicates this requirement:
javax.net.ssl.SSLException: Unsupported record version Unknown-0.0
To avoid this error, add the following to the
Database URLfield for the data source connection:
For more information about this field, see Database Connectivity.
Database Connects But No Tables - Ensure Active
Ensure that data source is active.
CA Live API Creatorretrieves schema information only for active data sources. Each database might have a catalog/database or schema that is used to read the metadata. If these values are incorrect, the connection might succeed but the tables will be empty.
For more information about how to mark a data source as active, see Database Connectivity.
External RESTFull Calls
If you are having issues invoking APIs from other servers, verify your URL and headers using REST tools such as Postman.
For more information about how to debug using the
rest<verb>, see The SysUtility Object.
Schemas are cached in the Admin database, so a full load is only required initially, or when you refresh the schema. For very large schemas, the initial load time might exceed the browser time-out time. In this case, an error appears, but the API Server continues the load process.
Reload API Creator in your browser. The schema is loaded.
Otherwise, contact CA Support.
For more information about connecting to Microsoft SQL Server, see Microsoft SQL Server Data Source.
Reset the Database Password After Importing the API
API Creator does not store passwords in the
.jsonfile on export. Set your database passwords after you import your API.
For more information, about how to set your database password, see Database Connectivity.
Authentication Provider Not Set After Project Import
API Creator does not store the authentication provider in the
.jsonfile on export. Specify the authentication provider after you import your API.
For more information:
Named Filters gives SQL Error
The use of named filters allows creation of named parameter values to be used in place of column attributes. However, each database has its own rules on how to handle mixed case and quotes. Ensure the column attribute names are in single quotes ('name'), double quotes ("name"), or back-ticks (`name`) based on Derby, MySQL, and Oracle requirements.
Connect to Large Schemas
For schemas in excess of several hundred tables, you might run into browser time-outs and heap errors. Browser timeouts reflect that the time to load the schema exceeded the browser timeout. To correct this issue, log in to API Creator again.
For heap errors, increase the heap size provided to the API Server. For example, in the Jetty version, the Start command file (
) has the following:.bat
java -DSTOP.PORT=8123 -DSTOP.KEY=stop_caliveapicreator -jar ../start.jar $1 $2 $3 $4 $5 $6 $7 $8 $9
Change it as follows:
java-Xmx1024m-DSTOP.PORT=8123 <<< etc >>>
NullPointerException When Configuring MariaDB as My Admin Database with Apache Tomcat
The MariaDB JDBC driver version 1.5.6 has a bug which causes a NullPointerException. Use the version of the MariaDB JDBC driver that
CA Live API Creatorsupports.
For more information about the MariaJDBC versions that
CA Live API Creatorsupports, see Supported Platforms.
You can log into API Creator, but then it becomes unresponsive
You might encounter this issue if you are running on an Amazon Linux instance. This issue is caused by the server name (as returned by the
hostnamecommand) not resolving properly to an IP address. This triggers the a known bug in some versions of Java, or possibly Linux kernel, which causes
InetAddress.getLocalHost().getHostName()to hang forever.
For more information about this bug, see the question Java DNS resolution hangs forever in StackOverflow.
You can fix this issue using the following methods:
- Use the following option on the Java command line:java -Djava.net.preferIPv4Stack=true ...
- Put the host name (as determined by thehostnamecommand) in the/etc/hostsfile, for example:127.0.0.1 localhost ip-12-34-56-78::1 localhost ip-12-34-56-78
If your machine does not have a fixed IP address, these methods are not a long-term solution.
There are many available methods to resolving this issue, some of which require expertise in Unix networking.
Monitor API Server Availability
You can check the health of your API Server and its availability using the
@heartbeatsystem REST endpoint. This endpoint retrieves API Server status.
For more information about this endpoint, see System REST Endpoints.
Data Explorer Does Not Show Tables
Ensure that you have logged on to API Creator as a user with at least one assigned role and the role has at least one table with read access. If you have changed your URL fragment or your API name, clear the internal API cache by switching to another API.
API Docs - Swagger Not Showing After Import
API Creator includes the API Documentation role. You must be assigned this role, with access to read, insert, update, and delete. You can also allow the discovery of the API Swagger doc without authentication.
For more information about how to allow the discovery of the API Swagger doc without authentication, see API Properties.
Authentication Provider - Cannot Find Custom JS Library for Create Function
For more information about how to define a library as available, see Logic Libraries.
When you return to the Authentication Providers page, you can now define the
Name for Create Functionfield.
Tomcat Needs to Allow Slash in Primary Key
Tomcat might need a system parameter change to allow support for a slash in the primary key. For example, your key is "P5/P5A" and the href URL will look like this (encoded):
CA Live API Creatorreturns an error saying it cannot find the row. The error is caused by the Tomcat server trying to decode the "/" before sending on to
CA Live API Creator.
You can find the fix by adding this to the JVM args of the system (setenv):
Update Amazon EBS - Apache Proxy Server in the Beanstalk Instance
- SSH into the machine.
- Issue the following command:cd /etc/httpd/conf.d
- Edit theelasticbeanstalk.conffile to have the following data: (Overwrite the file)
- Make changes to the Tomcat config to allow encoded slashes (/usr/share/tomcat8/conf/tomcat8.conf):export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
- Restart Tomcat and httpd services:sudoservice <servicename> restart
The Apache service take a minute or two to be up.
Project Import with Null Password Can Cause Database Issues
The migration of an API from one version to another can cause issue with some databases that attempt to connect and fail then lock the connection out. To solve this, export your API and set your data source to inactive. Because the password is not exported, when you import the API JSON file, you can then enter the password, test connection, and then mark the data source as active.
Resource Properties not Visible
This occurs because the browser is attempting to auto-fill values. API Creator disables this functionality, though certain browsers ignore the disabling. Correct the browser from ignoring the disabling.
Customize Google Chrome. Click the Chrome burger, Settings.
For more information, see Google Chrome help.
Go to Safari, Preferences, AutoFill. Clear the
User names and passwordscheckbox. The following image shows this field on the AutoFill window in Safari:
The following issue is caused by passing a string instead of an object (or vice versa):
caused by: java.lang.ClassCastException: Cannot cast java.lang.String tojdk.nashorn.api.scripting.ScriptObjectMirror
To solve this issue, you can do one of the following:
- Convert a string to an object usingJSON.parse(aString).
- Convert an object to a string usingJSON.stringify(anObject).