Hello! I'm new to Java and have been tasked with working with the BusinessObjects Java SDK to find a way to script our object promotions. This may not be the right forum to put this in, so I apologize in advance. I found an example script from SAP and I'm trying to use that. It wouldn't work as it was, but I'm closer now that I was before. I have a couple of issues with this code: 1) it terminates almost immediately without explanation, 2) the dispose() method gives the error that it is undefined for the type LivetoLive. If anyone out there has any experience using the BusinessObjects Java SDK, any help would be appreciated.
Have you written much Java® code before? You will doubtless know that the JVM executes the main method and that is used to start the application. But you haven't written anything in your main method. Look here for a typical main method.
I don't know anything about LivetoLive (strange capitalisation; I would have expected a T) but it obviously doesn't have a dispose() method. The business objects people should have a website with API documentation on, where you can check the methods of that type.
posted 2 years ago
What sort of object is it that you would want to call dispose() on?
posted 2 years ago
Campbell Ritchie wrote:What sort of object is it that you would want to call dispose() on?
Hey Campbell! Thanks for the reply. I will read the article that you attached. No, I haven't written much Java at all. I've sort of been thrown into this task without much knowledge of it.
In the example code that I'm getting from SAP, it says "Commit and then dispose of the IObjectManager." Looking at the code in the TRY statement, it seems as though the dispose() method in the FINALLY statement should be disposing of the IExporter. That's my guess, anyway. However, there is no dispose() method for exporter. There is a dispose() method for pipe, but when I define it that way, I get an error on the line above, "pipe.getResult().get();", that says "Unhandled exception type ExecutionException".