LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW type casting error

I am using JNI to access underlying Java code. The problem seems to be that when I type cast Interface 'IDfPersistentObject' to Interface 'IDfSysObject(SubInterface of'IDfPersistentObject'). Type casting itself seems to go without a problem ,but when I call the method in IDfSysObject, I get the following error

code: -2146959355
Source: Server execution failed in docuInterface.vi



IDfSysObject sysObj = (IDfSysObject)sess.newObject("dm_document");
sysObj.setObjectName("testObject");
sysObj.setSubject("DFC Example Doc");
sysObj.setContentType("crtext");
sysObj.setFile("c:\dfctest.txt");
sysObj.link("/DFCTest");
sysObj.save();
o in LabVIEW>
Download All
0 Kudos
Message 1 of 3
(2,786 Views)

As I don't have much Java experience, I may not be able to help a lot with the Java side. However, I have seen this exact error number before in LabVIEW. This KnowledgeBase describes this same error when working with Microsoft Word 2000. Now, the two may not be related, but maybe it can lead you in the right direction.

J.R. Allen
0 Kudos
Message 2 of 3
(2,786 Views)
I tried it. It does not work.
0 Kudos
Message 3 of 3
(2,786 Views)