2 qq 36128558 qq_36128558 于 2017.09.05 08:51 提问

SSH框架查询问题求大神解释下报sql的错误
ssh

这是hql语句,改为sql数据库执行没问题

 public Page getUserListNew(SaaUser saaUser, int pageNo, int pageSize,
            String userCodeOperate) {
        StringBuffer hql = new StringBuffer();
        hql.append(" from SaaUser saaUser where 1=1 and saaUser.userCode <> '00000000'");
        if(!userCodeOperate.equals("00000000")){
            String comCodeSql=saaPowerService.addPower(userCodeOperate, IConstants.SAA, "", "saaUser.comCode", "", "", "");
            hql.append(" and saaUser.userCode<>'"+userCodeOperate+"'");
            hql.append(" and "+comCodeSql);
        }
        hql.append(" and saaUser.validStatus='1'");
        HqlRulesUtil hqlRulesUtil = new HqlRulesUtil();
        hqlRulesUtil.addLike("saaUser.userCode", saaUser.getUserCode());
        hqlRulesUtil.addLike("saaUser.comCode", saaUser.getComCode());
        hqlRulesUtil.addLike("saaUser.userName", saaUser.getUserName());
        logger.info("hql.toString()"+hql.toString());
        if (hqlRulesUtil.getHql().trim().length() != 0) {
            hql.append(" and ").append(hqlRulesUtil.getHql());
        }
        Page page = findByHql(hql.toString(), pageNo, pageSize, null);
        List<SaaUser> list = page.getResult();
        List<UserQueryCondition> resultLists = new ArrayList<UserQueryCondition>();
        for(SaaUser user:list){
            UserQueryCondition condition = new UserQueryCondition();
            try {
                BeanUtils.copyProperties(condition, user);
            } catch (IllegalAccessException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (InvocationTargetException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            PrpDcompany dcompany = super.get(PrpDcompany.class, user.getComCode());
            if(null == dcompany || dcompany.equals("")){
                condition.setComCName("");
            }else{
            condition.setComCName(dcompany.getComCName());
            }
            resultLists.add(condition);
        }
        Page retPage = new Page(0, page.getTotalCount(), pageSize, resultLists);
        return retPage;
    }

6个回答

caozhy
caozhy   Ds   Rxr 2017.09.05 08:57

调试输出下你的sql是什么,你有大量的拼接,而且这些拼接又有不同的条件,所以只能调试。

caozhy
caozhy 回复qq_36128558: 你说sql正确执行,但是SQLSyntaxErrorException意思是sql语法错误,这不是矛盾么
3 个月之前 回复
qq_36128558
qq_36128558 SQL是正确的数据库执行了
3 个月之前 回复
Sweet__dream
Sweet__dream   2017.09.05 09:05

建议设置断点一步一步调试,就能找出bug在哪

qq_36128558
qq_36128558 sql是正确的
3 个月之前 回复
qq_36128558
qq_36128558   2017.09.05 09:07

java.sql.SQLSyntaxErrorException: ORA-00933: SQL 命令未正确结束

at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:91) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:785) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:860) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3425) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1490) ~[ojdbc6-11.1.0.6.0.jar:Oracle JDBC Driver version - "11.1.0.6.0-Production+"]
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:802) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.loader.Loader.doList(Loader.java:2542) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.loader.Loader.list(Loader.java:2271) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate-core-3.6.10.Final.jar:3.6.10.Final]
at ins.framework.dao.EntityDaoHibernate$4.doInHibernate(EntityDaoHibernate.java:484) [ins-arch4-20080510.jar:na]
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) [spring-orm-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.orm.hibernate3.HibernateTemplate.executeFind(HibernateTemplate.java:343) [spring-orm-2.5.6.SEC03.jar:2.5.6.SEC03]
at ins.framework.dao.EntityDaoHibernate.findByHql(EntityDaoHibernate.java:468) [ins-arch4-20080510.jar:na]
at cn.com.cis.acic.sales.power.service.spring.SaaUserServiceSpringImpl.getUserListNew(SaaUserServiceSpringImpl.java:241) [SaaUserServiceSpringImpl.class:na]
at cn.com.cis.acic.sales.power.service.spring.SaaUserServiceSpringImpl$$FastClassByCGLIB$$b8735460.invoke(<generated>) [cglib-nodep-2.2.2.jar:na]
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) [cglib-nodep-2.2.2.jar:na]
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) [spring-tx-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) [spring-aop-2.5.6.SEC03.jar:2.5.6.SEC03]
at cn.com.cis.acic.sales.power.service.spring.SaaUserServiceSpringImpl$$EnhancerByCGLIB$$7896c0e7.getUserListNew(<generated>) [cglib-nodep-2.2.2.jar:na]
at cn.com.cis.acic.sales.power.web.SaaUserAction.queryUser(SaaUserAction.java:38) [SaaUserAction.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_43]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_43]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_43]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_43]
at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) [xwork-2.0.4.jar:na]
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) [struts2-core-2.0.9.jar:na]
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83) [struts2-core-2.0.9.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207) [struts2-core-2.0.9.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:107) [struts2-core-2.0.9.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:206) [struts2-core-2.0.9.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:121) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) [struts2-core-2.0.9.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.4.jar:na]
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) [xwork-2.0.4.jar:na]
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) [struts2-core-2.0.9.jar:na]
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) [struts2-core-2.0.9.jar:na]
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) [struts2-core-2.0.9.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.48]
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) [spring-orm-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.48]
at cn.com.cis.acic.sales.common.web.SessionFilter.doFilter(SessionFilter.java:43) [SessionFilter.class:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.48]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:399) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:411) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:188) [spring-security-core-2.0.8.RELEASE.jar:na]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.48]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [spring-web-2.5.6.SEC03.jar:2.5.6.SEC03]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.48]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.48]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina.jar:6.0.48]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina.jar:6.0.48]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:6.0.48]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:6.0.48]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina.jar:6.0.48]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) [catalina.jar:6.0.48]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:876) [tomcat-coyote.jar:6.0.48]
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:612) [tomcat-coyote.jar:6.0.48]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1777) [tomcat-coyote.jar:6.0.48]
at java.lang.Thread.run(Thread.java:662) [na:1.6.0_43]

2017-09-05 09:05:44.892 WARN o.h.util.JDBCExceptionReporter - SQL Error: 933, SQLState: 42000
2017-09-05 09:05:44.893 ERROR o.h.util.JDBCExceptionReporter - ORA-00933: SQL 命令未正确结束

qq_28215471
qq_28215471   2017.09.05 10:02

图片说明 这个是什么鬼

qq_36128558
qq_36128558 这个是实体类的名称不是表名
3 个月之前 回复
srjzh
srjzh   2017.09.05 10:02

我以前也遇到过,是SQL的问题,尤其是大量的拼接SQL,有可能是哪里少了一个空格或者多了一个非英文的逗号之类的,你仔细检查一下,应该也差不多是这种问题

srjzh
srjzh   2017.09.05 10:08

而且还有一点,hql查询是依据对象和表的映射关系来查询,也就是说它查的是对象,而不是表

srjzh
srjzh 回复qq_36128558: http://blog.csdn.net/jenminzhang/article/details/8055219要不你看看这个
3 个月之前 回复
qq_36128558
qq_36128558 恩呢 查的是实体类的名称不是表 然后数据库如果有这条数据会报错没有的话是不会报错的
3 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片