RuntimeError: The data types numeric and int are incompatible in the '&' operator

Kellen Fields
Kellen Fields
  • Updated

Published Date: April 3, 2025
Validated: Yes
Audience: Internal

Products and Versions Covered:

  • Jama Connect®
  • Self-hosted (Replicated - KOTS)
  • Database: Microsoft SQL Server (MSSQL)

Summary

This article explains how to resolve an error encountered during a Jama Connect® upgrade in a self-hosted (KOTS) environment.


image (2).png

After deploying a new version, users may see a “Tenant does not exist” error when accessing the application. The following error may also appear in the contour.log (core pod):

RuntimeError: An error occurred while upgrading tenant jama_prod: java.sql.SQLException: The data types numeric and int are incompatible in the '&' operator.

This issue occurs when the mask column in the aclpermissionentry table is incorrectly configured with an incompatible data type.

By the end of this article, administrators will understand how to correct the schema and restore application functionality.

Resolution

Follow these steps to resolve the issue:

1. Update the Database Column Type

Run the following query against the Jama Connect database:

ALTER TABLE aclpermissionentry 
ALTER COLUMN mask BIGINT

This ensures the column uses the correct data type required for bitwise operations.

2. Restart the Application StatefulSet

Run the following command on the application server:

kubectl delete sts core

This forces the core pod to restart and pick up the schema change.

3. Redeploy via KOTS Admin Console

  • Access the KOTS Admin Console
  • Redeploy the application as part of the standard upgrade process

Cause

This issue is caused by a schema mismatch in the database.

The mask column in the aclpermissionentry table is set to numeric instead of BIGINT. Since the application uses bitwise operations (such as the & operator), incompatible data types result in a runtime SQL error during tenant upgrade.

Prevention

To prevent this issue in future upgrades:

  • Validate database schema consistency prior to upgrades
  • Ensure required columns match expected data types (e.g., BIGINT for bitmask fields)
  • Include schema validation as part of pre-upgrade checks or runbooks

Additional Resources

Feedback:
We welcome your input! Please sign in to leave any comments, suggestions, or ideas for improvement below.

 

Was this article helpful?

1 out of 1 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.