Opened 7 years ago

Closed 7 years ago

#922 closed defect (fixed)

udig includes a custom java jvm

Reported by: kalxas Owned by: live-demo@…
Priority: normal Milestone: OSGeoLive6.0RC1
Component: OSGeoLive Keywords: 6.0, udig, java
Cc: live-demo@…

Description

Since from version 6.0 we are moving to openjdk7, udig should be fixed to work with default jre on the disk

Attachments (1)

install_udig.patch (825 bytes) - added by fgdrf 7 years ago.

Download all attachments as: .zip

Change history (18)

comment:1 Changed 7 years ago by hamish

uDig still starts up if I do:

rm -rf /usr/lib/udig/jre

I didn't test it much though.

Hamish

comment:2 Changed 7 years ago by hamish

/usr/lib/udig/jre = 121 MB

comment:3 Changed 7 years ago by hamish

Keywords: udig java added

comment:4 Changed 7 years ago by kalxas

wow, that is a very easy solution...I wonder why we didn't test before :)

comment:5 Changed 7 years ago by kalxas

Priority: criticalmajor

I confirm this fix working on rev 8188.

Changed 7 years ago by fgdrf

Attachment: install_udig.patch added

comment:6 Changed 7 years ago by fgdrf

udig starts but every part of the quickstart would fail because of Exceptions (NoClassDefFoundError : javax/media/jai/JAI) during render process. Shapefiles and raster datasets were not rendered.

Solution : copy $UDIG_HOME/jre/lib/ext/jai_*.jar /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext/

I also tested the uDig quickstart and everything was fine after the configuration of open-jdk-7 with jai libs.

Questions:

  • Where did you updated the install scrips to remove the jre from UDIG_HOME?
  • How can the script resolve the installation folder of open-jdk-7 ?

Here is my patch to remove bundled jre and make use of open-jdk-7, note that I used the hard coded JAVA_INSTALL_FOLDER to know where to copy the libs to : install_udig.patch

comment:7 Changed 7 years ago by wildintellect

Milestone: OSGeoLive6.0RC1

comment:8 Changed 7 years ago by fgdrf

Resolution: fixed
Status: newclosed

comment:9 Changed 7 years ago by kalxas

Priority: majorcritical
Resolution: fixed
Status: closedreopened

Reopening due to #954:

As I suspected: Geomajas breaks due to the jai libs moved to default-java folder by udig.

When I removed those files from /usr/lib/jvm/default-java/jre/lib/ext/jai_* Geomajas starts with >>no problems."

We have to find a way for udig to load jai* without those files affecting default-java. Thoughts?

comment:10 Changed 7 years ago by kalxas

I tried to leave the jai files to $UDIG_HOME/jre/lib/ext/ but that didn't work. It seems the library search is relative to the jre used... Perhaps there is a configuration file for uDig to hardcode the location of jai files?

comment:11 Changed 7 years ago by kalxas

Adding a $export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/udig/jai did not work.

Any other way?

comment:12 in reply to:  11 Changed 7 years ago by kalxas

Replying to kalxas:

Adding a $export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/udig/jai did not work.

Any other way?

this was added to /usr/lib/udig/udig.sh

comment:13 Changed 7 years ago by kalxas

I added JAI binaries too and Geomajas still breaks...

comment:14 Changed 7 years ago by kalxas

I have committed a fix in rev [8349]. I am trying to trick udig to find the default jre through its own jre folder, where all are linked to default-java folder, plus the JAI files added locally. Ugly hack but might work...

comment:15 Changed 7 years ago by edso

you can very well simply use the default jre, without symlinks or such and modify LD_LIBRARY_PATH in the start script only as described above.

..ede/openjump

comment:16 Changed 7 years ago by kalxas

Priority: criticalnormal

fixed in rev [8357] I want to thank the udig and geomajas teams for helping us a lot with this issue.

comment:17 Changed 7 years ago by kalxas

Resolution: fixed
Status: reopenedclosed

confirmed in beta5

Note: See TracTickets for help on using tickets.