cancel
Showing results for 
Search instead for 
Did you mean: 

sap jco connection

Former Member
0 Kudos

hi everyone,

Here 2 problems are there:...............

1) http://localhost:50000/index.html

in browser i got this message

404 Not Found

SAP NetWeaver Application Server 7.10 / AS Java 7.10

The requested resource does not exist.

Details: Go to main page of this application!

2) I just taken web moudle project in that i have taken one java class

I written this program to connect to sap via jco

import com.sap.mw.jco.*;

public class Testing extends Object{

JCO.Client mConnection;

public Testing() {

try {

// Change the logon information to your own system/user

System.out.println("1");

mConnection =

JCO.createClient("001", "userid", "password","language","localhost", "00");

System.out.println("2");

mConnection.connect();

System.out.println("3");

System.out.println(mConnection.getAttributes());

mConnection.disconnect();

}

catch (Exception ex) { ex.printStackTrace(); System.exit(1);}

}

public static void main (String args[]) {

Testing app = new Testing();

}

}

while i run this java file it get error message: shown in below..............................

com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed

Connect_PM GWHOST=localhost, GWSERV=sapgw00, ASHOST=localhost, SYSNR=00

LOCATION CPIC (TCP/IP) on local host

ERROR partner not reached (host 127.0.0.1, service 3300)

TIME Wed Jan 31 16:56:55 2007

RELEASE 640

COMPONENT NI (network interface)

VERSION 37

RC -10

MODULE nixxi_r.cpp

LINE 8716

DETAIL NiPConnect2

SYSTEM CALL SiPeekPendConn

ERRNO 10061

ERRNO TEXT WSAECONNREFUSED: Connection refused

COUNTER 1

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.nativeConnect(Native Method)

at com.sap.mw.jco.rfc.MiddlewareRFC$Client.connect(MiddlewareRFC.java:1123)

at com.sap.mw.jco.JCO$Client.connect(JCO.java:3113)

at com.Testing.<init>(Testing.java:27)

at com.Testing.main(Testing.java:35)

-


what parameters should i pass to JCO.createClient("................"); here

where should i get this information..................to test connection to sap via jco

thanks,

tony

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Check whether your J2ee engine is running ? looks like its not running.Start the j2ee and try again

Thanks

Prince

Former Member
0 Kudos

hi prince,

here j2ee engine is running in sapMMC ,it comes in green color....

plz send me ........

thanks,

tony