Hi I am running a tomcat web application on Linux, and am getting the following error 2006-12-10 21:23:46 StandardWrapperValveaction: Servlet.service for servlet action threw exception java.lang.NoClassDefFoundError: while resolving class: myapp.Photo bla bla. Caldarale, Charles R This class is normally part of the Sun JRE download in rt.jar.
It appears that either your JRE installation is corrupted, or you're using some unusual JRE that does not include the standard classes. Try downloading and installing a fresh JRE from the Sun web site. Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient.
If you received this in error, please contact the sender and delete the e-mail and its. From: Mon Cab Subject: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoderThis class is normally part of the Sun JRE download in rt.jar. It appears that either your JRE installation is corrupted, or you're using some unusual JRE that does not include the standard classes. Try downloading and installing a fresh JRE from the Sun web site. Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient.
If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. From: Mon Cab Subject: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder Caused by: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoderThis class is normally part of the Sun JRE download in rt.jar. It appears that either your JRE installation is corrupted, or you're using some unusual JRE that does not include the standard classes. Try downloading and installing a fresh JRE from the Sun web site. Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient.
If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Any questions? Get answers on any topic at www.Answers.yahoo.com. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. From: Mon Cab Subject: RE: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder Thanks Chris.Chris? That's my ex-wife. So what JVM do you have installed?
- Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. Mon Cab Chuck Apologies (nice). Java version is 1.4.2 on Fedora. Is that what you mean? Mysql export csv. - 'Caldarale, Charles R' wrote: Do you Yahoo!?
Everyone is raving about the all-new Yahoo! - To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional. From: Mon Cab Subject: RE: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder Thanks Chris.Chris?
Lekcija za gitaru. That's my ex-wife. So what JVM do you have installed? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Do you Yahoo!? Everyone is raving about the all-new Yahoo! - To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected].
![]()
Java version is 1.4.2 on Fedora. Is that what you mean?Partly. The class in question is definitely in Sun's 1.4.2 JRE; are you using Sun or some other vendor (e.g., IBM, JRockit.)? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. Java version is 1.4.2 on Fedora.
Is that what you mean?Partly. The class in question is definitely in Sun's 1.4.2 JRE; are you using Sun or some other vendor (e.g., IBM, JRockit.)? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Want to start your own business? Learn how on Yahoo!
Small Business. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. Caldarale, Charles R Operating in a headless mode restricts some AWT functions, but image manipulation is still allowed. Headless is used when there's no graphical rendering mechanism (e.g., an X11 client) directly on platform. The JPEG encode/decode classes are definitely in the standard JRE distribution.
Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete. From: Mon Cab Subject: RE: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder I believe its Suns JRE.
Codec Jpeg
Doing 'java -version' from a shell prompt will tell you. But I have heard that on UNIX there is no access to awt (& presumable other image packages), due to UNIX being 'headles server'.Operating in a headless mode restricts some AWT functions, but image manipulation is still allowed. Headless is used when there's no graphical rendering mechanism (e.g., an X11 client) directly on platform. The JPEG encode/decode classes are definitely in the standard JRE distribution. Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. Mon Cab Chuck Here's the results of java -version java version '1.4.2' gij (GNU libgcj) version 4.0.2 20051125 (Red Hat 4.0.2-8) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. According to GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode.
Chuck Here's the results of java -version java version '1.4.2' gij (GNU libgcj) version 4.0.2 20051125 (Red Hat 4.0.2-8) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. According to GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code.
Compiled applications are linked with the GCJ runtime, libgcj, which provides the core class libraries, a garbage collector, and a bytecode interpreter. Libgcj can dynamically load and interpret class files, resulting in mixed compiled/interpreted applications. It has been merged with GNU Classpath and supports most of the 1.4 libraries plus some 1.5 additions. I see no rt.jar under usr/share/java. From: Mon Cab Subject: RE: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder I believe its Suns JRE.
Doing 'java -version' from a shell prompt will tell you. But I have heard that on UNIX there is no access to awt (& presumable other image packages), due to UNIX being 'headles server'.Operating in a headless mode restricts some AWT functions, but image manipulation is still allowed. Headless is used when there's no graphical rendering mechanism (e.g., an X11 client) directly on platform. The JPEG encode/decode classes are definitely in the standard JRE distribution. Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. Christopher Schultz Mon, Mon Cab wrote: Well, /there's/ yer problem: you have GNU Java - not that there's anything wrong with that.
You can't load this class: The 'com.sun' indicates that it is not a standard class (in fact, Sun's javadoc for this class used to specifically say 'use these classes with care, as they might disappear when you don't expect them to'), but one that Sun provides with their JRE. Since you are using the GNU version, they do not include this class, and you have to provide it yourself. Does this explain why com.sun.image.codec package is not accessible?The 'com.sun' indicates that it is not a standard class (in fact, Sun's javadoc for this class used to specifically say 'use these classes with care, as they might disappear when you don't expect them to'), but one that Sun provides with their JRE.
Since you are using the GNU version, they do not include this class, and you have to provide it yourself, separately. Where did you get the JPEG package as a JAR File? I wasn't aware that it was available from Sun. You might consider using JAI (Java Advanced Imaging) for a more standard (if not infinitely more complex) API. The only downside is that it uses a native library so you have to have a supported architecture (x86 Linux is definitely supported) and deal with installing a native library under Tomcat (which isn't a big deal).
-chris - To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. Here's the results of java -version java version '1.4.2' gij (GNU libgcj) version 4.0.2 20051125 (Red Hat 4.0.2-8)Well, /there's/ yer problem: you have GNU Java - not that there's anything wrong with that.christopher: There are a lot things wrong with that! Lets start with 'no java programm works with it'. Probably the half of 'my tomcat doesn't start/work/whatever messages are based on default installation of this (completely broken) jre (I think its not even an 'official' jre). If I start anything with gnuj i get: class not found exception: java.lang.Object.
Mon: remove it (its usually linked from /bin/java or /usr/java) and install suns jdk (download it from sun). Regards Leon - To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. On 12/12/06, Christopher Schultz wrote: Well, /there's/ yer problem: you have GNU Java - not that there's anything wrong with that.christopher: There are a lot things wrong with that!I just didn't want to knock the guy for the flavor of Java he was running;) - -chris - To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. On 12/12/06, Christopher Schultz wrote: Well, /there's/ yer problem: you have GNU Java - not that there's anything wrong with that.christopher: There are a lot things wrong with that!I just didn't want to knock the guy for the flavor of Java he was running;)I assume he didn't know that. Most of people who run into this problem don't know that 'free' lunux distros are coming with broken java vm. I hope with sun making jvm open source it will change. Regards Leon - To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected].
Caldarale, Charles R The odd part is that the Sun JREs have always been freely downloadable and redistributable (as have several other vendors' implementations). Even the Sun source has been freely available for years, but not redistributable, and not legally modifiable other than for personal use. Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail. From: Leon Rosenberg Subject: Re: java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGImageEncoder I hope with sun making jvm open source it will change.The odd part is that the Sun JREs have always been freely downloadable and redistributable (as have several other vendors' implementations).
Even the Sun source has been freely available for years, but not redistributable, and not legally modifiable other than for personal use. Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]. Here's the results of java -version java version '1.4.2' gij (GNU libgcj) version 4.0.2 20051125 (Red Hat 4.0.2-8)Well, /there's/ yer problem: you have GNU Java - not that there's anything wrong with that.christopher: There are a lot things wrong with that! Lets start with 'no java programm works with it'. Probably the half of 'my tomcat doesn't start/work/whatever messages are based on default installation of this (completely broken) jre (I think its not even an 'official' jre).
If I start anything with gnuj i get: class not found exception: java.lang.Object. Mon: remove it (its usually linked from /bin/java or /usr/java) and install suns jdk (download it from sun). Regards Leon - To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected].
Hassan Schroeder I suggest you not worry about the existing gnu java - all you have to do is: 1) download the Sun JDK 2) install it - I prefer somewhere specific like /usr/local/jdk1.5.006/ so I know exactly what I've got, and can install upgrades in parallel without affecting existing installs; YMMV of course 3) set JAVAHOME and JREHOME properly in your Tomcat startup scripts and in your own shell initialization files, e.g.bashrc, and include them in your PATH, something like (.bashrc example) export.
I'm creating an image watermarking program in java and I imported the followings: import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGEncodeParam; import com.sun.image.codec.jpeg.JPEGImageEncoder; but I get an error that says: Access restriction: The type JPEGCodec is not accesible due to restriction on required library C: Program Files Java jre6 lib rt.jar Does someone know a way to solve this, or what library should I add in order to access that and where I find that library? The problem is, that you're importing libraries from the sun.com. package. The use of these packages, since they could be removed in future releases or may not be available in all JVM implementations. It's possible that your IDE (which one are you using?) is configured for generating errors if you try to import sun.com.
libraries, in that case a configuration change will allow you to use those libraries, but it wouldn't be a good idea anyway. You should look for other alternatives to the functionality you seek, using libraries with no access restrictions. Also, if what you want is to simply read or write a JPEG file, take a look at the class, there are plenty of useful methods in there.
But you have allready installed into your system in a file called src.jar, allready shiped with your instaled JDK. I have JDK1.3.1 installed but the source is there from earlier versions. Unzip this jar and you will fint in the ROOT directory of the jar a directory called com. Traverse this directory and you will find your sources. I repeat my self again, you must have installed a JDK and not a JRE. If you still have problems with unziping or file searching you can download the entire java sources from the sun site. This requires login and a more complicated structure of directories to look up into.
Is not very hard to find the direct link to that decoder from that page!!!!!!!!!!! I've posted the entire page because contains a lot of links for image processing and is possible that the owner of this question to be interested in. What is wrong with you? I strongly believe that is normal to provide as much information (direct or related) to a topic, when is the case, as you can. Sorry for having humanitary taughts.
In the rest all I have to say for you is ENOUGH with this pointless debates. I see that is becaming a way of life for you in this discussion site. You have a very big leek with the fair-play in having discussions here.
JPEGCodec (Other API Bundled with the Java 2 SDK) Class PREV CLASS SUMMARY: NESTED FIELD CONSTR DETAIL: FIELD CONSTR com.sun.image.codec.jpeg Class JPEGCodec +- com.sun.image.codec.jpeg.JPEGCodec public class JPEGCodec extends This class is a factory for implementations of the JPEG Image Decoder/Encoder. Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs.
They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension. See Also:, Method Summary static ( src) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams. Static ( src, jdp) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams.
Static ( dest) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams. Static ( dest, jep) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams. Static ( bi) This is a factory method for creating JPEGEncodeParam objects. Static (int numBands, int colorID) This is a factory method for creating JPEGEncodeParam objects. Static ( jdp) This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam.
Static ( ras, int colorID) This is a factory method for creating JPEGEncodeParam objects. Methods inherited from class java.lang., Method Detail createJPEGDecoder public static createJPEGDecoder( src) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams. CreateJPEGDecoder public static createJPEGDecoder( src, jdp) This creates an instance of a JPEGImageDecoder that can be used to decode JPEG Data streams. CreateJPEGEncoder public static createJPEGEncoder( dest) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams. CreateJPEGEncoder public static createJPEGEncoder( dest, jep) This creates an instance of a JPEGImageEncoder that can be used to encode image data as JPEG Data streams. GetDefaultJPEGEncodeParam public static getDefaultJPEGEncodeParam( bi) This is a factory method for creating JPEGEncodeParam objects. The returned object should do a credible job of encoding the given BufferedImage.
Parameters: bi - A BufferedImage that is similar to the BufferedImage(s) that will encoded using the returned JPEGEncodeParam object. GetDefaultJPEGEncodeParam public static getDefaultJPEGEncodeParam( ras, int colorID) This is a factory method for creating JPEGEncodeParam objects. It is the users responsiblity to match the colorID with the data contained in the Raster. Failure to do so may lead to either poor compression or poor image quality. If you don't understand much about JPEG it is strongly recommended that you stick to the BufferedImage interface.
Parameters: ras - Raster that is similar to those to be encoded later. ColorID - the COLORID for the encoded data. This should match the data in the raster. GetDefaultJPEGEncodeParam public static getDefaultJPEGEncodeParam(int numBands, int colorID) throws This is a factory method for creating JPEGEncodeParam objects. It is the users responsiblity to match the colorID with the given number of bands, which should match the data being encoded. Failure to do so may lead to poor compression and/or poor image quality. If you don't understand much about JPEG it is strongly recommended that you stick to the BufferedImage interface.
This can also be used as a factory for a JPEGDecodeParam object. However this usage is extremely rare, as one needs to be decoding abbreviated JPEG streams where the JPEG tables are coming from some source other than a JPEG tables only stream. Parameters: numBands - the number of bands that will be encoded (max of four). ColorID - the COLORID for the encoded data.
This is used to set reasonable defaults in the parameter object. This must match the number of bands given. GetDefaultJPEGEncodeParam public static getDefaultJPEGEncodeParam( jdp) throws This is a factory method for creating a JPEGEncodeParam from a JPEGDecodeParam. This will return a new JPEGEncodeParam object that is initialized from the JPEGDecodeParam object. All major pieces of information will be initialized from the DecodeParam (Markers, Tables, mappings). Parameters: jdp - The JPEGDecodeParam object to copy. Class PREV CLASS SUMMARY: NESTED FIELD CONSTR DETAIL: FIELD CONSTR Java is a trademark or registered trademark of Sun Microsystems, Inc.
In the US and other countries. Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |