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

本文转载自:https://blog.csdn.net/ylchou/article/details/7739742

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;

//  }

}

上一篇:还原堆栈信息,分析地形系统使用ASTC格式的纹理导致Crash的问题


下一篇:解决:“java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut myMethod”问题!