Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Problem with automating Encyclopedia Restoration
onlysujay
Hi,<br />
<br />
I'm facing an issue trying to restore an encyclopedia using AcImport utility. <br />
<br />
I'm trying to call this using java. However, what I notice is that after a certain stage the process hangs and nothing gets printed in the corresponding "AcImport" log file. (Please find attached the log file: AcImport.exe.___HANGED__.txt)<br />
<br />
Steps followed are the following:<br />
<br />
1. Put the volume offline<br />
2. Run acimport utility using the following command:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'><iServer_Home>\bin\acimport.exe -all -vol <volName> -input "<restore_dir>\_restore" -username <user> -password <password></pre>
<br />
The respective code snippet is as follows:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
//command is a StringBuilder. See the above code snippet for the content of "command"
Process process = Runtime.getRuntime().exec(command.toString());
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
while(reader.readLine() != null)
{
}
</pre>
<br />
I tried to follow what background processes are running (through task manager). Noticed that a couple of them keep on running for ever: "AcImport.exe" and "AcDBUtil.exe" (I've attached a screenshot of the same as well)<br />
<br />
Also, I noticed that when I actually <em class='bbc'>kill the java process</em>, the import starts working yet again and completes within a couple of minutes. (attached is the finished AcImport log: AcImport.exe.__POST_KILL__.txt)<br />
<br />
Note that when I'm trying to do everything manually, the process works fine. I simply take the volume offline through iServer System Configuration Console, execute "AcImport" through command line and the process completes within minutes.<br />
<br />
Can you please tell me what am I doing wrong through my code? Any pointers to the java code would really be appreciated.<br />
<br />
Thanks,<br />
Sujay
Find more posts tagged with
Comments
onlysujay
Forgot to add, I'm testing this on Actuate Version: 10 Service Pack 1 Fix 2 (Build 100C090701)
averma
Hi onlysujay,
You can start with debugging your utility to see what command is being generated in your java utility and compare it with the command line that you execute manually. Also make sure are handling your input, output and error streams correctly, sometimes if you don't free up your stream buffers your command execution keeps waiting (varies from OS to OS).
Ashwini