Updating vAPP fails with "not-null property references a null or transient value: com.vmware.vcloud.common.model.net.LogicalNetworkModel.ipScope"




Error seen in the logs :

2019-01-21 11:07:24,468 | WARN | pool-jetty-375118 | BatchTask | Error executing backend call. | requestId=162e9773-8e5c-4499-a00d-747c
4fd49bbd,request=POST https://clientportal.cloud.com/cloud/amfsecure,requestTime=1548049030064,remoteAddress=172.16.112.50:30049,userAgent=Mozilla/5.0 (Windows NT 10.0
; Win64; x64) AppleWebKit/537.36 ...,accept=*/* method=networkService.createOrgVdcNetwork
org.hibernate.PropertyValueException: not-null property references a null or transient value: com.vmware.vcloud.common.model.net.LogicalNetworkModel.ipScope
at org.hibernate.engine.Nullability.checkNullability(Nullability.java:95)
at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:292)
at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:151)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1589)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:328)


Why ? 

This happens when the logical network ip scope table vCloud director database has NULL values.

What to do ? 

Firstly, raise a ticket with the VMware Support. It is advised to log a ticket and get the error stack validated as it may look almost similar in some other scenarios.  You can probably share this blog with the VMware tech guy for faster resolution.

- Take a backup of the vCloud director database. This is very very important. 
- Run the below SELECT query (Below query does not perform any update)

select logical_network.ip_scope_id, logical_network.id from logical_network left join logical_network_ip_scope on logical_network.id = logical_network_ip_scope.logical_network_id where logical_network_ip_scope.logical_network_id is null

- The above query will provide you the ID's that is missing and needs to be updated. The output will look like below

 0xBF2C604F4EEF4E5085F7D84804B7460A 0x505739E1303340369065F41C2CF18C69

- Finally, insert the missing IDs using the below query

insert into logical_network_ip_scope (scope_id, logical_network_id) values (0xBF2C604F4EEF4E5085F7D84804B7460A,0x505739E1303340369065F41C2CF18C69 )

The above query can be run with the VCD service running.

Good Luck ! Cheers :)

Comments

Popular posts from this blog

vCloud director 9.7 appliance deployment step by step guide

How to Install and Uninstall Guest agent for vRA Windows machines

Unable to change Provider VDC virtual hardware support beyond version 10