[ZOO-Discuss] Execute HelloWorldJava

Daisuke YOSHIDA yoshida at la.tezuka-gu.ac.jp
Sat Jun 26 08:19:00 PDT 2010


Gerald-san,

Thank you very much for your advice.
It worked!

The problem was ZOO Kernal linked wrong libjvm.so as you advised.
I linked /usr/lib/libjvm.so to
/usr/local/jdk/jre/lib/i386/server/libjvm.so which is installed by me
and currently use.

However, it fails in make if I uncomment -DDEBUG like below,
CFLAGS=-I. -DLINUX_FREE_ISSUE -DDEBUG #-DDEBUG_SERVICE_CONF

After plenty of warning messages
....
service.h:216: warning: ‘int hasElement(elements*, char*)’ defined but not used
service.h:228: warning: ‘elements* getElements(elements*, char*)’
defined but not used
service.h:289: warning: ‘void* freeService(service**)’ defined but not used
service.h:346: warning: ‘void* addMapToIotype(iotype**, map*)’ defined
but not used
service.h:447: warning: ‘void* addToElements(elements*, elements*)’
defined but not used
make: *** [zoo_service_loader.o] Error 1

Anyway, HelloJava works.
Thank you gain.

Daisuke Yoshida.


On Fri, Jun 25, 2010 at 10:08 PM, Gérald Fenoy <gerald.fenoy at geolabs.fr> wrote:
> Hi Daisuke,
> you shouldn't have to specify anything in the [env] sectin of your ZOO main configuration file to make the HelloWorldJava working. Indeed ZOO Kernel shoudl set the CLASSPATH for you before loading and running your Java process (so your java class static function). Please, can you ensure that you well get the class located in the same directory that your ZOO Kernel and the ZOO Configuration File ?
>
> Can you also ensure that the ZOO Kernel you used for your tests was well linked against the right Java Shared Library ? (using the ldd command and giving us the result here) Indeed, there can be an issue in the makefile generation.
>
> The last test which can be usefull for us to help you can be to recompile your ZOO Kernel in debug mode (adding -DDEBUG to the Makefile CFLAGS) and giving us the apache log produced during your request.
>
> Hope to hear from you soon,
> best regards,
>
> Le 24 juin 2010 à 11:11, Daisuke YOSHIDA a écrit :
>
>> Hello everyone,
>>
>> I faced 500 Internal Server Error when I execute HelloWorldJava at
>> Ubuntu 10.04 32bit.
>> http://localhost/cgi-bin/zoo_loader.cgi?metapath=&ServiceProvider=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=test
>>
>> Apache log says,
>> malformed header from script. Bad header=Error occurred during
>> initiali: zoo_loader.cgi
>> I suppose this mean would be "Error occurred during initialization of VM"
>> and guess the problem is somewhere in PATH setting.
>>
>> Apache user can carry out Java commands (java, javac) without error.
>>
>> I wrote [env] in main.cfg, but did not success
>> [env]
>> JAVA_HOME=/usr/local/jdk1.6.0_20
>> PATH=.:/usr/bin:$JAVA_HOME/jre/bin:$JAVA_HOME/bin
>> CLASSPATH=/var/cgi-bin
>>
>> Of course, I compiled with Java
>> ./configure  --with-java=/usr/local/jdk1.6.0_20
>>
>> I appreciate your help.
>> Best regards,
>>
>> Daisuke Yoshida
>> _______________________________________________
>> Zoo-discuss mailing list
>> Zoo-discuss at gisws.media.osaka-cu.ac.jp
>> http://gisws.media.osaka-cu.ac.jp/mailman/listinfo/zoo-discuss
>
> Djay
> Just a ZOO Member
> gerald.fenoy at geolabs.fr
>
>
>
>



-- 
吉田 大介
帝塚山学院大学 リベラルアーツ学部
589-8585 大阪狭山市今熊2-1823
TEL 072.365.0865 FAX 072.365.5628



More information about the Zoo-discuss mailing list