0

I have a webagent under lotus domino xpages that use jacob Library to execute macro under Microsoft Excel the agent work randomly and i have frequently an error.

The error came from this line in the code : final ActiveXComponent excel = new ActiveXComponent("Excel.Application");

System OS :Win2008 server R2 x64 Domino Server 8.5.3 x86 can any one give me a help ?

enter image description here

user2452344
  • 51
  • 1
  • 5
  • Seems it does not like multiple class loaders, what is pure nature of XPages and you can't avoid it. For example: http://stackoverflow.com/questions/5352550/meaning-of-java-lang-classcastexception-someclass-incompatible-with-someclass – Frantisek Kossuth Mar 25 '14 at 16:56

1 Answers1

1

When you load libraries that have a native component (like the jacob library), you should make sure to load them once only. The agent runtime however loads every run using a separate class loader instance. You probably can have success with an XAgent and a application scope managed bean.

Running client type apps (like Excel) is never a good idea on a server

stwissel
  • 20,110
  • 6
  • 54
  • 101