<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Start process on JBoss Server
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/zearys">zearys</a> in <i>JBoss Tools</i> - <a href="http://community.jboss.org/message/618844#618844">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi, </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I&rsquo;m using SQLLoader to load data into my tables from a process. I would like to lunch this process once a user presses a button in my web interface. So I made tests in a single main before adding and everything was fine. Once I place the code on my JBoss Server nothing work anymore.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I would like to know why the code don't react same way on Jboss sever as on a regular java application for process execution? And what may I do to make the same code react the same way?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In a main, executed as java application, this code results X successful lines:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code jive-java">String[] exec = <font color="navy"><b>new</b></font> String[] <font color="navy">{</font><font color="red">"sqlldr"</font>,<font color="red">"userid=ab@devl/abc"</font>,<font color="red">"control=C:/controls.txt"</font>,<font color="red">"log=C:/"</font> <font color="navy">}</font>;
 
BufferedReader br = <font color="navy"><b>new</b></font> BufferedReader(<font color="navy"><b>new</b></font> InputStreamReader(<font color="navy"><b>new</b></font> ProcessBuilder(exec).start().getInputStream()));
 
<font color="navy"><b>while</b></font> (br.readLine() != <font color="navy"><b>null</b></font>) <font color="navy">{</font>
&#8230;
<font color="navy">}</font>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-family: 'Courier New'; color: black;"> </span>&#160;</p><ol style="list-style-type: decimal;"><li>Controls.txt:</li></ol><pre class="jive-pre"><code class="jive-code">LOAD DATA
INFILE 'C:/03_JUN-11_0210SFAEXDDEFS20110712014140.txt'
APPEND
INTO TABLE S1_DATA_TEST
TRAILING NULLCOLS
(EXERCICE&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CONSTANT&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2011,
 NO_PERIODE&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CONSTANT&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3,
 REGISTRE&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; POSITION(14:20)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CHAR TERMINATED BY WHITESPACE,
 ENTITE&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; POSITION(44:47)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CHAR TERMINATED BY WHITESPACE,
 A&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; POSITION(69:74)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CHAR TERMINATED BY WHITESPACE,
 PERIODE&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; POSITION(219:224)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CHAR TERMINATED BY WHITESPACE,
 DESCRIPTION&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; POSITION(234:474)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; CHAR TERMINATED BY WHITESPACE,
 B&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; POSITION(475:496)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DECIMAL EXTERNAL "to_number(replace(:B,'.',','))",
)
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And once on the JBoss server with the same code :</p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,339 ERROR [STDERR] java.io.IOException: CreateProcess: sqlldr userid=ab@devl/abc control=C:/controls.txt log=C:/ error=2</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,339 ERROR [STDERR]&#160; at java.lang.ProcessImpl.create(Native Method)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,339 ERROR [STDERR]&#160; at java.lang.ProcessImpl.&lt;init&gt;(ProcessImpl.java:81)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,339 ERROR [STDERR]&#160; at java.lang.ProcessImpl.start(ProcessImpl.java:30)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,339 ERROR [STDERR]&#160; at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,339 ERROR [STDERR]&#160; at exportation.Sqlldr.executer(Sqlldr.java:74)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,339 ERROR [STDERR]&#160; at exportation.Sqlldr.executer(Sqlldr.java:34)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,355 ERROR [STDERR]&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,355 ERROR [STDERR]&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,355 ERROR [STDERR]&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)</span></p><p><span style="font-family: 'Courier New'; color: black; background: none repeat scroll 0% 0% red;">09:58:29,355 ERROR [STDERR]&#160; at java.lang.reflect.Method.invoke(Method.java:585)</span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/618844#618844">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>