Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

PHP-JAVA-SAP problem

Thread view: 
sonykalkan@gmail.com - 18 Oct 2005 14:32 GMT
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
zero - 18 Oct 2005 22:32 GMT
sonykalkan@gmail.com wrote in news:1129642356.327195.28200
@z14g2000cwz.googlegroups.com:

> 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
[quoted text clipped - 9 lines]
> /usr/local/apache/htdocs/eticaret/grosstest/sapphpjavadeneme.php on
> line 3

just a guess: does the PHP user have enough rights to access the file
/usr/java/j2sdk1.4.2_03/jre/lib/ext/libsapjcorfc.so?  If the class runs
fine from the command line maybe you're running it with a different
account, one that does have the required rights.  Since it says it can't
find the file rather than a SecurityException, the access violation is
probably on one of the directories and not the file itself (if I'm right
that is), so check the whole path.

Zero


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.