Re: org.jawin.COMException: 8002802b: Element not found.
Roy Collins <[email protected]>
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
The QBXMLRP.dll library is the library for all inter process commnication with quickbooks. If you have quickbooks then you can run TypeBroswer on the file to get the interface. I am running version 2004 which is the same as 2003. At least the interface is the same... it changed only for 2005. Let me know if you can get the QBXMLRP.dll file to load properly with jawin or what errors you have? The code below will do everything to test it you will just have to create the interface classes and compile them. ----- Original Message ----- From: "Robert Hastings" <[email protected]> To: <[email protected]> Sent: Wednesday, March 30, 2005 12:45 PM Subject: Re: [JAWIN] org.jawin.COMException: 8002802b: Element not found. > Roy, that sounds like an OLE Automation error. I think it usually means > that > the method/property you are trying to use cannot be found. I have QB 2003 > so > I can take a look. > > Robert > > -----Original Message----- > From: Discussion of Java/Win32/COM integration with Jawin > [mailto:[email protected]] On Behalf Of Roy Collins > Sent: Tuesday, March 29, 2005 2:49 PM > To: [email protected] > Subject: Re: [JAWIN] org.jawin.COMException: 8002802b: Element not found. > > Thanks for the quick response. > > Here is the test method I use to call everything. It is very simple and > it > is basically the same as the one in the documentation. The method that I > was trying to use is openConnection(String,String) but to test it I am > using > a couple of differnt version methods for simplicity as you also suggested. > I > did remember to use the CoInitalize. > > public void testMe() throws Exception > > { > > Ole32.CoInitialize(); > > IRequestProcessor2 rqProcessor = new > IRequestProcessor2("QBXMLRP.RequestProcessor"); > > System.out.println("Testing"); > > short tmp = rqProcessor.getReleaseNumber(); > > System.out.println(tmp); > > short tmp = rqProcessor.getMajorVersion(); > > System.out.println(tmp); > > System.out.println("TestDone"); > > Ole32.CoUninitalize(); > > > The library that it is trying to run on is a QuickBooks library so it may > be > difficult for you to do anything with it. I can put the classes that Type > Browser creates on a server so you can see them, if that would help. They > are, obvioulsy, just stubs so they are pretty simple as such > public short getReleaseNumber() throws COMException > > { > > return ((Short)get("ReleaseNumber")).shortValue(); > > } > > > > The stack trace is as follows: > > org.jawin.COMException: 8002802b: Element not found. > > at org.jawin.marshal.GenericStub.dispatchInvoke0(Native Method) > at > org.jawin.marshal.GenericStub.dispatchInvoke(GenericStub.java:201) > at org.jawin.DispatchPtr.getN(DispatchPtr.java:248) > at org.jawin.DispatchPtr.get(DispatchPtr.java:171) > at IRequestProcessor2.getReleaseNumber(IRequestProcessor2.java:269) > at testFile.testMe(testFile.java:57) > at testFile.<init>(testFile.java:25) > at testFile.main(testFile.java:41) > > > I am trying to figure out what is failing by looking at the jawin source > but > I cant seem to get a handle on it. I dont really understand what all is > going on yet. > > ----- Original Message ----- > From: "Morten Andersen" <[email protected]> > To: <[email protected]> > Sent: Tuesday, March 29, 2005 3:45 PM > Subject: Re: [JAWIN] org.jawin.COMException: 8002802b: Element not found. > > >> Hi Roy >> >> Sorry for being so slow in answering - I had a couple of days of during >> the Easter. >> >> Roy Collins wrote: >> >>> common problems that might result in this error? From the Element not >>> found >>> it seems as though it can not find the library file, the .dll. I have >>> made >>> sure that the file is on the class path and I even copied it into the >>> same >>> directory. Of course it should be referencing the COM entry in the >>> registry, right? >> >> Exactly. So I don't think there should be any issues regarding the exact >> placement of the dll-files. >> >>> Is there a way I can verify that the library is found if >>> that is what the problem seems to be. I tried calling many differnt >>> methods >>> to be sure that there wasnt an error with just one method but all >>> resulted >>> in the same exception. >> >> Ok. Are there any "simple" methods in the library? E.g. like "String >> getVersion()"? then I think we should start debugging with those. >> >> Since all your methods fails, I wonder whether you are remembering to >> call the Ole32.CoInitialize() and Ole32.CoUninitialize() methods as >> documented here >> http://jawinproject.sourceforge.net/jawin.html#callingStubs >> >> Also, are you constructing the object with either the progid or the >> clsid constructor? You MUST NOT use the public no-arg constructor. >> >> Is the library you are trying to work with part of the default windows >> installation, or in other way accessible for me, so I can test it? Or is >> it a proprietary product? >> >> Finally can you post a snippet of your calling code, and the stacktrace >> of the exception (Exception.printStackTrace() should give you the >> stacktrace on stderr). >> >> Best Regards >> Morten