EclipseLink - 问题编译查询和状态字段路径无法解析为有效类型

时间:2014-02-10 10:15:26

标签: java eclipse apache jpa

有时我点击我的发票页面时会收到此错误。该表位于数据库中,JPA实体已设置且查询有效。

如果我在大多数情况下清理并重新启动服务器它会神奇地工作但是只要我在servlet中更改了任何内容,它就会在重新启动服务器后再次抛出此错误。

我已经在互联网上搜索了高低,无法找到答案,说明为什么会发生这种情况。

如果您有任何想法,请告诉我。

  

2014年2月10日上午9:49:49 org.apache.catalina.core.StandardWrapperValve   在上下文中调用SEVERE:Servlet.service()for servlet [default]   path [## 290]抛出异常[javax.servlet.ServletException:   javax.servlet.jsp.JspException:org.apache.jasper.el.JspELException:   /####/###/###/invoices.jsp(16,1)' $ {ti.teacherInvoiceList}'错误   阅读' teacherInvoiceList'在类型上   具有根本原因的本地异常的uk.org.mfsf.dao.TeacherInvoiceLists]   堆栈:异常[EclipseLink-0](Eclipse持久性服务 -   2.6.0.v20140201-f85d864):org.eclipse.persistence.exceptions.JPQLException异常   描述:问题编译[SELECT I FROM Invoice i WHERE   i.invoice.id =:id]。 [14,32]抽象模式类型'发票'是   未知。 [41,61]状态字段路径&#m ;.invoice.id'不可能是   解析为有效类型。在   org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildException(HermesParser.java:155)     在   org.eclipse.persistence.internal.jpa.jpql.HermesParser.validate(HermesParser.java:347)     在   org.eclipse.persistence.internal.jpa.jpql.HermesParser.populateQueryImp(HermesParser.java:278)     在   org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildQuery(HermesParser.java:163)     在   org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:142)     在   org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:116)     在   org.eclipse.persistence.internal.jpa.EJBQueryImpl。(EJBQueryImpl.java:102)     在   org.eclipse.persistence.internal.jpa.EJBQueryImpl。(EJBQueryImpl.java:86)     在   org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1614)     在   org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1636)     在   uk.org.mfsf.dao.TeacherInvoiceLists.getTeacherInvoiceList(TeacherInvoiceLists.java:33)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(未知来源)at   sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源)at   java.lang.reflect.Method.invoke(未知来源)at   javax.el.BeanELResolver.getValue(BeanELResolver.java:87)at at   javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67)at at   org.apache.el.parser.AstValue.getValue(AstValue.java:169)at at   org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)     在   org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:106)     在   org.apache.jsp.content.page.page_002dtemplates.invoices_jsp._jspx_meth_c_005fset_005f1(invoices_jsp.java:418)     在   org.apache.jsp.content.page.page_002dtemplates.invoices_jsp._jspx_meth_c_005fif_005f0(invoices_jsp.java:392)     在   org.apache.jsp.content.page.page_002dtemplates.invoices_jsp._jspService(invoices_jsp.java:103)     在org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:722)at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)     在   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)     在org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:722)at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)     在   org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)     在   org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)     在   org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:314)     在   org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:171)     在   org.apache.jsp.content.page.index_jsp._jspx_meth_c_005fimport_005f0(index_jsp.java:229)     在   org.apache.jsp.content.page.index_jsp._jspx_meth_c_005fwhen_005f0(index_jsp.java:174)     在   org.apache.jsp.content.page.index_jsp._jspService(index_jsp.java:98)     在org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:722)at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)     在   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)     在org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:722)at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)     在   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)     在   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)     在   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)     在   org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)     在   org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)     在   org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)     在   org.tuckey.web.filters.urlrewrite.NormalRewrittenUrl.doRewrite(NormalRewrittenUrl.java:213)     在   org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:171)     在   org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)     在   org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)     在   org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)     在   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     在   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)     在   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)     在   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)     在   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)     在   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)     在   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)     在   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)     在   org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)     在   org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:515)     在   org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:304)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source)     在java.lang.Thread.run(未知来源)

1 个答案:

答案 0 :(得分:0)

原来这是某种本地配置设置问题,遗憾的是我不记得解决方案是什么,但它对这个项目非常具体。