TRIRIGA

 View Only

M365 Integration in 4.5.3 | Room Reservation

  • 1.  M365 Integration in 4.5.3 | Room Reservation

    Posted 13 days ago
    Edited by Edwin Premkumar David 12 days ago

    Hello - 

    We are in the process of upgrading the platform from 3.8 to 4.5.3 where we are facing issues in connecting to M365.  As part of the reservation module there is a feature to syncup the reservation to mailbox in M365. Prior to 4.3 this communication was happening over EWS and now this is using GraphAPI. 

    Error#1: 

    Root cause: java.lang.NoSuchMethodError: org/apache/axiom/soap/SOAPBody.getSAXResult()Ljavax/xml/transform/sax/SAXResult; (loaded from file:/D:........../org.apache.axis2.jar

    by org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@9d9f7bd5[org.apache.axis2:7.0.0(id=275)]) called from class org.springframework.ws.soap.axiom.CachingPayload (loaded from file:/D:/IBM/WebSphere/AppServer/.........../IBM-TRIRIGA_Build-400252.ear/ibm-tririga.war/WEB-INF/lib/spring-ws-core-3.1.3.jar by 
    com.ibm.ws.classloader.CompoundClassLoader@84b865ea[war:IBM-TRIRIGA_Build-400252/ibm-tririga.war]

    Local ClassPath: .....................

    Parent: com.ibm.ws.classloader.CompoundClassLoader@ff24851d[PF][app:IBM-TRIRIGA_Build-400252]

       Delegation Mode: PARENT_FIRST

       Library Class Loader: com.ibm.ws.classloader.CompoundClassLoader@33034e06[PL][library:TRIRIGAOverride]

       Library Class Loader: com.ibm.ws.classloader.CompoundClassLoader@5671f049[PL][library:TRIRIGA_IBM_ICU4_8_1_1]).[MID-3086986130]

    Explanation: 

    • spring-ws-core-3.1.3.jar is trying to load the class org.apache.axiom.soap.SOAPBody and WebSphere is providing that class from org.apache.axis2.jar. This is a outdated jar which does not have getSAXResult() method.
    • Ideally the JVM should be loading SOAPBody class from axiom-api-1.4.0.jar which is part of the 4.5.3 TRIRIGA lib. 

    Attempt#1: 

    1. Following the general & recommended practice we tried to resolve the conflict by placing the axiom-api-1.4.0.jar & axiom-impl-1.4.0.jar in the TRIRIGAOverride library; which resulted in error below - 

    Error#2: 

    Caused by: java.lang.IncompatibleClassChangeError

          at org.apache.axiom.om.impl.builder.StAXOMBuilder.createDocument(StAXOMBuilder.java:184) ~[org.apache.axis2.jar:?]

          at org.apache.axiom.om.impl.builder.StAXOMBuilder.<init>(http://StAXOMBuilder.java:105) ~[org.apache.axis2.jar:?]

          at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(http://StAXSOAPModelBuilder.java:167) ~[org.apache.axis2.jar:?]

          at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createAxiomSoapMessage(AxiomSoapMessageFactory.java:273) ~[spring-ws-core-3.1.3.jar:?]

          at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:244) ~[spring-ws-core-3.1.3.jar:?]

          at org.springframework.ws.soap.axiom.AxiomSoapMessageFactory.createWebServiceMessage(AxiomSoapMessageFactory.java:85) ~[spring-ws-core-3.1.3.jar:?]

          at org.springframework.ws.transport.AbstractWebServiceConnection.receive(AbstractWebServiceConnection.java:89) ~[spring-ws-core-3.1.3.jar:?]

          at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:593) ~[spring-ws-core-3.1.3.jar:?]

          at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:542) ~[spring-ws-core-3.1.3.jar:?]

          at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:394) ~[spring-ws-core-3.1.3.jar:?]

          at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:388) ~[spring-ws-core-3.1.3.jar:?]

          at com.tririga.platform.ews.ExchangeServiceImpl.send(ExchangeServiceImpl.java:893) ~[ibm-tririga.jar:?]

          at com.tririga.platform.ews.ExchangeServiceImpl.getFolderId(ExchangeServiceImpl.java:851) ~[ibm-tririga.jar:?]

          at com.tririga.platform.ews.ExchangeServiceImpl.getCalendarFolderId(ExchangeServiceImpl.java:836) ~[ibm-tririga.jar:?]

          at com.tririga.platform.ews.ExchangeServiceImpl.createAppointmentInternal(ExchangeServiceImpl.java:688) ~[ibm-tririga.jar:?]

          at com.tririga.platform.ews.ExchangeServiceImpl.createAppointment(ExchangeServiceImpl.java:665) ~[ibm-tririga.jar:?]

          at com.tririga.platform.msgraph.MicrosoftAdapter.createAppointment(MicrosoftAdapter.java:97) ~[ibm-tririga.jar:?] 

    Explanation - Cont: 

    • The previous issue was resolved but we got a new error. This time as well JVM tried to load StAXOMBuilder class from org.apache.axis2.jar instead of the overridden library axiom-api-1.4.0.jar. The reason is StAXOMBuilder is not available in axiom-api-1.4.0.jar.
    • When analyzed further, it looks like spring-ws-core-3.1.3.jar is compatible with axiom-api-1.2.20 and not 1.4.0 version. 

    Attempt #2:

    • We attempted to use the axiom-api-1.2.20.jar and axiom-impl-1.2.20.jar as override jars which resulted in fatal error where the application wont startup.

    Error#3: 

    2024-09-27 15:09:39,511 ERROR [com.tririga.web.servlet.SpringWebInitServlet](server.startup : 2) ERROR BeansException initializing Spring Application Context

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'versionService' defined in class path resource [com/tririga/platform/spring/upgrade.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.IllegalArgumentException: Class 'com.ibm.tririga.platform.model.bo.service.advice.DsRuntimeServiceBoSessionAspect' is not an @AspectJ aspect

    Why is this a problem in 4.5.3 and not the prior versions? 

    Looks like it's all related to the below update in 4.3. 

    Unless IBM had axiom-api-1.2.20.jar or supported lower version in their workspace, wonder how this testing would have passed. (prior to 4.3, axiom-api-1.2.11.jar was part of the WAR)

    I did lookup the 5.0 release notes and was not finding any fixes related to this or M365 integration in general. I did submit a PMR and waiting for a call. 

    Did anyone face this issue or have any suggestions that we could try.? 



    ------------------------------
    Edwin David
    ------------------------------