JAVA java.io.InvalidClassException¼±½â
JAVA--java.io.InvalidClassException¼±½â
×ֺţºT|T
JAVA--java.io.InvalidClassException¼±½â
java.io.InvalidClassException: message.RegisterMessage; local class incompatible: stream classdesc serialVersionUID = 5540404719929042644, local class serialVersionUID = -8915824483106432775
»Ø´ð£º
×î¼Ñ´ð°¸ µ± Serialization ÔËÐÐʱ¼ì²âµ½Ä³¸öÀà¾ßÓÐÒÔÏÂÎÊÌâ֮һʱ£¬Å׳ö´ËÒì³£¡£
¸ÃÀàµÄÐòÁа汾ºÅÓë´ÓÁ÷ÖжÁÈ¡µÄÀàÃèÊö·ûµÄ°æ±¾ºÅ²»Æ¥Åä
¸ÃÀà°üº¬Î´ÖªÊý¾ÝÀàÐÍ
¸ÃÀàûÓпɷÃÎʵÄÎÞ²ÎÊý¹¹Ôì·½·¨
Ïà¹ØÎĵµ£º
JavaỊ̈߳ºÏß³Ì״̬µÄת»»
SCJP5ѧϰ±Ê¼Ç
Ò»¡¢Ïß³Ì״̬
Ï̵߳Ä״̬ת»»ÊÇÏ߳̿ØÖƵĻù´¡¡£Ïß³Ì״̬×ܵĿɷÖΪÎå´ó״̬£º·Ö±ðÊÇÉú¡¢ËÀ¡¢¿ÉÔËÐС¢ÔËÐС¢µÈ´ý/×èÈû¡£ÓÃÒ»¸öͼÀ´ÃèÊöÈçÏ£º
1¡¢ÐÂ״̬£ºÏ̶߳ÔÏóÒѾ´´½¨£¬»¹Ã»ÓÐÔÚÆäÉϵ÷ÓÃstart()·½·¨¡£
2¡¢¿ÉÔËÐÐ״̬£ºµ±Ïß³ÌÓÐ× ......
Ê×ÏÈÉùÃ÷һϣ¬´ËÎÄÕÂʱ´ÓÍøÉÏתÔصġ£ÈçϵÄijЩ·½·¨ÊÇȷʵ¹ÜÓ㬵«ÊÇ´ÓÖз¢ÏÖÁËÓÐÒ»µã²»×㣬¾ÍÊÇÔÎıÊÕßû¿¼ÂÇʹÓò»Í¬Web
Serverʱ³öÏÖµÄÇé¿ö£¬±ÈÈçÎÄÕÂÀïÎÒÓÃ
ºìÉ«×ÖÌå
»³öÀ´µÄ²¿·Ö´úÂëÔÚTomcatÅܵÄʱºòµÃÓÃËû˵µÄ·½·¨£¬²»¹ýµ½ÁËWebSphereµÄʱºò±ØÐëµÃÓÃÔÏȵÄ
String name = request.getParameter("name& ......
Java™ ÓïÑÔ°üº¬Á½ÖÖÄÚÔÚµÄͬ²½»úÖÆ£ºÍ¬²½¿é(»ò·½·¨)ºÍ volatile ±äÁ¿¡£ÕâÁ½ÖÖ»úÖƵÄÌá³ö¶¼ÊÇΪÁËʵÏÖ´úÂëÏ̵߳ݲȫÐÔ¡£ÆäÖÐ Volatile ±äÁ¿µÄͬ²½ÐԽϲî(µ«ÓÐʱËü¸ü¼òµ¥²¢ÇÒ¿ªÏú¸üµÍ)£¬¶øÇÒÆäʹÓÃÒ²¸üÈÝÒ׳ö´í¡£
¡¡¡¡Ì¸¼°µ½volatile¹Ø¼ü×Ö£¬²»µÃ²»ÌáµÄһƪÎÄÕÂÊÇ£º¡¶Java ÀíÂÛÓëʵ¼ù: ÕýȷʹÓà Volatile ±äÁ¿¡·£¬ÕâÆ ......
ÎÒÃǶ¼ÖªµÀÒ»¸ö¶ÔÏóֻҪʵÏÖÁËSerilizable½Ó¿Ú£¬Õâ¸ö¶ÔÏó¾Í¿ÉÒÔ±»ÐòÁл¯£¬javaµÄÕâÖÖÐòÁл¯Ä£Ê½Îª¿ª·¢ÕßÌṩÁ˺ܶà±ãÀû£¬ÎÒÃÇ¿ÉÒÔ²»±Ø¹Øϵ¾ßÌåÐòÁл¯µÄ¹ý³Ì£¬Ö»ÒªÕâ¸öÀàʵÏÖÁËSerilizable½Ó¿Ú£¬Õâ¸öµÄËùÓÐÊôÐԺͷ½·¨¶¼»á×Ô¶¯ÐòÁл¯¡£
È»¶øÔÚʵ¼Ê¿ª·¢¹ý³ÌÖУ¬ÎÒÃdz£³£»áÓöµ½ÕâÑ ......
import java.io.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.Graphics;
import java.awt.color.ColorSpace;
import javax.imageio.ImageIO;
public class ChangeImageSize
{
/** *//**
* Ëõ·ÅͼÏñ
* @param srcImage ......