Ticket #148 (new task)

Opened 4 years ago

Last modified 4 years ago

Getting HelloWorldJava working

Reported by: surf09 Owned by:
Priority: minor Milestone:
Component: Development platform Version:
Keywords: Cc:

Description

Hi there

I've been trying to get the HelloWorldJava? working but have been unsuccessful.

I execute the following:

./zoo_loader.cgi 'ServiceProvider?=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava?&DataInputs?=S=bill'

But I get the following error message back:

$/$Error occurred during initialization of VM java.lang.StackOverflowError?

at java.lang.Object.<clinit>(Object.java:41)

I ran command: ldd zoo_loader.cgi I get the following for libjvm.so:

libjvm.so => /usr/lib/libjvm.so

It's currently a symbolic link to:

/usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/libjvm.so*

I've tried open-jdk 7, java-7-oracle JDK, and java-8-oracle JDK. I am still getting the same error message. I've tried following the documentation but still unsuccessful.

Any help will be appreciated.

Thanks,

Change History

Changed 4 years ago by djay

Hi, it may be possible that you require specific definition for being able to start the Java Virtual Machine.

On my personal platform here is what I have currently set in my main.cfg:

[javax]
ms=8m

Still you may also use different options, here is an example to define the stack size.

You can refer to this documentation part to ensure that it will start properly.

I think it should help you to solve your issue.

Changed 4 years ago by surf09

Hi there

Thanks for your help.

I re-tried but still I am unsuccessful starting the JVM.

Below is more details of my environment:

lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty

locate libjvm.so /usr/lib/libjvm.so /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so /usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/libjvm.so

env JAVA_HOME=/usr/lib/jvm/java-7-oracle/

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/srv/www/test-zoo-project/public_html/cgi-bin/cgi-env:/usr/bin:/usr/lib/jvm/java-7-oracle/bin/javac:/usr/lib/jvm/java-7-oracle/jre/bin/java:/usr/lib/jvm/java-7-oracle/bin/javah

CLASS_PATH=/srv/www/test-zoo-project/public_html/cgi-bin

LD_LIBRARY_PATH=/usr/lib/jvm/java-7-oracle/jre/lib/amd64/

main.cfg is essentially default settings below:

[main] encoding = utf-8 version = 1.0.0 serverAddress = http://www.zoo-project.org/zoo/ lang = fr-FR,en-CA,en-US tmpPath=/tmp/ tmpUrl = ../mpPathRelativeToServerAdress/ dataPath = /tmp/ cacheDir = /tmp/

[identification] title = The Zoo WPS Development Server abstract = Development version of ZooWPS. See http://www.zoo-project.org fees = None accessConstraints = none keywords = WPS,GIS,buffer

[provider] providerName=ZOO Project providerSite=http://www.zoo-project.org individualName=Gerald FENOY positionName=Developer role=Dev addressDeliveryPoint=1280, avenue des Platanes addressCity=Lattes addressAdministrativeArea=False addressPostalCode=34970 addressCountry=fr phoneVoice=False phoneFacsimile=False

[javax] ms=8m

ldd zoo_loader.cgi

linux-vdso.so.1 => (0x00007ffdc938f000) libzoo_service.so.1.5 => /usr/local/lib/libzoo_service.so.1.5 (0x00007f7a35106000) libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f7a34f01000) libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f7a34b24000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7a34920000) libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f7a346be000) libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f7a34356000) libjvm.so => /usr/lib/libjvm.so (0x00007f7a334dc000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7a332be000) libfcgi.so.0 => /usr/lib/libfcgi.so.0 (0x00007f7a330b2000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7a32dae000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7a329e9000) libgdal.so.1 => /usr/lib/libgdal.so.1 (0x00007f7a31c91000) /lib64/ld-linux-x86-64.so.2 (0x000055cf4713d000) libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007f7a31a5e000) librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0 (0x00007f7a31844000) libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007f7a315c3000) libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007f7a31305000) libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f7a310be000) liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f7a30eae000) libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f7a30c5d000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7a30a44000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f7a30821000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7a3051b000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7a30305000) libarmadillo.so.4 => /usr/lib/libarmadillo.so.4 (0x00007f7a300fd000) libproj.so.0 => /usr/lib/libproj.so.0 (0x00007f7a2feab000) libpoppler.so.44 => /usr/lib/x86_64-linux-gnu/libpoppler.so.44 (0x00007f7a2fa4f000) libfreexl.so.1 => /usr/lib/x86_64-linux-gnu/libfreexl.so.1 (0x00007f7a2f844000) libgeos_c.so.1 => /usr/lib/libgeos_c.so.1 (0x00007f7a2f620000) libwebp.so.5 => /usr/lib/x86_64-linux-gnu/libwebp.so.5 (0x00007f7a2f3c8000) libepsilon.so.1 => /usr/lib/x86_64-linux-gnu/libepsilon.so.1 (0x00007f7a2f1af000) libodbc.so.1 => /usr/lib/x86_64-linux-gnu/libodbc.so.1 (0x00007f7a2ef48000) libodbcinst.so.1 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.1 (0x00007f7a2ed36000) libkmldom.so.0 => /usr/lib/x86_64-linux-gnu/libkmldom.so.0 (0x00007f7a2ea8c000) libkmlbase.so.0 => /usr/lib/x86_64-linux-gnu/libkmlbase.so.0 (0x00007f7a2e876000) libkmlengine.so.0 => /usr/lib/x86_64-linux-gnu/libkmlengine.so.0 (0x00007f7a2e642000) libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f7a2e417000) libxerces-c-3.1.so => /usr/lib/x86_64-linux-gnu/libxerces-c-3.1.so (0x00007f7a2de8f000) libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007f7a2dc38000) libnetcdf.so.7 => /usr/lib/libnetcdf.so.7 (0x00007f7a2d8fa000) libhdf5.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5.so.7 (0x00007f7a2d45e000) libmfhdfalt.so.0 => /usr/lib/libmfhdfalt.so.0 (0x00007f7a2d22d000) libdfalt.so.0 => /usr/lib/libdfalt.so.0 (0x00007f7a2cf46000) libogdi.so.3.2 => /usr/lib/libogdi.so.3.2 (0x00007f7a2cd25000) libgif.so.4 => /usr/lib/x86_64-linux-gnu/libgif.so.4 (0x00007f7a2cb1c000) libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f7a2c8c6000) libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f7a2c6a0000) libpq.so.5 => /usr/lib/libpq.so.5 (0x00007f7a2c471000) libdapclient.so.3 => /usr/lib/x86_64-linux-gnu/libdapclient.so.3 (0x00007f7a2c239000) libdap.so.11 => /usr/lib/x86_64-linux-gnu/libdap.so.11 (0x00007f7a2bf53000) libspatialite.so.5 => /usr/lib/x86_64-linux-gnu/libspatialite.so.5 (0x00007f7a2b957000) libmysqlclient.so.18 => /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 (0x00007f7a2b41e000) libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f7a2b219000) libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f7a2b004000) libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f7a2adc2000) libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f7a2aaf7000) libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f7a2a8c7000) libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f7a2a6c3000) libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f7a2a4b8000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f7a2a29c000) libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f7a2a081000) libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f7a29e43000) libblas.so.3 => /usr/lib/libblas.so.3 (0x00007f7a29bc5000) liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007f7a29429000) libarpack.so.2 => /usr/lib/libarpack.so.2 (0x00007f7a291db000) liblcms2.so.2 => /usr/lib/x86_64-linux-gnu/liblcms2.so.2 (0x00007f7a28f85000) libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f7a28d13000) libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f7a28ad7000) libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f7a28833000) libgeos-3.4.2.so => /usr/lib/libgeos-3.4.2.so (0x00007f7a284af000) libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f7a282a4000) liburiparser.so.1 => /usr/lib/liburiparser.so.1 (0x00007f7a2808a000) libminizip.so.0 => /usr/lib/x86_64-linux-gnu/libminizip.so.0 (0x00007f7a27e82000) libhdf5_hl.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7 (0x00007f7a27c51000) libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f7a279f2000) libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f7a27738000) libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f7a27530000) libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f7a2732b000) libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f7a27122000) libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f7a26e99000) libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f7a26bf8000) libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f7a269c5000) libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f7a267af000) libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007f7a26495000) libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f7a26286000) libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f7a2605d000) libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f7a25e4e000) libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f7a25c05000) libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f7a259cc000) libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f7a2578f000)

/usr/lib$ ll libjvm.so -> /usr/lib/jvm/java-7-oracle/jre/lib/amd64/server/libjvm.so*

Path: /usr/lib/jvm/java-7-oracle/jre/lib/amd64/ has libZOO.so

Any further help would be appreciated. Thanks.

Changed 4 years ago by djay

Hi, many thanks for following up on this issue.

I would be very happy in case you may provide the gdb output you can have when trying to run any Java service from the command line. Indeed it should give us more information on where it has failed.

On another hand did you try also to use the 1.6.0 version or did you use the latest SVN version. In the last case, I would like to invite you to try running against 1.6.0 to make sure there is no issue we have added in the last modifications we have made to the code.

Changed 4 years ago by surf09

Hi.

Thanks for your response.

Debug output is:

(gdb) run 'ServiceProvider?=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava?&DataInputs?=S=bill' Starting program: /srv/www/test-zoo-project/public_html/cgi-bin/zoo_loader.cgi 'ServiceProvider?=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava?&DataInputs?=S=bill' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffe3257700 (LWP 8801)] Error occurred during initialization of VM java.lang.StackOverflowError?

at java.lang.Object.<clinit>(Object.java:41)

[Thread 0x7fffe3257700 (LWP 8801) exited] [Inferior 1 (process 8795) exited with code 01]

I believe I am still on version 1.5.0. I'll try 1.6.0 and see what happens. Thanks.

Changed 4 years ago by surf09

I generated the zoo_loader.cgi using version 1.6.0.

I get the following debug output:

(gdb) run 'ServiceProvider?=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava?&DataInputs?=S=bill' Starting program: /srv/www/test-zoo-project/public_html/cgi-bin/zoo_loader.cgi 'ServiceProvider?=&metapath=&Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava?&DataInputs?=S=bill' [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffe3256700 (LWP 16211)] Error occurred during initialization of VM java.lang.StackOverflowError?

at java.lang.Object.<clinit>(Object.java:41)

[Thread 0x7fffe3256700 (LWP 16211) exited] [Inferior 1 (process 16205) exited with code 01]

All other configurations during this test as per my previous message.

Changed 4 years ago by djay

Many thanks for this update.

Can you try again with the following settings in your main.cfg file (cf. here):

[javax]
ss=8m
ms=8m

Note that I have kept your initial setting (ms=8m.

I hope it helps.

Changed 4 years ago by surf09

Thank you greatly! That resolved my issue!

Changed 4 years ago by djay

Thank you for the feedbacks. Happy to get it working, sorry for inconvenience. I think we should now update the Java documentation to make sure that this option is illustrated per default, we can find it in CentOS installation section but it is not enough.

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png