javax.el.E​​LException:java.lang.IllegalArgumentException:无法将..转换为类java.lang.Long

时间:2013-12-09 11:00:44

标签: java hibernate jsf seam

我目前正在使用JSF和JBoss。当我尝试远程调试我的应用程序时,我得到以下内容:

javax.el.ELException: java.lang.IllegalArgumentException: Cannot convert pro.entity.SysLangresource@3da91823 of type class pro.entity.SysLangresource_$$_javassist_41 to class java.lang.Long

我无法识别错误在哪里。

SysLangresource上课:

package pro.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import org.hibernate.validator.Length;
import org.hibernate.validator.NotNull;

import EntityMain;

@Entity
@Table(name = "SYS_LANGRESOURCE")
public class SysLangresource extends EntityMain {
private static final long serialVersionUID = -7867388773892723774L;
private static final String KEY = "LARE";

private long lareId;
private String lareName;

@Override
public void insertData() { //       
}
@Override
public void updateData() { //       
}

@Id
@TableGenerator(name=SEQU + KEY, table=SEQU_TABLE, pkColumnName=SEQU_PK, pkColumnValue=SEQU + KEY, valueColumnName=SEQU_VALUE, allocationSize=1)
@GeneratedValue(strategy = GenerationType.TABLE, generator = SEQU + KEY)
@Column(name = "LARE_ID", unique = true, nullable = false, precision = 18, scale = 0)
@NotNull
public long getLareId() {
    return lareId;
}
public void setLareId(long lareId) {
    this.lareId = lareId;
}

@Column(name = "LARE_NAME", length = 50)
@Length(max = 50)
public String getLareName() {
    return lareName;
}
public void setLareName(String lareName) {
    this.lareName = lareName;
}

}

stacktrace:

      java.lang.IllegalArgumentException: Cannot convert at.prosigma.profiler.entity.SysLangresource@7b0cfc3f of type class at.prosigma.profiler.entity.SysLangresource_$$_javassist_41 to class java.lang.Long
    at org.jboss.el.lang.ELSupport.coerceToNumber(ELSupport.java:271)
    at org.jboss.el.lang.ELSupport.coerceToType(ELSupport.java:331)
    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:322)
    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:274)
    at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
    at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
    at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
    at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
    at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
    at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
    at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:281)
    at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
    at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
    at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:288)
    at org.richfaces.renderkit.AbstractTableRenderer.encodeOneRow(AbstractTableRenderer.java:387)
    at org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:83)
    at at.prosigma.jsf.components.dataTable.PagedTableDataModel.walk(PagedTableDataModel.java:232)
    at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:1133)
    at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:104)
    at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:88)
    at at.prosigma.jsf.components.dataTable.PagedDataTableRenderer.encodeTBody(PagedDataTableRenderer.java:419)
    at org.richfaces.renderkit.AbstractTableRenderer.encodeChildren(AbstractTableRenderer.java:97)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
    at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
    at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
    at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
    at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
    at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
    at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
    at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271)
    at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:117)
    at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
    at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
    at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
    at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:510)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
    at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:38)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
    at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
    at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
    at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
    at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
    at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at at.prosigma.profiler.filter.DownloadFilter.doFilter(DownloadFilter.java:176)
    at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
    at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Thread.java:662)

0 个答案:

没有答案