Unable to deploy Spring Boot App on Glassfish 4.1

后端 未结 2 1674
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 22:23

I have created a Spring Boot application (webservice soap). Everything is ok and application works well trough the integrated tomcat in Spring Boot. When i try to package in

相关标签:
2条回答
  • 2020-12-19 22:33

    In my case this error message was hiding an incompatibility between the versions of hibernate 5 and jboss-logging.

    The problem was that the jboss-logging version provided by spring boot (3.3.0.Final) was being overridden by an older version already included in the glassfish libraries (3.1.3-GA), under the "modules" directory.

    The solution was to add a "glassfish-web.xml" file under the "WEB-INF" folder of the webapp, with the following content (as suggested in https://stackoverflow.com/a/38439108).

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
    <glassfish-web-app>
         <class-loader delegate="false"/>
    </glassfish-web-app>
    

    This ensures the loading of the project libraries instead of the server ones. After that change, the spring boot project run on glassfish flawlessly.

    0 讨论(0)
  • 2020-12-19 22:41

    Bug in glassfish. Fix in the 4.1.1 version

    0 讨论(0)
提交回复
热议问题