AnsweredAssumed Answered

java.lang.NoSuchFieldError: INSTANCE : LISA Jar conflict with EWS-java-api .jar

Question asked by BharatKhatri on May 20, 2016
Latest reply on Jun 8, 2016 by BharatKhatri

Hi ! I am facing an issue while trying to use exchange web service within ca LISA test case. I am using this web service to read mail and print its contents. I have placed the required jar [ews-java-api.jar] in hot deploy.It has compile dependencies with httpcore and httpclient which also already exists in LISA lib. We are facing the below error while trying to create an instance of a class present in ews-java-api jar.I assume it is probably cause of the jar conflict related to httpcore and httpclient.Could you please help me in understanding this error and how to fix it .

LISA Version:7.5.2

EWS-java-api.jar version

 

The error we are getting:

Target exception: java.lang.NoSuchFieldError: INSTANCE

 

----------------------------------------------------------------------------

STACK TRACE

Sourced file: inline evaluation of: ``import microsoft.exchange.webservices.data.core.ExchangeService;  import microso . . . '' : Typed variable declaration : Object constructor : at Line: 4 : in file: inline evaluation of: ``import microsoft.exchange.webservices.data.core.ExchangeService;  import microso . . . '' : new ExchangeService ( ExchangeVersion .Exchange2010_SP1 )

 

 

Target exception: java.lang.NoSuchFieldError: INSTANCE

 

  at bsh.BSHAllocationExpression.constructObject(BSHAllocationExpression.java:131)

  at bsh.BSHAllocationExpression.objectAllocation(BSHAllocationExpression.java:114)

  at bsh.BSHAllocationExpression.eval(BSHAllocationExpression.java:62)

  at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102)

  at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)

  at bsh.BSHVariableDeclarator.eval(BSHVariableDeclarator.java:86)

  at bsh.BSHTypedVariableDeclaration.eval(BSHTypedVariableDeclaration.java:84)

  at bsh.Interpreter.eval(Interpreter.java:645)

  at bsh.Interpreter.eval(Interpreter.java:739)

  at bsh.Interpreter.eval(Interpreter.java:728)

  at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:316)

  at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:298)

  at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:287)

  at com.itko.lisa.test.ScriptNode._execute(ScriptNode.java:126)

  at com.itko.lisa.editor.ScriptNodeEditor.execute(ScriptNodeEditor.java:100)

  at com.itko.lisa.editor.ScriptNodeEditor.access$000(ScriptNodeEditor.java:42)

  at com.itko.lisa.editor.ScriptNodeEditor$1.actionPerformed(ScriptNodeEditor.java:61)

  at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

  at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

  at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

  at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

  at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)

  at java.awt.Component.processMouseEvent(Unknown Source)

  at javax.swing.JComponent.processMouseEvent(Unknown Source)

  at java.awt.Component.processEvent(Unknown Source)

  at java.awt.Container.processEvent(Unknown Source)

  at java.awt.Component.dispatchEventImpl(Unknown Source)

  at java.awt.Container.dispatchEventImpl(Unknown Source)

  at java.awt.Component.dispatchEvent(Unknown Source)

  at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

  at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

  at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

  at java.awt.Container.dispatchEventImpl(Unknown Source)

  at java.awt.Window.dispatchEventImpl(Unknown Source)

  at java.awt.Component.dispatchEvent(Unknown Source)

  at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

  at java.awt.EventQueue.access$200(Unknown Source)

  at java.awt.EventQueue$3.run(Unknown Source)

  at java.awt.EventQueue$3.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

  at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

  at java.awt.EventQueue$4.run(Unknown Source)

  at java.awt.EventQueue$4.run(Unknown Source)

  at java.security.AccessController.doPrivileged(Native Method)

  at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

  at java.awt.EventQueue.dispatchEvent(Unknown Source)

  at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

  at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

  at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

  at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

  at java.awt.EventDispatchThread.run(Unknown Source)

============================================================================

Outcomes