Exception on Oracle: Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens

Issue Symptoms

 

When updating or launching the iObeya application, you get the following error in the logs:

org.hibernate.HibernateException: com.fasterxml.jackson.core.JsonParseException: Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens

 

Solution

 

This is a JDBC driver issue. Your driver version may no longer be compatible with the Java version you have installed. You need to update your JDBC connector to a new driver version. At least ojdbc8.jar for Java 8 and ojbc11.jar for Java 11.

 

  1. Stop Tomcat
  2. If you are using Java 8 download the ojdbc8.jar connector. if you are using Java 11 download the ojdbc11.jar connector (https://www.oracle.com/fr/database/technologies/appdev/jdbc-downloads.html)
  3. Remove the ojdbc7.jar connector from the tomcat libraries
  4. Add the new version of the connector to the Tomcat libraries
  5. Start Tomcat

Support


If you require assistance to resolve the problem, please ask for support. (See Requesting Support)

Setup & maintenance

Exception on Oracle: Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens

Issue Symptoms

When importing rooms on a platform running on an Oracle database, you get the following error in the iObeya logs:

2020-05-29 13:45:16 ERROR [SqlExceptionHelper] ORA-01000: maximum open cursors exceeded
2020-05-29 13:45:16 ERROR [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.iobeya.api.event.type.room.RoomPostImportEvent@47f2b9e9] from the invoker [com.iobeya.event.MethodSelectorListenerHandler$1$1@29dbd9f1]
java.lang.RuntimeException: could not extract ResultSet

Solution

By default, Oracle database allows 50 open_cursors per connection session. Increase the open_cursors count limit to solve the problem.


Assuming that you are using a SPFILE to start your Oracle database, connect as a DBA to and run the following command:

alter system set open_cursors = 500 scope=both;

If you are using a PFILE instead, you can change the setting for the running instance with the following command:

alter system set open_cursors = 500;

You will also need to edit the parameter file to specify the new open_cursors setting to be taken into account the next time you will restart your Oracle instance. We highly recommend restarting the database shortly thereafter to make sure that the parameter file change works as expected.

Setup & maintenance

Exception on Oracle: Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens

Issue Symptoms

 

When running database scripts (to create or update), the following error occurs:

"Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.  To disable safe mode, toggle the option in Preferences -> SQL"

 

Solution

 

You must disable this safe mode by passing the parameter: SET SQL_SAFE_UPDATES = 0; in the MySql configuration file.

 

To do this, use the tomcat service and stop mysql:

  1. Edit the my.ini configuration file
  2. Search for "SQL_SAFE_UPDATES".
  3. Make the change
  4. Save and restart services.

Alternative solution

 

If you are using the MySQL workbench :

  1. Connect to your instance
  2. Go to Edit > Preferences
  3. Uncheck "Safe updates
  4. updates are taken into account after reconnection.

 

Support


If you require assistance to resolve the problem, please ask for support. (See Requesting Support)

Setup & maintenance

Exception on Oracle: Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens

Issue Symptoms

 

When starting Tomcat after an update on Oracle, you get the following error:

ORA-00001: unique constraint (IOBEYA.PK_QRTZ_SCHEDULER_HISTORY) violated 

 

Solution

 

The sequences in the Oracle database must be regenerated and repositioned properly

  1. Shutdown the server
  2. Launch the sync-sequences.sql script in your database
  3. Start the server

Support
If you require assistance to resolve the problem, please ask for support. (See Requesting Support)

Setup & maintenance

Exception on Oracle: Illegal character ((CTRL-CHAR, code 0)): only regular white space (\r, \n, \t) is allowed between tokens

By default, Tomcat uses ISO-8859-1 character encoding when decoding URL received from a browser. This can cause problems if you use international characters in username when creating a user.

To avoid issues with special characters:

  • Stop Tomcat
  • Go in the Tomcat directory
  • Edit conf/server.xml and find the line where the Coyote HTTP Connector is defined. It will look something like this, possibly with more parameters:
    <Connector port="8080"/>
  • Add a URIEncoding="UTF-8" property to the connector:
    <Connector port="8080" URIEncoding="UTF-8"/>
  • Save and close the file
  • Restart Tomcat
Setup & maintenance