× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Are you using JTOpen 1.4 or 4.1 ?
This may not be compatible with your OS/400 version.

On Thu, 4 Dec 2003 17:05:45 -0800, Sandeep Sakhawalkar wrote:

>I am using  JTOpen_1_4 to run the following program. After running the
>program I get the following error "Error connecting: Software caused
>connection abort: JVM_recv in socket input stream read"

>The system admin tells me that he has issued STRHOSTSVR SERVER(*ALL)
>command, so all the host server on OS/400 must be running.

>Is any special privilege required to run this program ?

>Please help.

>Thanks
>Sandeep



>import com.ibm.as400.access.*;

>public class TestCommandCall
>{
>    public static void main(String args[])
>    {
>        AS400 system400 = new AS400(systemname, username, password);
>        System.out.println("Creating CommandCall object...");
>        CommandCall cmdObj = null;
>        try
>        {
>          System.out.println("Connecting...");
>          system400.connectService(AS400.COMMAND);
>          System.out.println("Creating CommandCall object...");
>          cmdObj = new CommandCall(system400);
>        } catch (Exception exc)
>        {
>          System.out.println("Error connecting: " + exc.getMessage());
>          System.exit(1);
>        }
>        runCmd(cmdObj, "ADDLIBLE CUSTLIB");
>        runCmd(cmdObj, "ADDLIBLE CUSTLIB");
>        system400.disconnectAllServices();
>        System.exit(1);
>    }

>    public static boolean runCmd(CommandCall cmdObj, String cmdString)
>    {
>        boolean cmdOK = false;
>        try
>        {
>           System.out.println("Calling command "+cmdString+"...");
>           cmdOK = cmdObj.run(cmdString);
>           System.out.println("Command returned. Result = " + cmdOK);
>        } catch (Exception exc) {}
>        AS400Message msgs[] = cmdObj.getMessageList();
>        if (msgs != null)
>          {
>             for (int idx=0; idx < msgs.length; idx++)
>                System.out.println("Message: " + msgs[idx].getText());
>          }
>        System.out.println();
>        return cmdOK;
>    } // end runCmd method
>}

>The output of this program is shown below,

>C:\AS400\test>java TestCommandCall
>Creating CommandCall object...
>Connecting...
>Error connecting: Software caused connection abort: JVM_recv in socket input
>stream read

>_______________________________________________
>This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
>mailing list
>To post a message email: JAVA400-L@xxxxxxxxxxxx
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/java400-l
>or email: JAVA400-L-request@xxxxxxxxxxxx
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/java400-l.



-----------------------------------------------------------------------------
*** This messages was scanned for malicious contents ***
-----------------------------------------------------------------------------
Franco Biaggi
CH-6807 Taverne


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.