Error when trying to create Reserved Services with long characteristic values
OSOM returned the error below:
13:26:45.303 [task-6] ERROR o.e.o.o.m.ServiceOrderManager - Cannot create Service for spec a782c5a7-b5b2-44d9-8c76-3f53655adcea: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[0DA8B2B9F6D8BC2-0000000000000D8C]
13:26:45.303 [task-6] ERROR o.e.o.o.m.CreateReservedService - Service was not created for spec: join-external-k8s-worker-rfs
13:26:45.312 [task-6] ERROR o.f.c.e.i.interceptor.CommandContext - Error while closing command context
java.lang.NullPointerException: Cannot invoke "org.etsi.osl.tmf.sim638.model.Service.getId()" because "createdUnderlService" is null
at org.etsi.osl.osom.management.CreateReservedService.execute(CreateReservedService.java:136)
This was invoked by a TMF API error, as below:
13:27:43.420 [Camel (camel-1) thread #25 - JmsConsumer[CATALOG.ADD.SERVICE]] INFO o.e.o.t.s.service.ServiceRepoService - Will add service: join-external-k8s-worker-rfs
13:27:43.432 [Camel (camel-1) thread #25 - JmsConsumer[CATALOG.ADD.SERVICE]] WARN o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: 1406, SQLState: 22001
13:27:43.432 [Camel (camel-1) thread #25 - JmsConsumer[CATALOG.ADD.SERVICE]] ERROR o.h.e.jdbc.spi.SqlExceptionHelper - Data truncation: Data too long for column 'alias' at row 1
13:27:43.436 [Camel (camel-1) thread #25 - JmsConsumer[CATALOG.ADD.SERVICE]] ERROR o.a.c.p.e.DefaultErrorHandler - Failed delivery for (MessageId: queue_CATALOG.ADD.SERVICE_ID_8ee3574db3da-38553-1726060702805-1_155_1_1_6 on ExchangeId: 7FAF67A98C6FD24-0000000000000BAF). Exhausted after delivery attempt: 1 caught: org.springframework.dao.DataIntegrityViolationException: could not execute statement [Data truncation: Data too long for column 'alias' at row 1] [insert into service_restriction_characteristic (base_type,href,schema_location,type,name,alias,value,value_type,uuid) values (?,?,?,?,?,?,?,?,?)]; SQL [insert into service_restriction_characteristic (base_type,href,schema_location,type,name,alias,value,value_type,uuid) values (?,?,?,?,?,?,?,?,?)]
Because it couldn't save a characteristicValue with LONGTEXT alias (as it doesn't match the SQL type of alias property).
OSOM should not try to create a reserved service, passing both "value" and "alias" property with the same value, but only pass the "value" property (which does not have a character limit)