`
NistCK
  • 浏览: 38539 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
社区版块
存档分类
最新评论

org.hibernate.QueryException, in expected..

阅读更多
org.hibernate.QueryException: in expected: device [select device,
       s.name ,
       mr.name ,
       p.productTypeId, 
       p.name
 from DeviceBaseInfo_Simple device,
       com.test.DAO.ecmis.Station        s,
       com.test.DAO.ecmis.MachineRoom    mr,
       com.test.DAO.ecmis.Product        p
  where device.id in (2641,2642)
  and device.stationId=s.id(+)
  and device.productId=p.id(+)
  and device.machineRoomId=mr.id(+)
]
	at org.hibernate.hql.classic.FromParser.token(FromParser.java:106)
	at org.hibernate.hql.classic.ClauseParser.token(ClauseParser.java:86)
	at org.hibernate.hql.classic.PreprocessingParser.token(PreprocessingParser.java:108)
	at org.hibernate.hql.classic.ParserHelper.parse(ParserHelper.java:28)
	at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:216)
	at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:185)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1624)
	at com.test.DAO.ABaseHibernateQueryDAO.findListBySql(ABaseHibernateQueryDAO.java:617)
	at com.test.ecmis.sheet.serviceImpl.SheetServiceImpl.updateCircuitModifyRecord(SheetServiceImpl.java:325)
	at com.test.ecmis.circuit.serviceImpl.CircuitServiceImpl.saveCircuit(CircuitServiceImpl.java:1405)
	at com.test.ecmis.circuit.action.CircuitAction.saveCircuit(CircuitAction.java:329)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
	at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)
	at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)
	at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.test.common.interceptors.CommonInterceptor.intercept(CommonInterceptor.java:56)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.test.common.interceptors.ActionInvocationRecordInterceptor.intercept(ActionInvocationRecordInterceptor.java:30)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at com.test.common.interceptors.ExceptionInterceptor.intercept(ExceptionInterceptor.java:24)
	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
	at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
	at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
	at com.test.base.BaseFilter.doFilter(BaseFilter.java:190)
	at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
	at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3496)
	at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
	at weblogic.security.service.SecurityManager.runAs(Unknown Source)
	at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
	at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
	at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
	at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
	at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

 

可能有两种:

1、 FROM 后面的Hibernate实体类类名大小写写错。

2、 FROM 后面某个Hibernate实体类的 hbm 映射文件, 路径没有放到Hibernate.cfg.xml中。

分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

    pdfbox-3.0.0-20180524.180606-675.rar

    import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.printing.PDFPageable; import org.apache.pdfbox.printing.PDFPrintable; import org.apache.pdfbox.printing.Scaling;

    外网无法访问HDFS org.apache.hadoop.hdfs.BlockMissingException: Could not obtain block

    报错 org.apache.hadoop.hdfs.BlockMissingException: Could not obtain block 2、百度结果 参考 https://blog.csdn.net/xiaozhaoshigedasb/article/details/88999595  防火墙记得关掉; 查看DataNode是否启动;...

    xmlpull_1_0_5解决 org/xmlpull/v1/XmlPullParserException

    `org/xmlpull/v1/XmlPullParserException`是XMLPull API中抛出的一个异常,通常表示在解析XML时遇到了错误。 `XmlPullParserException`是当解析过程中遇到语法错误、非法状态转换或其他解析问题时抛出的异常。例如...

    junit工具jar包

    此外,JUnit支持异常测试,例如`@Test(expected = Exception.class)`,可以用来检查方法是否按预期抛出特定的异常。还有`@Ignore`注解,可以暂时忽略某个测试方法。 总之,JUnit 4.8.1是一个强大的工具,可以帮助...

    spring boot shiro demo项目

    Spring Boot Shiro Demo项目是一个基于Spring Boot框架与Apache Shiro实现的权限管理示例,旨在帮助开发者快速理解和应用Shiro进行权限控制。相比Spring Security,Shiro通常被认为更易于理解和使用,更适合小型到...

    hibernate和junit的jar

    标题中的“hibernate和junit的jar”指的是两个重要的Java开发工具——Hibernate ORM框架的jar文件和JUnit测试框架的jar文件。这两个组件在Java应用开发中起着至关重要的作用。 **Hibernate ORM框架**是Java领域中最...

    hamcrest-core-1.3.jar

    在这个例子中,`is(equalTo(expected))`就是使用Hamcrest进行断言,它会判断实际结果`actual`是否等于预期值`expected`。 5. **扩展与集成** Hamcrest不仅可以独立使用,还可以与其他测试框架(如JUnit、TestNG)...

    hibernate_reference.pdf

    - **Deploying and Testing**: Finally, you'll deploy the application to a server and perform basic testing to ensure it functions as expected. #### Architecture Overview The architecture section ...

    Module version mismatch. Expected X(解决方案).md

    Module version mismatch. Expected X(解决方案).md

    Apress.Pro.LINQ.Language.Integrated.Query.in.C.Sharp.2008.Nov.2007.eBook-BBL

    Where Pro LINQ: Language Integrated Query in C# 2008 returns your investment is in the hours, and sometimes days, spent by the author determining why something may not work as expected....

    hbase 启动regionserver日志报错: Wrong FS: hdfs:// .regioninfo, expected: file:///

    NULL 博文链接:https://bnmnba.iteye.com/blog/2322332

    avro-mapred-1.7.8-SNAPSHOT-hadoop2

    org.apache.hadoop.mapred.YarnChild: Error running child : java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected at org.apache...

    关于springboot我出过的那些错误.docx

    错误二:org.apache.jasper.JasperException: /WEB-INF/jsp/show.jsp (line: [2], column: [18]) quote symbol expected 错误原因:show.jsp 中第二行少了个“” 解决方式:加上缺少的“ 错误三:org.apache....

    magic-script是一款基于JVM的脚本语言,目前主要是为magic-api项目设计

    magic-script是一款基于JVM的脚本语言,目前主要是为magic-api项目设计。magic-api,接口快速开发框架,通过Web页面配置,自动映射为...spider-flow,新一代爬虫平台,以图形化方式定义爬虫流程,不写代码即可完成爬虫

    junit+hamcrest集成jar包

    this.expected = expected; } @Test public void testAddition() { assertThat(input1 + input2, is(expected)); } } ``` 这个例子展示了如何使用参数化测试来验证加法运算的不同输入和期望结果。 五、...

    spring单元测试

    .andExpect(view().name("expected-view")); } } ``` 这段代码模拟了HTTP请求,并检查Controller的响应是否符合预期。 对于Service层的测试,我们可以利用`@MockBean`和`@Autowired`注解来创建mock对象,隔离服务...

    expected time bounds for selection

    ### 关于选择问题的时间界限分析 #### 摘要与背景 本文主要研究了选择问题的时间界限,并提出了一种新的选择算法,该算法在平均情况下非常高效。文章给出了选择第i小元素所需的比较次数的上界和下界,并且这个下界...

    java实现scep源码

    Java实现SCEP源码详解 SCEP(Simple Certificate Enrollment Protocol)是一种基于PKI(Public Key Infrastructure,公钥基础设施)的协议,用于自动化证书请求、分发和撤销过程。在网络安全领域,SCEP协议常被用在...

    Spring3单元测试和集成测试

    .andExpect(content().string("Expected Result")); } } ``` 这里,`@WebMvcTest`注解限制了测试范围,只加载与控制器相关的bean,`MockMvc`则允许我们模拟HTTP请求并验证响应。 ### 使用Mockito进行测试 ...

    googleGson JsonObject json转换包

    包含以下java源文件: com.google.gson.DefaultDateTypeAdapter.class com.google.gson.ExclusionStrategy.class com.google.gson.FieldAttributes.class com.google.gson.FieldNamingPolicy.class ...

Global site tag (gtag.js) - Google Analytics