NutzCN Logo
问答 nutz查询异常
发布于 3021天前 作者 qq_a0ce1ea5 3037 次浏览 复制 上一个帖子 下一个帖子
标签:
String sql = " select * from slj_info where  id in (select infoid from netletter where linktel=@phone )  order by id desc ";
		Sql sql_ = Sqls.create(sql);
		sql_.params().set("phone", phone);
		QueryResult qr1 = daoCtl.listPageSql(dao, sql_, page, size);
6 回复

然后呢? 异常是啥啊!!!!

@wendal

Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: org.nutz.dao.DaoException: !Nutz SQL Error: 'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel= )  order by id desc )'
PreparedStatement: 
'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel=? )  order by id desc )'
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
	at com.sun.proxy.$Proxy19.searchByPhone(Unknown Source)
	at yt_szrx_client.Test.main(Test.java:19)
Caused by: org.apache.cxf.binding.soap.SoapFault: org.nutz.dao.DaoException: !Nutz SQL Error: 'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel= )  order by id desc )'
PreparedStatement: 
'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel=? )  order by id desc )'
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)

@wendal
拼接sql可以通过

完整出错信息

@wendal

三月 18, 2016 12:09:57 下午 org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServiceFromClass
信息: Creating Service {http://inter.hits.com/}ServerService from class com.hits.inter.Server
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: org.nutz.dao.DaoException: !Nutz SQL Error: 'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel= )  order by id desc )'
PreparedStatement: 
'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel=? )  order by id desc )'
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:156)
	at com.sun.proxy.$Proxy19.searchByPhone(Unknown Source)
	at yt_szrx_client.Test.main(Test.java:19)
Caused by: org.apache.cxf.binding.soap.SoapFault: org.nutz.dao.DaoException: !Nutz SQL Error: 'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel= )  order by id desc )'
PreparedStatement: 
'select count(1) FROM ( select * from slj_info where  id in (select infoid from netletter where linktel=? )  order by id desc )'
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46)
	at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:105)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69)
	at org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:797)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1618)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1491)
	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1399)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:646)
	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:533)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:88)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
	... 2 more

count的语句有问题

daoCtl.listPageSql 这个方法完整贴出来

添加回复
请先登陆
回到顶部