美文网首页
Jacob 1.8 com.jacob.com.ComFailE

Jacob 1.8 com.jacob.com.ComFailE

作者: Dino | 来源:发表于2018-04-26 16:47 被阅读54次

About this exception:

2018-04-26 16:13:20,929 ERROR [stderr] (Thread-94) com.jacob.com.ComFailException: Invoke of: Add
2018-04-26 16:13:20,929 ERROR [stderr] (Thread-94) Source: Microsoft Excel
2018-04-26 16:13:20,929 ERROR [stderr] (Thread-94) Description: Unable to get the Add property of the Workbooks class
2018-04-26 16:13:20,929 ERROR [stderr] (Thread-94)

The background

Server: Wildfly 11.0
JDK: 9.04
JACOB: 1.8

When generate excel report using jacob 1.8 and run Wildlfy as window service, it will throw this exception, it works when running form eclipse.

how to fix it

  1. Create a new user account, add to administrator group
  2. Run windows service as created user account
  3. Run> dcomcnfg
    This will open Component Services and navigate to Console Root
    \Component Services\Computers\My Computer\DCOM Config\Microsoft Excel Application
    Right click Microsoft Excel Application and select Properties
    Click on Identity Tab and check selection.
    It works for me when select option - This user


    image.png

相关文章

网友评论

      本文标题:Jacob 1.8 com.jacob.com.ComFailE

      本文链接:https://www.haomeiwen.com/subject/trrmlftx.html