我有一个应用程序,其程序如下:
procedure get_full_data (list OUT sys_refcursor,id in number,
code in varchar2,type in varchar2) is
year_in number;
begin
year_in := to_number(to_char(to_date(sysdate,'DD-MON-RRRR'),'RRRR')); // line 628
open list for
select * from my_tab
where code_present = code AND to_number(substr(year,1,4)) in (year_in,year_in-1,year_in-2)
and minth in(select max(month) from my_tab where code_present = code
and to_number(substr(year,1,4)) in (year_in,year_in-1,year_in-2)
group by substr(year,1,9))
order by to_number(substr(year,1,4)) desc;
END get_full_data;
这是调用此过程的Java代码(我hibernate
在这里使用):
List<MyBean> salesApproval=session.getNamedQuery("get_data").setInteger("id",my_id).setString("code",my_code).setString("type",my_type).list();
MyBean
是类保存过程返回的数据。
问题:
当我在系统上托管我的应用程序时,windows
它可以正常工作并获得所需的结果。
但是,当我在 上托管我的应用程序时Linux Ubuntu 12.04
,会出现以下错误:
java.sql.SQLException: ORA-01843: not a valid month
ORA-06512: at "db.proc_pack", line 628
程序中提到了第 628 行。