关闭

java.lang.ClassFormatError Duplicate field name&signature in class file XXXXXX

标签: classfilestringservlet
5500人阅读 评论(2) 收藏 举报
分类:

2012-7-5 15:06:25org.apache.catalina.core.StandardWrapperValve invoke

严重:Servlet.service() for servlet LotteryServlet threw exception

java.lang.ClassFormatError:Duplicate field name&signature in class file Fastjson_ASM_DateDataModel_2

    atjava.lang.ClassLoader.defineClass1(Native Method)

    atjava.lang.ClassLoader.defineClassCond(ClassLoader.java:632)

    atjava.lang.ClassLoader.defineClass(ClassLoader.java:616)

    atcom.alibaba.fastjson.util.ASMClassLoader.defineClassPublic(ASMClassLoader.java:24)

    atcom.alibaba.fastjson.parser.deserializer.ASMDeserializerFactory.createJavaBeanDeserializer(ASMDeserializerFactory.java:91)

    atcom.alibaba.fastjson.parser.ParserConfig.createJavaBeanDeserializer(ParserConfig.java:333)

    atcom.alibaba.fastjson.parser.ParserConfig.getDeserializer(ParserConfig.java:311)

    atcom.alibaba.fastjson.parser.ParserConfig.getDeserializer(ParserConfig.java:260)

    atcom.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:506)

    atcom.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:489)

    atcom.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:484)

    atcom.alibaba.fastjson.JSON.parseArray(JSON.java:294)

    atcom.lottery.service.lottery.DateQueryService.authentication(DateQueryService.java:62)

    atcom.lottery.service.lottery.DateQueryService.getRes(DateQueryService.java:34)

    atcom.lottery.servlet.LotteryServlet.doMsg00(LotteryServlet.java:253)

    atcom.lottery.servlet.LotteryServlet.doPost(LotteryServlet.java:74)

    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:637)

    atjavax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

    atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

    atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)

    atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

    atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

    atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

    atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

    atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)

    atorg.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:864)

    atorg.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)

    atorg.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1665)

    atjava.lang.Thread.run(Thread.java:662)

 

 

出错地方:

package com.lottery.model.lottery;

 

public class DateDataModel2

{

         privateString   poscode;           // 玩法ID

         privateLong     salmoney;         // 当天销售金额

         privateLong     cashmoney;     // 当前兑奖金额

                                                                

         publiclong getSalmoney()

         {

                   returnsalmoney;

         }

        

         publicvoid setSalmoney(long salmoney)

         {

                   this.salmoney= salmoney;

         }

        

         publicString getPoscode()

         {

                   returnposcode;

         }

        

         publicvoid setPoscode(String poscode)

         {

                   this.poscode= poscode;

         }

        

         publicvoid setSalmoney(Long salmoney)

         {

                   this.salmoney= salmoney;

         }

        

         publicvoid setCashmoney(Long cashmoney)

         {

                   this.cashmoney= cashmoney;

         }

        

         publiclong getCashmoney()

         {

                   returncashmoney;

         }

        

         publicvoid setCashmoney(long cashmoney)

         {

                   this.cashmoney= cashmoney;

         }

        

}

 

 

原因:

setSalmoney()和setCashmoney各2个。

 

解决:

setSalmoney()和setCashmoney各去掉1个即可。

 

如下即可解决:

package com.lottery.model.lottery;

 

publicclass DateDataModel

{

    private String    poscode;      // 玩法ID

    private Long  salmoney // 当天销售金额

    private Long  cashmoney; // 当前兑奖金额

                        

//  public long getSalmoney()

//  {

//     return salmoney;

//  }

// 

//  public void setSalmoney(long salmoney)

//  {

//     this.salmoney = salmoney;

//  }

   

    public String getPoscode()

    {

       returnposcode;

    }

   

    publicvoid setPoscode(String poscode)

    {

       this.poscode = poscode;

    }

   

    public Long getSalmoney() {

       returnsalmoney;

    }

 

    publicvoid setSalmoney(Long salmoney)

    {

       this.salmoney = salmoney;

    }

   

    publicvoid setCashmoney(Long cashmoney)

    {

       this.cashmoney = cashmoney;

    }

 

    public Long getCashmoney() {

       returncashmoney;

    }

   

//  public long getCashmoney()

//  {

//     return cashmoney;

//  }

// 

//  public void setCashmoney(long cashmoney)

//  {

//     this.cashmoney = cashmoney;

//  }

   

}

 

 


0
0

猜你在找
【视频】C语言及程序设计(讲师:贺利坚)
【视频】Python爬虫工程师培养课程全套(讲师:韦玮)
【视频】Python全栈开发入门与实战(讲师:李杰)
【视频】2017软考网络规划设计师套餐(讲师:任铄)
【视频】2017软考软件设计师套餐(讲师:任铄)
【视频】2017软考信息系统项目管理师套餐(讲师:任铄)
【视频】软考(高级)项目经理实战营(讲师:张传波)
【视频】微信公众平台开发套餐(讲师:刘运强)
深度学习原理+实战+算法+主流框架套餐(讲师:唐宇迪)
2017系统集成项目管理工程师通关套餐(讲师:徐朋)
查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:935115次
    • 积分:9587
    • 等级:
    • 排名:第1778名
    • 原创:148篇
    • 转载:146篇
    • 译文:1篇
    • 评论:62条
    最新评论