Description

This article explains how to fix the search issue with the variable object

Symptoms

You will get the following error from the SD.log under /var/log/jboss/servers/server1/:

 

2026-01-12 16:38:26,983 ERROR [net.juniper.jnap.sm.om.ejb.AbstractObjectManagerHandler] (default task-52) Could not execute Name query : net.juniper.jnap.sm.om.jpa.VariableDefinitionEntity.getAllVariables: javax.ejb.EJBTransactionRolledbackException: HTTP 404 Not Found

Caused by: net.juniper.jnap.sm.common.SMException: Invalid Identifier: 267289

Run the below commands to get the name of the variable having issues for all IDs from the logs:

mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') sm_db

select name from VariableDefinition where variableObjRef=267289;

Solution

Once you get the name of the variable, please follow the steps below to delete the problematic variable:

mysql -ujboss -p$(grep mysql.jboss /etc/sysconfig/JunosSpace/pwd | awk -F= '{print $2}') sm_db

mysql> select * from VariableDefinition where name=" TestVar" \G;

 

id: 491593

domainId: 3

version: 1

createdAt: 1764600158651

createdByUserName: super

definitionType: NULL

editVersion: 1

lastModifiedAt: 1764600158651

lastModifiedByUserName: super

owningSystem: NULL

defaultValue: 458758

description: 

name: TestVar

variableObjRef: 267289

variableType: 3 

 

1. Since Variable objects will be used in group policy, we need to unassign from rules where we are using this Variable object from SD UI.

2. Then we can use below delete command for each Variable Object ID:

 

delete from VariableDefinition_VariableValue where VariableDefinitionEntity_id=491593;

delete from VariableValue where parent_id=491593;

delete from AddressReferenceEntity where referrerId=491593;

delete from ADDRESSENTITY where variableId=491593;

delete from VariableDefinition where id=491593;

 

3. After deleting from the above table and from rules, from UI then we shouldn't find in any reference table, we can verify by using below select queries:

 

select * from VariableDefinition_REFERENCES where refereeId=491593;

select * from ADDRESS_REFERENCES where refereerId=491593;

 

After performing above steps for all Variable objects, then we can do refresh search index.

Modification History

2026-02-02 : Article Created