Service Desk Practitioners Forum
cancel

running sd_export in non-interactive mode

Highlighted
Dean Morrell
Honored Contributor.

running sd_export in non-interactive mode

I'm trying to set up an automated export/import using data exchange. It works just fine, except for when there's an error - then, com.hp.ifc.ext.exp.Extractor opens a GUI dialog box and waits forever for a human to click "ok".

What I really want here is for it to simply crash out by itself, puke the exception to stdout or stderr, and return != 0.

Is there a parameter that I can pass to com.hp.ifc.ext.exp.Extractor to disable the dialog box?

Any other suggestions?

Thanks,
-d
I know the voices in my head aren't real, but they still have some REALLY FUN ideas.
3 REPLIES
Dean Morrell
Honored Contributor.

Re: running sd_export in non-interactive mode

Ok, found some more details...

The dialog box is being created in the OnException constructor inside of Extractor.jar.

I can probably make it close itself automatically by calling dispose(); at the end of the constructor, after show(); (right now, dispose() is called by the action listener tied to the button.)

Does anyone have a more elegant solution? I don't like doing it this way -- it just screams of bad karma.

-d
I know the voices in my head aren't real, but they still have some REALLY FUN ideas.
Dean Morrell
Honored Contributor.

Re: running sd_export in non-interactive mode

Ok.. so here's what I ended up doing, in case anyone else runs into this:

I created a perl script which calls java directly (instead of calling sd_exchange.bat which calls sd_export.bat and/or sd_import.bat). I used the -Xbootclasspath/p: switch, like so:
-Xbootclasspath/p:\custom_java;lib\export.jar;lib\import.jar

Next, I created a new version of OnException.class -- instead of calling show() in the constructor, I call dispose(). I placed this class in \custom_java\com\hp\ifc\ext\exp.

This way, it only uses the modified OnException class when the boostrap classpath is set - so if anything other than my perl script tries to use the exporter/importer, it will use only "out of the box" code, and they'll get the dialog box they expect if it errors out.

-d
I know the voices in my head aren't real, but they still have some REALLY FUN ideas.
Dean Morrell
Honored Contributor.

Re: running sd_export in non-interactive mode

resolved with java hack detailed above
I know the voices in my head aren't real, but they still have some REALLY FUN ideas.