Reply to Re: PHP-JAVA-SAP problem

Your name:

Reply:


Posted by J.O. Aho on 10/18/05 18:00

sonykalkan@gmail.com wrote:
> 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

I would think that the user as which the webserver (apache?) is running as
don't have the right to read/execute the sapjco.jar, librfccm.so,
libsapjcorfc.so files, see to that the files have the execute/read priviliges
set for "others" and that the directories (/usr, /usr/java,
/usr/java/j2sdk1.4.2_03, /usr/java/j2sdk1.4.2_03/jre,
/usr/java/j2sdk1.4.2_03/jre/lib and /usr/java/j2sdk1.4.2_03/jre/lib/ext) are
executable by "others" too.


//Aho
>
> [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
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация