cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kruthim
Level 2

Uploading model definition for FNE Local License server is giving 406 error: HttpMediaTypeNotAcceptableException

I am getting below 406 error while uploading a simple model definition to the FNE Local License Server using the command-line flexnetlsadmin tool: 

Server responded with a 406 and an error message of:
key='org.springframework.web.HttpMediaTypeNotAcceptableException'
message='org.springframework.web.HttpMediaTypeNotAcceptableException'
arguments=[Could not find acceptable representation]

model "exampleModel" {
on hostid("ABC") {
use "default"
accept}
on any() {
deny
}
}

I am running this command: 
flexnetlsadmin -server licenseServer_baseURL  -model -load definition.model

Note: I have not setup any security password for the server

Note: Uploading the same model using REST API (/rules) is working fine. But the command line tool is giving HttpMediaTypeNotAcceptableException error. 

0 Kudos
(2) Replies
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @kruthim ,

I'm wondering if perhaps you have some extra characters in your model definition file.  I repeated your test and did not have any issues:

Display current (default) model:

.\flexnetlsadmin.bat -model
model "default" {
on any() {
use "default"
accept}}

Display contents of new model definition file:

more .\newmodel.txt
model "exampleModel" {

on hostid("ABC") {
use "default"
accept }
on any() {
deny
}
}

Load new model definition on server:

.\flexnetlsadmin.bat -model -load .\newmodel.txt

Display current (updated) model:

.\flexnetlsadmin.bat -model
model "exampleModel" {

on hostid("ABC") {
use "default"
accept }
on any() {
deny
}
}

I have attached the new model file to this post.

Thanks,

Jim

0 Kudos
jberthold
Revenera Moderator Revenera Moderator
Revenera Moderator

Hi @kruthim ,

As it turns out this was an issue that has been resolved in the latest server release, 2023.03.  I was testing using this version so I was not able to reproduce the error.   

Best regards,

Jim

0 Kudos