Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

94
Visualizações
Different response when application deployed in jBoss 6.2 vs jBoss 7.3

We have recently upgraded our jBoss EAP from 6.2 to 7.3.0.

After the upgrade we have observed that the application started behaving weirdly. We are using spring framework version - 4.1.9.RELEASE.

For example:

@RestController
public class CommonController{

@RequestMapping(value = "/rest/report/testResponse", method = RequestMethod.GET)
    public @ResponseBody List<Entry<String, Number>> getData(){
        List<Entry<String, Number>> technologyList = new ArrayList<>();
        SimpleEntry<String, Number> simpleEntry1 = new AbstractMap.SimpleEntry<String,Number>("Java",1);
        SimpleEntry<String, Number> simpleEntry2 = new AbstractMap.SimpleEntry<String,Number>("Spring",2);
        technologyList.add(simpleEntry1);
        technologyList.add(simpleEntry2);
        return technologyList;
    }
}

The response I am getting when application was deployed in jBoss 6.2 is:

[
{
"key": "Java",
"value": 1
},
{
"key": "Spring",
"value": 2
}
]

The response I am getting when application is now deployed in jBoss 7.3 is:

[
{
    "Java": 1
}, 
{
    "Spring": 2
}
]

As you can see there is a subtle difference in above two responses. This is breaking my frontend code where we have used javascript code like below, since now in jBoss7 we are not getting response with key/value prepended :

<ui-select-choices repeat="obj.value as obj in  technologyList |  orderBy:'key'">
   <div class ="small" ng-bind-html="obj.key" title ="{{obj.key}}"></div>
</ui-select-choices>

We can not modify the backend/frontend code because the application is already running in production and it will not be possible to change the code at many places. We just want to upgrade the jBoss version.

Anyone faced the similar issue, please comment/suggest the resolution.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This was an issue for jackson which is by default used for serialization.

Here is the release when the change was brought to jackson. The problem that you face is also mentioned in compatibility issues for Jackson 2.5

JBoss 7.3 probably comes with an already included library of jackson so this is where you are affected. Check here how to exclude provided Jackson from JBoss 7

Then pack your application with a jackson library earlier than 2.5 and deploy it again.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda