SAP JCO & Domino/Linux

Dmitry Melekhov dm at belkam.com
Fri Sep 27 13:44:45 MET DST 2002


Hello!

I understand that this is more Domino question, but.

We use Domino 5.0.8/Linux
I wrote following Java agent for testing:

mport lotus.domino.*;
import com.sap.mw.jco.*;

public class JavaAgent extends AgentBase {

	public void NotesMain() {

		try {
			Session session = getSession();
			AgentContext agentContext = session.getAgentContext();

			// (Your code goes here)
String[][] login_params  = {
        	     		{ "client" ,   "400" },
        			{ "user"   ,   "user" },
        			{ "passwd" ,   "pass" },
              		{ "language" , "RU" },
        	     		{ "codepage" , "1500"    },
        			{ "ashost" ,   "r3dvl.belkam.com"    },
              		{ "sysnr" ,    "00"       },
	        };

		try {
			JCO.Client mConnection=JCO.createClient(login_params);
			mConnection.connect();

			material m = new material();
			System.out.println(m.getName(mConnection,"1500000000"));

		} catch (Exception ex) {
			ex.printStackTrace();
		}

		} catch(Exception e) {
			e.printStackTrace();
		}
	}
}import com.sap.mw.jco.*;

public class material {

	public String getName(JCO.Client conn, String matnr) {
		String xreturn="";
		try {
			IRepository mRepository=new JCO.Repository("ARAsoft", conn);
			JCO.Function 
func_rec=mRepository.getFunctionTemplate("ZMA_ZAJMAT").getFunction();
			func_rec.getImportParameterList().setValue("MATNR = '"+matnr+"' AND
OTKAZ NE 'X'","WHERE_SELECT");
			conn.execute(func_rec);

			JCO.Table t = 
func_rec.getTableParameterList().getTable("ZMA_ZAJMAT_SELECT");
			if (0<t.getNumRows()) {
				xreturn=t.getString("NAZVOBR").trim()+"
"+t.getString("TIPROBR").trim()+" "+t.getString("RAZMOBR").trim()+"
"+t.getString("STANDOBR").trim()+" "+t.getString("PROCHOBR").trim();
			} else {
				xreturn="";
			}

		} catch (Exception ex) {
			ex.printStackTrace();

		} finally {
			conn.disconnect();
		}
		return xreturn;
	}

	public static void main (String args[]) {
		material m = new material();
	}
	
}


It work OK on Domino/win32 server, but Domino/Linux server crashes-
nothing in log, processes works and server doesn't respond.

Any ideas?




More information about the linux.general mailing list