2013-03-21 70 views
3

我有一個HQL查詢,我通過傳遞一個列表來檢查某些細節!確切的數組列表。下面是HQL查詢。HQL中的java.lang.NullPointerException查詢

<prop key="GET_HOTEL_TAX_RECORDS"> 
<![CDATA[ 
    select 
     HotelLevelTax 
    from HotelLevelTax ht 
    left join ht.hotel as h 
    left join ht.tax as t 
    where h.id in (:hotelId) and t.id in (:taxId) order by ht.id 
]]> 
</prop> 

下面是我用來傳輸兩個參數數組列表的代碼。

if(searchCriteria.getHotel().getId() != null && searchCriteria.getTax().getId() != null){ 
    params.put("hotelId", searchCriteria.getHotel().getId()); 
    params.put("taxId", searchCriteria.getTax().getId()); 
}else{ 
    params.put("hotelId", hotels); 
    params.put("taxId", tax); 
} 

Query k = queryManager.getQuery(GET_HOTEL_TAX_RECORDS, params, em); 

我從給定參數的getQuery行中得到一個空指針異常!在第一次運行時,searchCriteria參數爲null,所以else會被執行!我找不到在這裏發生nullpointer異常!

謝謝。

這是我的堆棧跟蹤!

Unable to translate Exception : java.lang.NullPointerException 
    java.lang.NullPointerException 
at   org.hibernate.hql.ast.util.SessionFactoryHelper.findSQLFunction(SessionFactoryHelper.java:342) 
at org.hibernate.hql.ast.tree.IdentNode.getDataType(IdentNode.java:266) 
at   org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:143) 
at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:705) 
at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:529) 
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:645) 
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281) 
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229) 
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228) 
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160) 
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) 
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:1623) 
at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:92) 
at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.springframework.orm.jpa.JpaTemplate$CloseSuppressingInvocationHandler.invoke(JpaTemplate.java:404) 
at $Proxy1043.createQuery(Unknown Source) 
at com.jkcs.khms.persistence.platform.HQLQueryManager.getQuery(HQLQueryManager.java:67) 
at com.jkcs.khms.persistence.cashiering.impl.jpa.HotelTaxDaoImpl$1.doInJpa(HotelTaxDaoImpl.java:68) 
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:184) 
at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:147) 
at com.jkcs.khms.persistence.cashiering.impl.jpa.HotelTaxDaoImpl.findTaxByHQL(HotelTaxDaoImpl.java:54) 
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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77) 
at com.jkcs.khms.persistence.platform.aspects.PersistenceProfilerAspect.profile(PersistenceProfilerAspect.java:56) 
at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) 
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77) 
at com.jkcs.khms.persistence.platform.aspects.PersistenceExceptionTranslatorAspect.invokeAndTranslate(PersistenceExceptionTranslatorAspect.java:65) 
at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) 
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
at $Proxy692.findTaxByHQL(Unknown Source) 
at com.jkcs.khms.service.internal.HotelTaxServiceImpl.searchHotelTaxByHQL(HotelTaxServiceImpl.java:106) 
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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) 
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77) 
at com.jkcs.khms.service.platform.aspects.ServiceProfilerAspect.profile(ServiceProfilerAspect.java:56) 
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) 
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) 
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:54) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) 
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) 
at $Proxy712.searchHotelTaxByHQL(Unknown Source) 
at com.jkcs.khms.service.api.impl.CashieringServiceBean.searchHotelTaxByHQL(CashieringServiceBean.java:256) 
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 org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112) 
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166) 
at com.jkcs.khms.service.platform.security.AuthenticationContextInterceptor.intercept(AuthenticationContextInterceptor.java:67) 
at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
at java.lang.reflect.Method.invoke(Method.java:597) 
at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118) 
at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79) 
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.aspects.remoting.ReplicantsManagerInterceptor.invoke(ReplicantsManagerInterceptor.java:51) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77) 
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) 
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101) 
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:240) 
at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:210) 
at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:84) 
at $Proxy201.searchHotelTaxByHQL(Unknown Source) 
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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) 
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) 
at $Proxy1091.searchHotelTaxByHQL(Unknown Source) 
at com.jkcs.khms.web.cashiering.hotelTax.HotelTaxAction.performSearch(HotelTaxAction.java:111) 
at com.jkcs.khms.web.cashiering.hotelTax.HotelTaxAction.execute(HotelTaxAction.java:63) 
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:404) 
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) 
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) 
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) 
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) 
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:184) 
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.jkcs.khms.web.platform.struts2.json.AerisJSONParamsIntercepter.doIntercept(AerisJSONParamsIntercepter.java:68) 
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121) 
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:88) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.jkcs.khms.web.platform.struts2.interceptors.PageExceptionFlowInterceptor.doIntercept(PageExceptionFlowInterceptor.java:59) 
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at com.jkcs.khms.web.platform.struts2.interceptors.ProfileLoggingInterceptor.intercept(ProfileLoggingInterceptor.java:48) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) 
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) 
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) 
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) 
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) 
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) 
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422) 
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:182) 
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524) 
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) 
+2

你可以爲我顯示堆棧跟蹤 – PSR 2013-03-21 08:42:30

+0

@PSR:我已經添加了堆棧跟蹤。 – 2013-03-21 10:06:42

+0

你是否斷點該行並檢查'queryManager!= null'? – 2013-03-21 10:08:44

回答

6

這是因爲錯誤的查詢。定義的別名ht應該用來代替HotelLevelTax在SELECT子句:

select ht 
from HotelLevelTax ht 
1

萬一別人運行到這一點,也可能發生在一些語法錯誤,比如在列表的最後一個晃來晃去)