CONFIGURACIÓN ADICIONAL JBOSS 7.0 RESPECTO DEL JBOSS 7.1
1.
Error con Jackson en versiones de JBOSS 7.0 y
7.1
Cannot upload
deployment: {"WFLYCTL0080: Failed services" =>
{"jboss.undertow.deployment.default-server.default-host./essalud-iafas-siteds"
=> "org.jboss.msc.service.StartException in service
jboss.undertow.deployment.default-server.default-host./essalud-iafas-siteds:
java.lang.RuntimeException:
org.springframework.context.ApplicationContextException: Unable to start web
server; nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'formContentFilter' defined in class path
resource
[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]:
Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException:
Failed to instantiate
[org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory
method 'formContentFilter' threw exception; nested exception is
java.lang.VerifyError: Failed to link com/fasterxml/jackson/databind/type/ReferenceType
(Module \"deployment.essalud-iafas-siteds.war:main\" from Service
Module Loader): Cannot inherit from final class Caused by:
java.lang.RuntimeException:
org.springframework.context.ApplicationContextException: Unable to start web
server; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'formContentFilter' defined in class path resource
[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]:
Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory
method 'formContentFilter' threw exception; nested exception is
java.lang.VerifyError: Failed to link
com/fasterxml/jackson/databind/type/ReferenceType (Module
\"deployment.essalud-iafas-siteds.war:main\" from Service Module
Loader): Cannot inherit from final class Caused by: org.springframework.context.ApplicationContextException:
Unable to start web server; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'formContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]:
Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory
method 'formContentFilter' threw exception; nested exception is
java.lang.VerifyError: Failed to link
com/fasterxml/jackson/databind/type/ReferenceType (Module
\"deployment.essalud-iafas-siteds.war:main\" from Service Module Loader):
Cannot inherit from final class Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'formContentFilter' defined in class path resource
[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]:
Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory
method 'formContentFilter' threw exception; nested exception is
java.lang.VerifyError: Failed to link
com/fasterxml/jackson/databind/type/ReferenceType (Module
\"deployment.essalud-iafas-siteds.war:main\" from Service Module
Loader): Cannot inherit from final class Caused by:
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.boot.web.servlet.filter.OrderedFormContentFilter]: Factory
method 'formContentFilter' threw exception; nested exception is
java.lang.VerifyError: Failed to link
com/fasterxml/jackson/databind/type/ReferenceType (Module
\"deployment.essalud-iafas-siteds.war:main\" from Service Module
Loader): Cannot inherit from final class Caused by: java.lang.VerifyError:
Failed to link com/fasterxml/jackson/databind/type/ReferenceType (Module
\"deployment.essalud-iafas-siteds.war:main\" from Service Module
Loader): Cannot inherit from final class"}}
Solucion:
The spring
boot 2.0 war created by the maven or gradle war plugin will work on jboss EAP
7.1. The same war file will through an exception on jboss EAP 7.0 server.
The
exception is java.lang.VerifyError: Failed to link
com/fasterxml/jackson/databind/type/ReferenceType
The
deployment exception arises becuse the jboss has it own jackson library and a
class loading time verification error occours.
SOLUTION : The solution to this problem
is to add a jboss specific xml file named jboss-deployment-structure.xml in to
the WEB-INF folder.
<?xml
version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure
xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<exclusions>
<module
name="com.fasterxml.jackson.core.jackson-annotations" />
<module
name="com.fasterxml.jackson.core.jackson-core" />
<module
name="com.fasterxml.jackson.core.jackson-databind" />
<module
name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" />
<module
name="org.jboss.resteasy.resteasy-jackson2-provider" />
<module
name="org.slf4j" />
</exclusions>
</deployment>
</jboss-deployment-structure>

0 Comentarios