Glassfish error when producing JSON

前端 未结 2 630
栀梦
栀梦 2020-11-30 02:32

I developed an Android app and now I\'m starting with its external DB and its server, the communication is performed by RESTful web services.

This Android aplication

相关标签:
2条回答
  • 2020-11-30 03:11

    Jack's answer is really helpful.
    It pinpoints the problem and was useful when there was no patch.

    But I suggest instead of editing the jar, since the bug is corrected in 2.6.1, to download it at : org.eclipse.persistence.moxy-2.6.1 from MVNRepository

    OR get the latest version from MVNRepository: https://mvnrepository.com/artifact/org.eclipse.persistence/org.eclipse.persistence.moxy

    and replace it.
    Don't forget to close and reopen you IDE.

    0 讨论(0)
  • 2020-11-30 03:27

    It's a bug in Glassfish 4.1.1 https://java.net/jira/browse/JERSEY-2888

    I was able to fix it in a dirty way:

    In glassfish/modules/org.eclipse.persistence.moxy.jar fix META-INF/MANIFEST.MF Just append the following to Import-Package:

    ,org.xml.sax.helpers,javax.xml.parsers;resolution:=optional,javax.naming;resolution:=optional
    

    so it looks like after:

    enter image description here

    and restart GF

    btw: you can easy edit jars in terminal with

    emacs org.eclipse.persistence.moxy.jar
    
    0 讨论(0)
提交回复
热议问题