javaweb-servicessap-commerce-cloudhybris-data-hub

While migrating from 1811 to 2211 - SAP Hybris commerce getting [SAAJ 1.3] version error


While migrating from 1811 to 2211 - SAP Hybris commerce getting below error.

org.springframework.beans.FatalBeanException: Context hybris Global Context Factory couldn't be created correctly due to, Error creating bean with name 'defaultTestTaxJurisdictionService' defined in class path resource [core-spring.xml]: Cannot resolve reference to bean 'webServiceTemplate' while setting bean property 'webServiceTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webServiceTemplate' defined in class path resource [core-spring.xml]: Cannot resolve reference to bean 'messageFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageFactory' defined in class path resource [core-spring.xml]: Invocation of init method failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create SAAJ MessageFactory. Is the version of the SAAJ specification interfaces [SAAJ 1.3] the same as the version supported by the application server?; nested exception is java.lang.NoSuchMethodError: 'javax.xml.soap.MessageFactory javax.xml.soap.MessageFactory.newInstance(java.lang.String)'

I have added the jar files for above issue but still it's not resolved. Anyone knows about this issue could help here.


Solution

  • Since SOAP-related has been removed from Java 11, try adding Javax XML SOAP API lib in your project.

    You can download it from maven central: https://mvnrepository.com/artifact/javax.xml.soap/javax.xml.soap-api