Opened 13 years ago

Closed 12 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 12 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 by hamish, 12 years ago

uDig still starts up if I do:

rm -rf /usr/lib/udig/jre

I didn't test it much though.

Hamish

comment:2 by hamish, 12 years ago

/usr/lib/udig/jre = 121 MB

comment:3 by hamish, 12 years ago

Keywords: udig java added

comment:4 by kalxas, 12 years ago

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

comment:5 by kalxas, 12 years ago

Priority: criticalmajor

I confirm this fix working on rev 8188.

by fgdrf, 12 years ago

Attachment: install_udig.patch added

comment:6 by fgdrf, 12 years ago

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 by wildintellect, 12 years ago

Milestone: OSGeoLive6.0RC1

comment:8 by fgdrf, 12 years ago

Resolution: fixed
Status: newclosed

comment:9 by kalxas, 12 years ago

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 by kalxas, 12 years ago

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 by kalxas, 12 years ago

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

Any other way?

in reply to:  11 comment:12 by kalxas, 12 years ago

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 by kalxas, 12 years ago

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

comment:14 by kalxas, 12 years ago

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 by edso, 12 years ago

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 by kalxas, 12 years ago

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 by kalxas, 12 years ago

Resolution: fixed
Status: reopenedclosed

confirmed in beta5

Note: See TracTickets for help on using tickets.