[code]
Create or replace package statistics_pkg
is
type ResultRows is ref cursor;
procedure Expired_domain(staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows);
end statistics_pkg;
/
create or replace package body statistics_pkg is
procedure Expired_domain(
staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows
)
is
timeUnit VARCHAR2(10) := to_char(add_months(sysdate,2), 'yyyy-MM-dd');
begin
if timeUnits is not null then
timeUnit := timeUnits;
end if;
open rows for
select *
from domain d
where d.staff_id = staffId
and to_char(d.exp_date, 'yyyy-MM-dd') > to_char(sysdate - 1, 'yyyy-MM-dd')
and to_char(d.exp_date, 'yyyy-MM') < timeUnit
order by to_char(d.reg_date, 'yyyy-MM-dd') desc;
end Expired_domain;
end statistics_pkg;
[/code]
然后在ibatis的配置里面定义
[code]
<sqlMap namespace="STATISTICS" >
<parameterMap id="Expired_domain_Parameter" class="java.util.Hashtable">
<parameter property="staffId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="timeUnits" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="result" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="DOMAIN.abatorgenerated_DomainResult" />
</parameterMap>
<select id="Expired_domain" parameterMap="Expired_domain_Parameter">
{call STATISTICS_PKG.Expired_domain(?, ?, ?)}
</select>
</sqlMap>
[/code]
java中的代码如下
[code]
Hashtable<String, Object> paramter = new Hashtable<String, Object>();
paramter.put("staffId", staffId);
paramter.put("timeUnits", timeUnits);
getSqlMapClientTemplate(). queryForObject("STATISTICS.Expired_domain", paramter);
List<Domain> domains = (List<Domain>)paramter.get("result");
[/code]
执行到queryForObject时就不能往下执行了 报错信息
[code]
SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17041]; --- The error occurred in com/aspire/dns/dao/oracle_statistics_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the STATISTICS.Expired_domain_Parameter. --- Check the statement (query failed). --- Cause: java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 3; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/aspire/dns/dao/oracle_statistics_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the STATISTICS.Expired_domain_Parameter. --- Check the statement (query failed). --- Cause: java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 3
[/code]
能保证的是,输入的2个参数都不为null,请高手帮忙分析下,很急 谢谢。
9 个解决方案
#1
存储过程:
Create or replace package statistics_pkg
is
type ResultRows is ref cursor;
procedure Expired_domain(staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows);
end statistics_pkg;
/
create or replace package body statistics_pkg is
procedure Expired_domain(
staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows
)
is
timeUnit VARCHAR2(10) := to_char(add_months(sysdate,2), 'yyyy-MM-dd');
begin
if timeUnits is not null then
timeUnit := timeUnits;
end if;
open rows for
select *
from domain d
where d.staff_id = staffId
and to_char(d.exp_date, 'yyyy-MM-dd') > to_char(sysdate - 1, 'yyyy-MM-dd')
and to_char(d.exp_date, 'yyyy-MM') < timeUnit
order by to_char(d.reg_date, 'yyyy-MM-dd') desc;
end Expired_domain;
end statistics_pkg;
ibatis的配置里面定义
<sqlMap namespace="STATISTICS" >
<parameterMap id="Expired_domain_Parameter" class="java.util.Hashtable">
<parameter property="staffId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="timeUnits" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="result" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="DOMAIN.abatorgenerated_DomainResult" />
</parameterMap>
<select id="Expired_domain" parameterMap="Expired_domain_Parameter">
{call STATISTICS_PKG.Expired_domain(?, ?, ?)}
</select>
</sqlMap>
java代码:
Hashtable<String, Object> paramter = new Hashtable<String, Object>();
paramter.put("staffId", staffId);
paramter.put("timeUnits", timeUnits);
getSqlMapClientTemplate().queryForObject("STATISTICS.Expired_domain", paramter);
List<Domain> domains = (List<Domain>)paramter.get("result");
Create or replace package statistics_pkg
is
type ResultRows is ref cursor;
procedure Expired_domain(staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows);
end statistics_pkg;
/
create or replace package body statistics_pkg is
procedure Expired_domain(
staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows
)
is
timeUnit VARCHAR2(10) := to_char(add_months(sysdate,2), 'yyyy-MM-dd');
begin
if timeUnits is not null then
timeUnit := timeUnits;
end if;
open rows for
select *
from domain d
where d.staff_id = staffId
and to_char(d.exp_date, 'yyyy-MM-dd') > to_char(sysdate - 1, 'yyyy-MM-dd')
and to_char(d.exp_date, 'yyyy-MM') < timeUnit
order by to_char(d.reg_date, 'yyyy-MM-dd') desc;
end Expired_domain;
end statistics_pkg;
ibatis的配置里面定义
<sqlMap namespace="STATISTICS" >
<parameterMap id="Expired_domain_Parameter" class="java.util.Hashtable">
<parameter property="staffId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="timeUnits" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="result" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="DOMAIN.abatorgenerated_DomainResult" />
</parameterMap>
<select id="Expired_domain" parameterMap="Expired_domain_Parameter">
{call STATISTICS_PKG.Expired_domain(?, ?, ?)}
</select>
</sqlMap>
java代码:
Hashtable<String, Object> paramter = new Hashtable<String, Object>();
paramter.put("staffId", staffId);
paramter.put("timeUnits", timeUnits);
getSqlMapClientTemplate().queryForObject("STATISTICS.Expired_domain", paramter);
List<Domain> domains = (List<Domain>)paramter.get("result");
#2
到底那句报错,错误信息是什么?
#3
不好意思 忘记了说错误信息
SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17041]; --- The error occurred in com/aspire/dns /oracle_statistics_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the STATISTICS.Expired_domain_Parameter. --- Check the statement (query failed). --- Cause: java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 3; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/aspire/dns /oracle_statistics_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the STATISTICS.Expired_domain_Parameter. --- Check the statement (query failed). --- Cause: java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 3
#4
java.sql.SQLException: 索引中丢失 IN 或 OUT 参数
是不是你的iBATIS的调用存储过程的语句写错了啊.
是不是你的iBATIS的调用存储过程的语句写错了啊.
#5
请帮忙看看是否写错了 在2楼有代码的。
#6
up一下 这里人气不旺
#7
另外 在Console里面有信息:
11:25:25,656 INFO [STDOUT] 11:25:25,656 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,687 INFO [STDOUT] 11:25:25,687 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [InstantiatingNullHandler] Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@1fee11], property=struts]
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [DefaultActionProxy] Creating an DefaultActionProxy for namespace /statistics and action name expired_domain
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [DefaultListableBeanFactory] No bean named 'com.aspire.dns.action.StatisticsAction' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@5c9ab5: defining beans [propertyConfigurer_dns,dataSource_dns,sqlMapClient_dns,txManager_dns,txAdvice_dns,org.springframework.aop.config.internalAutoProxyCreator,service_Option_dns,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor,message,page,domain,contact,message_dao_dns,domainDao,contactDao,statisticsDao,message_service_dns,domainService,contactService,statisticsService,registerService,sec_domain_dns,sec_domain_dao_dns,sec_domain_service_dns]; root of factory hierarchy
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CollectionFactory] Creating [java.util.LinkedHashMap]
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CachedIntrospectionResults] Getting BeanInfo for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,796 DEBUG [CachedIntrospectionResults] Caching PropertyDescriptors for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionErrors' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'class' of type [java.lang.Class]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'context' of type [com.opensymphony.xwork2.ActionContext]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'department' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'domains' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'endDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errorMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'fieldErrors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'ids' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'idsArray' of type [[Ljava.lang.String;]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'locale' of type [java.util.Locale]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'msg' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'request' of type [javax.servlet.http.HttpServletRequest]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'response' of type [javax.servlet.http.HttpServletResponse]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'resultList' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'session' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffId' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffName' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'startDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'statisticsService' of type [com.aspire.dns.service.StatisticsService]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'texts' of type [java.util.ResourceBundle]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'valueStack' of type [com.opensymphony.xwork2.util.ValueStack]
11:25:25,656 INFO [STDOUT] 11:25:25,656 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,687 INFO [STDOUT] 11:25:25,687 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [InstantiatingNullHandler] Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@1fee11], property=struts]
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [DefaultActionProxy] Creating an DefaultActionProxy for namespace /statistics and action name expired_domain
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [DefaultListableBeanFactory] No bean named 'com.aspire.dns.action.StatisticsAction' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@5c9ab5: defining beans [propertyConfigurer_dns,dataSource_dns,sqlMapClient_dns,txManager_dns,txAdvice_dns,org.springframework.aop.config.internalAutoProxyCreator,service_Option_dns,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor,message,page,domain,contact,message_dao_dns,domainDao,contactDao,statisticsDao,message_service_dns,domainService,contactService,statisticsService,registerService,sec_domain_dns,sec_domain_dao_dns,sec_domain_service_dns]; root of factory hierarchy
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CollectionFactory] Creating [java.util.LinkedHashMap]
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CachedIntrospectionResults] Getting BeanInfo for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,796 DEBUG [CachedIntrospectionResults] Caching PropertyDescriptors for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionErrors' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'class' of type [java.lang.Class]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'context' of type [com.opensymphony.xwork2.ActionContext]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'department' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'domains' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'endDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errorMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'fieldErrors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'ids' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'idsArray' of type [[Ljava.lang.String;]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'locale' of type [java.util.Locale]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'msg' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'request' of type [javax.servlet.http.HttpServletRequest]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'response' of type [javax.servlet.http.HttpServletResponse]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'resultList' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'session' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffId' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffName' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'startDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'statisticsService' of type [com.aspire.dns.service.StatisticsService]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'texts' of type [java.util.ResourceBundle]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'valueStack' of type [com.opensymphony.xwork2.util.ValueStack]
#8
<select 这个标签改成 <procedure
#9
8楼的兄弟 你这是火眼金睛啊 多亏了你了 给分,结帖。
#1
存储过程:
Create or replace package statistics_pkg
is
type ResultRows is ref cursor;
procedure Expired_domain(staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows);
end statistics_pkg;
/
create or replace package body statistics_pkg is
procedure Expired_domain(
staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows
)
is
timeUnit VARCHAR2(10) := to_char(add_months(sysdate,2), 'yyyy-MM-dd');
begin
if timeUnits is not null then
timeUnit := timeUnits;
end if;
open rows for
select *
from domain d
where d.staff_id = staffId
and to_char(d.exp_date, 'yyyy-MM-dd') > to_char(sysdate - 1, 'yyyy-MM-dd')
and to_char(d.exp_date, 'yyyy-MM') < timeUnit
order by to_char(d.reg_date, 'yyyy-MM-dd') desc;
end Expired_domain;
end statistics_pkg;
ibatis的配置里面定义
<sqlMap namespace="STATISTICS" >
<parameterMap id="Expired_domain_Parameter" class="java.util.Hashtable">
<parameter property="staffId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="timeUnits" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="result" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="DOMAIN.abatorgenerated_DomainResult" />
</parameterMap>
<select id="Expired_domain" parameterMap="Expired_domain_Parameter">
{call STATISTICS_PKG.Expired_domain(?, ?, ?)}
</select>
</sqlMap>
java代码:
Hashtable<String, Object> paramter = new Hashtable<String, Object>();
paramter.put("staffId", staffId);
paramter.put("timeUnits", timeUnits);
getSqlMapClientTemplate().queryForObject("STATISTICS.Expired_domain", paramter);
List<Domain> domains = (List<Domain>)paramter.get("result");
Create or replace package statistics_pkg
is
type ResultRows is ref cursor;
procedure Expired_domain(staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows);
end statistics_pkg;
/
create or replace package body statistics_pkg is
procedure Expired_domain(
staffId VARCHAR2,
timeUnits VARCHAR2,
rows out ResultRows
)
is
timeUnit VARCHAR2(10) := to_char(add_months(sysdate,2), 'yyyy-MM-dd');
begin
if timeUnits is not null then
timeUnit := timeUnits;
end if;
open rows for
select *
from domain d
where d.staff_id = staffId
and to_char(d.exp_date, 'yyyy-MM-dd') > to_char(sysdate - 1, 'yyyy-MM-dd')
and to_char(d.exp_date, 'yyyy-MM') < timeUnit
order by to_char(d.reg_date, 'yyyy-MM-dd') desc;
end Expired_domain;
end statistics_pkg;
ibatis的配置里面定义
<sqlMap namespace="STATISTICS" >
<parameterMap id="Expired_domain_Parameter" class="java.util.Hashtable">
<parameter property="staffId" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="timeUnits" jdbcType="VARCHAR" javaType="java.lang.String" mode="IN" />
<parameter property="result" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" resultMap="DOMAIN.abatorgenerated_DomainResult" />
</parameterMap>
<select id="Expired_domain" parameterMap="Expired_domain_Parameter">
{call STATISTICS_PKG.Expired_domain(?, ?, ?)}
</select>
</sqlMap>
java代码:
Hashtable<String, Object> paramter = new Hashtable<String, Object>();
paramter.put("staffId", staffId);
paramter.put("timeUnits", timeUnits);
getSqlMapClientTemplate().queryForObject("STATISTICS.Expired_domain", paramter);
List<Domain> domains = (List<Domain>)paramter.get("result");
#2
到底那句报错,错误信息是什么?
#3
不好意思 忘记了说错误信息
SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [17041]; --- The error occurred in com/aspire/dns /oracle_statistics_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the STATISTICS.Expired_domain_Parameter. --- Check the statement (query failed). --- Cause: java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 3; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/aspire/dns /oracle_statistics_SqlMap.xml. --- The error occurred while applying a parameter map. --- Check the STATISTICS.Expired_domain_Parameter. --- Check the statement (query failed). --- Cause: java.sql.SQLException: 索引中丢失 IN 或 OUT 参数:: 3
#4
java.sql.SQLException: 索引中丢失 IN 或 OUT 参数
是不是你的iBATIS的调用存储过程的语句写错了啊.
是不是你的iBATIS的调用存储过程的语句写错了啊.
#5
请帮忙看看是否写错了 在2楼有代码的。
#6
up一下 这里人气不旺
#7
另外 在Console里面有信息:
11:25:25,656 INFO [STDOUT] 11:25:25,656 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,687 INFO [STDOUT] 11:25:25,687 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [InstantiatingNullHandler] Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@1fee11], property=struts]
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [DefaultActionProxy] Creating an DefaultActionProxy for namespace /statistics and action name expired_domain
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [DefaultListableBeanFactory] No bean named 'com.aspire.dns.action.StatisticsAction' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@5c9ab5: defining beans [propertyConfigurer_dns,dataSource_dns,sqlMapClient_dns,txManager_dns,txAdvice_dns,org.springframework.aop.config.internalAutoProxyCreator,service_Option_dns,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor,message,page,domain,contact,message_dao_dns,domainDao,contactDao,statisticsDao,message_service_dns,domainService,contactService,statisticsService,registerService,sec_domain_dns,sec_domain_dao_dns,sec_domain_service_dns]; root of factory hierarchy
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CollectionFactory] Creating [java.util.LinkedHashMap]
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CachedIntrospectionResults] Getting BeanInfo for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,796 DEBUG [CachedIntrospectionResults] Caching PropertyDescriptors for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionErrors' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'class' of type [java.lang.Class]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'context' of type [com.opensymphony.xwork2.ActionContext]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'department' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'domains' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'endDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errorMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'fieldErrors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'ids' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'idsArray' of type [[Ljava.lang.String;]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'locale' of type [java.util.Locale]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'msg' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'request' of type [javax.servlet.http.HttpServletRequest]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'response' of type [javax.servlet.http.HttpServletResponse]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'resultList' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'session' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffId' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffName' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'startDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'statisticsService' of type [com.aspire.dns.service.StatisticsService]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'texts' of type [java.util.ResourceBundle]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'valueStack' of type [com.opensymphony.xwork2.util.ValueStack]
11:25:25,656 INFO [STDOUT] 11:25:25,656 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,687 INFO [STDOUT] 11:25:25,687 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [InstantiatingNullHandler] Entering nullPropertyValue [target=[com.opensymphony.xwork2.DefaultTextProvider@1fee11], property=struts]
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [ConfigurationManager] Checking ConfigurationProviders for reload.
11:25:25,750 INFO [STDOUT] 11:25:25,750 DEBUG [DefaultActionProxy] Creating an DefaultActionProxy for namespace /statistics and action name expired_domain
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [DefaultListableBeanFactory] No bean named 'com.aspire.dns.action.StatisticsAction' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@5c9ab5: defining beans [propertyConfigurer_dns,dataSource_dns,sqlMapClient_dns,txManager_dns,txAdvice_dns,org.springframework.aop.config.internalAutoProxyCreator,service_Option_dns,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor,message,page,domain,contact,message_dao_dns,domainDao,contactDao,statisticsDao,message_service_dns,domainService,contactService,statisticsService,registerService,sec_domain_dns,sec_domain_dao_dns,sec_domain_service_dns]; root of factory hierarchy
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CollectionFactory] Creating [java.util.LinkedHashMap]
11:25:25,781 INFO [STDOUT] 11:25:25,781 DEBUG [CachedIntrospectionResults] Getting BeanInfo for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,796 DEBUG [CachedIntrospectionResults] Caching PropertyDescriptors for class [com.aspire.dns.action.StatisticsAction]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionErrors' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'actionMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'class' of type [java.lang.Class]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'context' of type [com.opensymphony.xwork2.ActionContext]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'department' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'domains' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'endDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errorMessages' of type [java.util.Collection]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'errors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'fieldErrors' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'ids' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'idsArray' of type [[Ljava.lang.String;]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'locale' of type [java.util.Locale]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'msg' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'request' of type [javax.servlet.http.HttpServletRequest]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'response' of type [javax.servlet.http.HttpServletResponse]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'resultList' of type [java.util.List]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'session' of type [java.util.Map]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffId' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'staffName' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'startDate' of type [java.lang.String]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'statisticsService' of type [com.aspire.dns.service.StatisticsService]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'texts' of type [java.util.ResourceBundle]
11:25:25,812 INFO [STDOUT] 11:25:25,812 DEBUG [CachedIntrospectionResults] Found bean property 'valueStack' of type [com.opensymphony.xwork2.util.ValueStack]
#8
<select 这个标签改成 <procedure
#9
8楼的兄弟 你这是火眼金睛啊 多亏了你了 给分,结帖。