0% found this document useful (0 votes)
1K views

SAP Jco - Easy To Setup Step by Step (Example) - GROUPOFBASIS

The document provides step-by-step instructions for setting up SAP Jco (Java Connector) connectivity on an Oracle database. It outlines downloading and configuring required files, modifying code for database connections, setting CLASSPATH and environment variables, compiling code, and running the Jco application. The instructions are intended help easily set up SAP Jco integration on Oracle.

Uploaded by

ni3garg
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

SAP Jco - Easy To Setup Step by Step (Example) - GROUPOFBASIS

The document provides step-by-step instructions for setting up SAP Jco (Java Connector) connectivity on an Oracle database. It outlines downloading and configuring required files, modifying code for database connections, setting CLASSPATH and environment variables, compiling code, and running the Jco application. The instructions are intended help easily set up SAP Jco integration on Oracle.

Uploaded by

ni3garg
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

GROUPOFBASIS (http://www.groupofbasis.com) All of SAP Basis Consult Home (http://www.groupofbasis.com/) About (http://www.groupofbasis.com/about-2/) Contact us (http://www.groupofbasis.com/contact-us-2/) Services (http://www.groupofbasis.

com/services/) Type your search

KEEP IN TOUCH
(http://www.groupofbasis.com/feed/rss/) (http://facebook.com/groupofbasis)

GO

SAP Jco : Easy to setup step by step (example)


Jan23 2011 (http://www.groupofbasis.com/sap-jco-easy-to-setup-step-by-step-example/) Leave a Comment (http://www.groupofbasis.com/sap-jco-easy-to-setup-step-by-step-example/#respond) Written by Suwatchai
(http://www.groupofbasis.com/author/suwatchai/)

Neccessary files 1. libsapjco3.so 2. sapjco3.jar 3. /oracle/PRD/102_64/jdbc/lib/nls_charset12.jar 4. /oracle/PRD/102_64/jdbc/lib/ojdbc14.jar Step to step : 1. Check JAVA VM (if Java Connector 3 up will run on JAVA 1.5 up) SAP-SERVER:oraprd 46% java -version java version 1.5.0_12 Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04) Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode) 2. Cretae SAPJco folder and put require files on folder SAP-SERVER:oraprd 50% pwd /oracle/PRD/SAPJco SAP-SERVER:oraprd 49% ls -al total 13608 drwxr-xr-x 3 oraprd dba 512 Feb 12 17:47 . drwxr-xr-x 23 oraprd dba 1536 Feb 12 16:06 .. drwxr-xr-x 2 oraprd dba 512 Feb 12 17:48 jco_server -rw-rr 1 oraprd dba 5784736 Feb 12 17:47 libsapjco3.so -rw-rr 1 oraprd dba 1149431 Feb 12 17:47 sapjco3.jar 3. Create folder for application (jco_server) and put source files (.java) in here SAP-SERVER:oraprd 58% pwd

/oracle/PRD/SAPJco/jco_server SAP-SERVER:oraprd 59% ls -al total 24 drwxr-xr-x 2 oraprd dba 512 Feb 12 17:48 . drwxr-xr-x 3 oraprd dba 512 Feb 12 17:47 .. -rw-rr 1 oraprd dba 9650 Feb 12 17:48 JCO_SERVER.java 4. modify JCO_SERVER.java connect to other host Example : Properties connectProperties = new Properties(); connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST,SAP-SERVER); connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, 03); connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, 900); connectProperties.setProperty(DestinationDataProvider.JCO_USER, inf01); connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, sapcpic); connectProperties.setProperty(DestinationDataProvider.JCO_LANG, th); connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, 3); connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT, 10); createDataFile(DESTINATION_NAME2, jcoDestination, connectProperties); Properties servertProperties = new Properties(); servertProperties.setProperty(ServerDataProvider.JCO_GWHOST,SAP-SERVER); servertProperties.setProperty(ServerDataProvider.JCO_CONNECTION_COUNT, 2); servertProperties.setProperty(ServerDataProvider.JCO_GWSERV, sapgw00); servertProperties.setProperty(ServerDataProvider.JCO_PROGID, JCO_SERVER); servertProperties.setProperty(ServerDataProvider.JCO_REP_DEST, ABAP_AS_WITH_POOL); createDataFile(SERVER_NAME1, jcoServer, servertProperties); String url = jdbc:oracle:thin:@EXTERNAL-SERVER:1521:PROD; String userName = user; String password = passwd; 5. Check environment SAP-SERVER:oraprd 72% env HOME=/oracle/PRD PATH=/oracle/PRD/102_64/bin:/oracle/PRD:/usr/sap/PRD/SYS/exe/run:/usr/bin:.:/usr/ccs/bin:/usr/ucb LOGNAME=oraprd HZ= TERM=vt100 SHELL=/bin/csh MAIL=/var/mail/oraprd TZ=Asia/Bangkok PWD=/oracle/PRD/SAPJco/jco_server USER=oraprd SAPSYSTEMNAME=PRD DIR_LIBRARY=/usr/sap/PRD/SYS/exe/run LD_LIBRARY_PATH=/usr/sap/PRD/SYS/exe/run:/oracle/PRD/102_64/lib THREAD=NOPS dbms_type=ORA dbs_ora_tnsname=PRD dbs_ora_schema=SAPSR3

ORACLE_SID=PRD DB_SID=PRD ORACLE_BASE=/oracle ORACLE_HOME=/oracle/PRD/102_64 NLS_LANG=AMERICAN_AMERICA.UTF8 SAPDATA_HOME=/oracle/PRD 6. Add CLASSPATH and LD_LIBRARY_PATH set environment CLASS_PATH (for c shell) % setenv CLASSPATH .:/oracle/PRD/SAPJco/sapjco3.jar:/oracle/PRD/102_64/jdbc/lib/ojdbc14.jar:/oracle/PRD/102_64 /jdbc/lib/nls_charset12.jar:/oracle/PRD/SAPJco/jco_server add JCO path to LD_LIBRARY_PATH % setenv LD_LIBRARY_PATH /oracle/PRD/SAPJco:$LD_LIBRARY_PATH Tips : unset environment unsetenv CLASSPATH !!! Set this environment to logon environment too 7. Compile sorce code SAP-SERVER:oraprd 64% cd /oracle/PRD/SAPJco/jco_server SAP-SERVER:oraprd 59% ls -al total 24 drwxr-xr-x 2 oraprd dba 512 Feb 12 17:48 . drwxr-xr-x 3 oraprd dba 512 Feb 12 17:47 .. -rw-rr 1 oraprd dba 9650 Feb 12 17:48 JCO_SERVER.java SAP-SERVER:oraprd 66% javac -classpath .:/oracle/PRD/SAPJco/sapjco3.jar:/oracle/PRD/102_64/jdbc/lib/ojdbc14.jar: /oracle/PRD/102_64/jdbc/lib/nls_charset12.jar:/oracle/PRD/SAPJco/jco_server JCO_SERVER.java SAP-SERVER:oraprd 69% ls -al total 42 drwxr-xr-x 2 oraprd dba 512 Feb 13 10:58 . drwxr-xr-x 3 oraprd dba 512 Feb 12 17:47 .. -rw-rr 1 oraprd dba 538 Feb 13 10:58 JCO_SERVER$MyStateChangedListener.class -rw-rr 1 oraprd dba 769 Feb 13 10:58 JCO_SERVER$MyThrowableListener.class -rw-rr 1 oraprd dba 2695 Feb 13 10:58 JCO_SERVER$StfcConnectionHandler.class -rw-rr 1 oraprd dba 3772 Feb 13 10:58 JCO_SERVER.class -rw-rr 1 oraprd dba 9650 Feb 12 18:01 JCO_SERVER.java 8. run application $ java -d64 JCO_SERVER & or $ nohup java -d64 JCO_SERVER & Share on Facebook (http://www.facebook.com/share.php?u=https%3A%2F%2Fptop.only.wip.la%3A443%2Fhttp%2Fwww.groupofbasis.com%2Fsap-jcoeasy-to-setup-step-by-stepexample%2F&t=SAP%20Jco%20%3A%20Easy%20to%20setup%20step%20by%20step%20%28example%29)

Posted in O.S. (http://www.groupofbasis.com/category/o-s/) - Tagged SAP Jco


(http://www.groupofbasis.com/tag/sap-jco/)

SHARE THIS Twitter (http://twitter.com/home?status=SAP Jco : Easy to setup step by step

(example)++http://tinyurl.com/4yuomh4) Facebook (http://www.facebook.com/share.php? u=http://www.groupofbasis.com/sap-jco-easy-to-setup-step-by-step-example/&t=SAP Jco : Easy to setup step by step (example)) Delicious (http://del.icio.us/post?url=http://www.groupofbasis.com/sap-jco-easy-to-setup-step-by-stepexample/&title=SAP Jco : Easy to setup step by step (example)) StumbleUpon (http://www.stumbleupon.com/submit? url=http://www.groupofbasis.com/sap-jco-easy-to-setup-step-by-step-example/&title=SAP Jco : Easy to setup step by step (example)) E-mail (http://www.addtoany.com/email?linkurl=http://www.groupofbasis.com/sap-jco-easy-to-setupstep-by-step-example/&linkname=SAP Jco : Easy to setup step by step (example)) (http://www.addtoany.com/share_save#url=http://www.groupofbasis.com/sap-jco-easy-to-setup-step-by-stepexample/&linkname=SAP Jco : Easy to setup step by step (example)) Expand role menu for user (http://www.groupofbasis.com/expand-role-menu-for-user/)

SAP Note Viewer for iPhone available (Free) (http://www.groupofbasis.com/sap-note-viewer-for-iphoneavailable-free/)

No Comments Yet
(http://www.groupofbasis.com/sap-jco-easy-to-setup-step-by-step-example/feed/)

Leave a Reply
Your email address will not be published. Required fields are marked * Name * Email * Website

Comment You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title="">
<b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Comment

July 2011

F 1

S 2 9

S 3 10

11 18 25

12 19 26

13 20 27

14 15 16 17 21 22 23 24 28 29 30 31

Jun (http://www.groupofbasis.com/2011/06/)

Meta
Log in (http://www.groupofbasis.com/wp-login.php) Entries RSS (http://www.groupofbasis.com/feed/) Comments RSS (http://www.groupofbasis.com/comments/feed/) WordPress.org (http://wordpress.org/)

Categories
O.S. (http://www.groupofbasis.com/category/o-s/) SAP (http://www.groupofbasis.com/category/sap/) SAP portal (http://www.groupofbasis.com/category/sap-portal/)

Recent Posts
JOB PRE-SALE (http://www.groupofbasis.com/job-pre-sale/) Urgent JOB on ORACLE DBA (http://www.groupofbasis.com/urgent-job-on-oracle-dba/) Urgent JOB on FI,SD,PP,MM,QM,PM (http://www.groupofbasis.com/urgent-job-on-fisdppmmqmpm/) J2EE : JCmon monitor menu example (http://www.groupofbasis.com/j2ee-jcmon-monitor-menu-example/) Solaris : zip and compress files (http://www.groupofbasis.com/solaris_zip_and_compress-files/)

Archives
June 2011 (http://www.groupofbasis.com/2011/06/) May 2011 (http://www.groupofbasis.com/2011/05/) March 2011 (http://www.groupofbasis.com/2011/03/) February 2011 (http://www.groupofbasis.com/2011/02/) January 2011 (http://www.groupofbasis.com/2011/01/) December 2010 (http://www.groupofbasis.com/2010/12/) EvoLve (http://theme4press.com/evolve/) theme by Theme4Press Powered by WordPress (http://wordpress.org) GROUPOFBASIS (http://www.groupofbasis.com)
All of SAP Basis Consult

You might also like