SAP JCO & Domino/Linux

Derek Colley derek at netsimple.net
Fri Sep 27 14:10:55 MET DST 2002


I don't know much about the debug functionality of Domino, but perhaps
it would help if you make the class very verbal.

By that, I mean - put System.out.println("Debug line 1"); on every 2nd
line. This should tell you which line is causing the crash.

In the log you can expect something like:
Debug line 1
Debug line 2
Debug line 3

That should tell you that the java statements between line 3 and 4 are
giving you problems.

Rgds,
Derek

On Fri, 2002-09-27 at 12:44, Dmitry Melekhov wrote:
> 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?
> 
> _______________________________________________
> linux.general mailing list
> linux.general at listserv.sap.com
> http://listserv.sap.com/mailman/listinfo/linux.general





More information about the linux.general mailing list