I agree with Pidster--remove the other JAI jars.

I use JAI and JAI ImageIO in my application.  I have three JAI jar files in
my WEB-INF/lib directory:  jai_codec.jar, jai_core.jar, and jai_imageio.jar

If you need JAI in $JAVA_HOME, I recommend you install a second copy of the
JDK without JAI, and use this for launching Tomcat.  While I have JAI
installed in my Java 6 tree, I start Tomcat with a Java 5 tree that does not
have JAI installed.  At the start of $CATALINA_HOME/bin/catalina.sh, I've
added

JAVA_HOME=/local/jdk1.5.0_noJAI
JRE_HOME=$JAVA_HOME/jre
JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=true
-Xmx256m"

This second JDK could be Java 6, but I run Tomcat with Java 5 (and set javac
source and target to 1.5) because my application must run on older
Macintoshes that do not support Java 6.  (Headless is set because my
application also must run on systems without a DISPLAY.)

My application installs and runs in Tomcat on Linux, Mac, and Windows.

On Fri, Apr 23, 2010 at 4:48 PM, Pid <p...@pidster.com> wrote:

> On 23/04/2010 21:31, aditya siram wrote:
> > Hi all,
> > I am having issues using jai [1]  with a Tomcat webapp. I am running
> > the tomcat6 package installed from the Ubuntu repos.
> >
> > The webapp does some image decompression and is unable to detect
> > CLibJpegImageReader which is a class in the jai_imageio.jar.
> >
> > I have copied this jar file to my WEB-INF/lib directory and also to
> > /var/lib/tomcat6/lib and /usr/share/tomcat6/lib hoping that it would
> > work from one of these locations. Additionally it is in my
> > JAVA_HOME/jre/lib/ext directory so it should be available after the
> > bootstrap phase.
> >
> > I know that JAI is installed correctly because a stand-alone app is
> > able to access the required class.
>
> The jar should only be present in one location at any given time,
> multiple locations will almost certainly produce unexpected conditions.
>
> Which version of Java are you using?
>
>
> p
>
> > [1] http://java.sun.com/javase/technologies/desktop/media/jai/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
>
>
>


-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, 'Doctor Faustus' (v, 121-24)

Reply via email to