# Known issues

The following list describes well known issues in Tempus Serva.

# Container specific

### <span class="mw-headline" id="bkmrk-mysql-1">MySQL</span>

##### <span class="mw-headline" id="bkmrk-error-migrating-from-1">Error migrating from 5.x to 8.x</span>

Error messages

- ORDER BY clause is not in SELECT list, references column ... (\[[more](https://stackoverflow.com/questions/36829911/how-to-resolve-order-by-clause-is-not-in-select-list-caused-mysql-5-7-with-sel%7Clearn)\])
- Invalid default value for 'CreatedAt' (\[[more](https://stackoverflow.com/questions/36374335/error-in-mysql-when-setting-default-value-for-date-or-datetime%7Clearn)\])

The default SQL mode is causing trouble:

- ONLY\_FULL\_GROUP\_BY (prevent order on fields not selected)
- STRICT\_TRANS\_TABLES (prevent default date values)
- NO\_AUTO\_VALUE\_ON\_ZERO (allow default date values)

Temporary fix

```mysql
SET GLOBAL sql_mode='NO_AUTO_VALUE_ON_ZERO';
```

Permanent fix Set it in the configuration file

1. Open my.ini
2. Replace sql\_mode definition with

```ini
sql_mode="NO_AUTO_VALUE_ON_ZERO"
```

##### <span id="bkmrk-"></span><span class="mw-headline" id="bkmrk-driver-for-%2B8.4-not--1">Driver for +8.4 not being used</span>

Make sure that the 8.4 driver is present in

- TOMCAT\\lib
- TOMCAT\\webapps\\XXX\\WEB-INF\\lib

In the application context file: TOMCAT\\conf\\Catalina\\localhost\\XXX.xml

```
driverClassName=com.mysql.jdbc.Driver
```

Should be changed to (simply add '.cj')

```
driverClassName=com.mysql.cj.jdbc.Driver
```

#### <span class="mw-headline" id="bkmrk-import-timeouts-1">Import timeouts</span>

Sometimes large blobs will cause timeouts when running the mysql tool

- Create a config file with (example import.cnf)

```ini
[mysqld]
max_allowed_packet=1024M
innodb_lock_wait_timeout=3600
net_read_timeout=3600
net_write_timeout=3600
wait_timeout=3600
innodb_log_file_size=2048M
innodb_log_buffer_size=2048M
bulk_insert_buffer_size=1024M
```

- Then a parameter in the import --

```powershell
mysql.exe --defaults-file=import.cnf ... 
```

##### <span class="mw-headline" id="bkmrk-unable-to-restart-se-1">Unable to restart services</span>

Kill the underlying processes for both webserver and database

```bash
sudo killall -KILL mysqld_safe mysqld
```

If you cannot start MySQL again try removing the logfiles

```bash
sudo mv /mnt/sda/mysql/ib_logfile0 /mnt/sda/backup/
sudo mv /mnt/sda/mysql/ib_logfile1 /mnt/sda/backup/
sudo mv /mnt/sda/mysql/ibdata1 /mnt/sda/backup/
```

In some cases DB table repairs are needed

```bash
sudo nano /etc/my.cnf
```

Add the line

```ini
innodb_force_recovery = 1
```

#### <span class="mw-headline" id="bkmrk-recover-data-from-ba-1">Recover data from backup</span>

Create a restore script

```bash
 sudo nano ./restoreall.sh
 chmod 777 ./restoreall.sh
```

Add the following

```bash
APP="ts"

for sql_file in `ls /mnt/sda/backup/rsync/${APP}base_*.sql`;
do mysql -uroot -pPASSWORD ${APP}base < $sql_file ;
done

for sql_file in `ls /mnt/sda/backup/rsync/${APP}live_*.sql`;
do mysql -uroot -pPASSWORD ${APP}live < $sql_file ;
done

for sql_file in `ls /mnt/sda/backup/rsync/${APP}test_*.sql`;
do mysql -uroot -pPASSWORD ${APP}test < $sql_file ;
done
```

#### <span class="mw-headline" id="bkmrk-encoding-problems-wi-1">Encoding problems with SQL dumps</span>

If it is caused by special characters (æøå) in the sql files

1. Open the .sql file in Notepad++
2. Set encoding to ANSI
3. Save

### <span class="mw-headline" id="bkmrk-tomcat-1">Tomcat</span>

##### <span class="mw-headline" id="bkmrk-warning-during-serve-1">Warning during server stop</span>

Example

> *SEVERE: The web application \[/sandbox\] registered the JDBC driver \[com.mysql.jdbc.Driver\] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.*

The warning is of no importance because the shutdown automatically kills all objects in memory, and no memory leaks are there possible.

### <span class="mw-headline" id="bkmrk-jboss-1">JBoss</span>

##### <span class="mw-headline" id="bkmrk-warn-errors-during-b-1">WARN errors during boot</span>

Example

> *17:56:40,337 WARN \[org.jboss.as.server.deployment\] (MSC service thread 1-12) Class Path entry* ...

The warnings are due to jar taht have their version number appended to their name. Possible fixes include stripping the names of all jar files in the /WEB-INF/lib/, but recommended solution is ignoring the warnings.

# Designer

##### <span class="mw-headline" id="bkmrk-references-not-fixed-1">References not fixed during restore where components need renaming (solution/bundles)</span>

Workaround: Correct all parent/child references manually and redeploy solution

##### <span class="mw-headline" id="bkmrk-solution-configurati-1">Solution configurations cannot be set to an empty value</span>

Workaround: Set value to single whitespace " ".

##### <span class="mw-headline" id="bkmrk-old-backups-from-oth-1">Old backups from other solutions found in list of backups</span>

When deleting solutions the Designer does not delete corresponding backups (saftety reasons).

In the future a list will be implemented to browse older backups, but untill hen you should just ignore this issue.

# Engine

No unfixed issues

# Frontend

##### <span class="mw-headline" id="bkmrk-certain-texts-result-1">Certain texts result in error when saving</span>

When saving you get an error that looks like this

```
Incorrect string value: '\xC2\x94s\xC3
```

Your database is in legacy format and needs updating

```
main?command=dk.p2e.blanket.codeunit.common.PageConvertDatabaseToUTF8
```

##### <span class="mw-headline" id="bkmrk-special-characters-a-1">Special characters are not displayed correctly</span>

You might be using an older version of the database that is not using UTF8. This can bo corrected by running this codeunit:

```
main?command=dk.p2e.blanket.codeunit.common.PageConvertDatabaseToUTF8
```

##### <span class="mw-headline" id="bkmrk-media-files-sometime-1">Media files sometimes don't display after a boot</span>

Media files are stored temporarily within the web application when requested. Depending of the speed of the underlying filesystem, they will not always be available for the server right away.

- Workaround: Reload the page (F5)
- Resolution: Tweak the configuration parameter **mediaFilterDelayMS**

##### <span class="mw-headline" id="bkmrk-upload-of-files-fail-1">Upload of files fails after server restart</span>

Sometimes tempoarray folders are not reestablished after the server boots

- Frontend: Personal menu &gt; Services &gt; Rebuild folders
- Backend: Modules &gt; Admin services

##### <span class="mw-headline" id="bkmrk-an-error-has-occurre-1">An error has occurred</span>

Sometimes low-level tampering with field configuration, or force changing field types will result in this error.

- Workaround: Deploy solution
- Resolution 
    1. Check which field fails: Modules &gt; Event viewer
    2. Delete field and create again

##### Natural sorting is off

Versions 11840 - 11899 had an issue where default "natural" sorting, sorted using a concatenated value og the DataID and resume, making the sorting weird and unpredictable.