S
sonykalkan
I have a problem on my php code, can you help me to solve this issue ?
The php code uses java module to call a java method which connects to
SAP and returns result.
Whenever I call my php script, I receive the following error:
Warning: 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
[/usr/java/j2sdk1.4.2_03/jre/lib/ext/libsapjcorfc.so: librfccm.so:
cannot open shared object file: No such file or directory].
java.library.path [/usr/lib/php4] in
/usr/local/apache/htdocs/eticaret/grosstest/sapphpjavadeneme.php on
line 3
sapphpjavadeneme.php is as follows:
<?php
$obj = new Java("classmusteri");
$vret=$obj->musteriguncelle("");
echo($vret);
?>
Java class classmusteri runs great from the command prompt. Required
library files of SAP are located in
/usr/java/j2sdk1.4.2_03/jre/lib/ext/
The files are: sapjco.jar, librfccm.so, libsapjcorfc.so
[Java]
java.class.path=/usr/lib/php4/php_java.jar:/usr/local/javaclasses
java.home=/usr/java/j2sdk1.4.2_03
java.library=/usr/java/j2sdk1.4.2_03/jre/lib/i386/server/libjvm.so
java.library.path=/usr/lib/php4
extension_dir = /usr/lib/php4
extension=java.so
The php code uses java module to call a java method which connects to
SAP and returns result.
Whenever I call my php script, I receive the following error:
Warning: 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
[/usr/java/j2sdk1.4.2_03/jre/lib/ext/libsapjcorfc.so: librfccm.so:
cannot open shared object file: No such file or directory].
java.library.path [/usr/lib/php4] in
/usr/local/apache/htdocs/eticaret/grosstest/sapphpjavadeneme.php on
line 3
sapphpjavadeneme.php is as follows:
<?php
$obj = new Java("classmusteri");
$vret=$obj->musteriguncelle("");
echo($vret);
?>
Java class classmusteri runs great from the command prompt. Required
library files of SAP are located in
/usr/java/j2sdk1.4.2_03/jre/lib/ext/
The files are: sapjco.jar, librfccm.so, libsapjcorfc.so
[Java]
java.class.path=/usr/lib/php4/php_java.jar:/usr/local/javaclasses
java.home=/usr/java/j2sdk1.4.2_03
java.library=/usr/java/j2sdk1.4.2_03/jre/lib/i386/server/libjvm.so
java.library.path=/usr/lib/php4
extension_dir = /usr/lib/php4
extension=java.so