JNA MS Office automation broken in JNA 4.2.1

81 views
Skip to first unread message

John D.

unread,
Dec 30, 2015, 10:36:20 PM12/30/15
to Java Native Access
I have a simple demo which can do some MS office automation like create Outlook email item and create Word documents, basically my code is following the example from: https://github.com/java-native-access/jna/tree/master/contrib/msoffice
The example code works fine with JNA 4.1.0, but when I update JNA to latest 4.2.1 release, it's broken.
I get the following exception:  

Exception in thread "main" com.sun.jna.platform.win32.COM.COMException: A null reference pointer was passed to the stub. (puArgErr=)
 at com
.sun.jna.platform.win32.COM.COMUtils.checkRC(COMUtils.java:112)
 at com
.sun.jna.platform.win32.COM.COMUtils.checkRC(COMUtils.java:95)
 at com
.sun.jna.platform.win32.COM.COMBindingBaseObject.oleMethod(COMBindingBaseObject.java:217)
 at com
.sun.jna.platform.win32.COM.COMBindingBaseObject.oleMethod(COMBindingBaseObject.java:322)
 at com
.sun.jna.platform.win32.COM.COMLateBindingObject.invokeNoReply(COMLateBindingObject.java:422)
 at testjna
.MSExcel.quit(MSExcel.java:42)
 at testjna
.MSOfficeDemo.testMSExcel(MSOfficeDemo.java:120)
 at testjna
.MSOfficeDemo.<init>(MSOfficeDemo.java:21)
 at testjna
.MSOfficeDemo.main(MSOfficeDemo.java:13)

following the error it comes from the native code. does anyone encountered the same problem?

Thanks.

Daniel Doubrovkine

unread,
Jan 1, 2016, 10:01:59 AM1/1/16
to jna-...@googlegroups.com
Open a bug please to start. There were a lot of code changes and a lot of this doesn't run through test automation because we don't always have office around. If you have time, run the tests, see if there's anything obvious.

--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

John D.

unread,
Jan 1, 2016, 9:03:53 PM1/1/16
to Java Native Access
Logged an issue against this problem, will run more test later.

在 2016年1月1日星期五 UTC+8下午11:01:59,Daniel Doubrovkine写道:

L Will Ahonen

unread,
Jan 2, 2016, 6:30:03 AM1/2/16
to Java Native Access
Hi,

I feel vaguely responsible for this, as I've done a lot of work around COM lately. Flying back to Canada on tuesday, will take a look at this next week.

Have a happy new year!
Will
Reply all
Reply to author
Forward
0 new messages