cancel
Showing results for 
Search instead for 
Did you mean: 

JCO Exception

ranjit_deshmukh
Active Participant
0 Kudos
99

Hi all,

I have developed a standalone java application which uses JCO to connect to SAP

I tried the application on my windows client and it works fine.

but when I tried to run the same application on the UNIX system:

HP-UX xbdo1 B.11.23 U ia64

and the jco I am using is :

.../sapjco-hpia64-2.1.8/sapjco.jar

It gives an error as:

Exception in thread "main" java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'

JCO.nativeInit(): Could not initialize dynamic link library sapjcorfc [no sapjcorfc in java.library.path]. java.library.path [.:/if/script/xi/lib/sapjco-hpia64-2.1.8:/opt/java1.4/jre/lib/IA64N:/opt/java1.4/jre/lib/IA64N/server:/opt/java1.4/jre/../lib/IA64N:/usr/lib]

at com.sap.mw.jco.JCO.<clinit>(JCO.java:776)

at JConnector.<init>(JConnector.java:38)

at JConnector.main(JConnector.java:91)

The paths are mentioned as:

SHLIB_PATH = .:/if/script/xi/lib/sapjco-hpia64-2.1.8

CLASSPATH=.:/if/script/xi/lib/sapjco-hpia64-2.1.8/sapjco.jar

I checked, there is no version problem but I think the "jcolibpath" is not getting filled up(by refering to the "MiddlewareRFC.java")

Can anyone help me in this regards?

Ranjit

Edited by: Ranjit Deshmukh on Jan 15, 2008 2:06 PM

View Entire Topic
ranjit_deshmukh
Active Participant
0 Kudos

Actually i was using the 64 bit processor,

and to run the java code on this kind of processor; the command should be:

java -d64 PRGNAME