Could someone be of assistance and show me the problem with the
following code? I have researched Metalink regarding ORA-29531, and the
most common cause of this error is the failure to declare the method
"public" and "static". I have done both here and still have the same
error:
Java Code::::::::::: ::::::::::::::: ::::::::::::::: :::::
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "TimeZoneFormat ter" AS
import java.util.TimeZ one;
import java.util.Date;
import java.text.DateF ormat;
public class TimeZoneFormatt er {
public static String Convert(String clientTimezone, Date clientDate)
{
//set the format for the dates
DateFormat dateFormatter =
DateFormat.getD ateTimeInstance (DateFormat.LON G, DateFormat.LONG );
TimeZone timeZoneClient = TimeZone.getTim eZone(clientTim ezone);
// Set the time zone of the date formatter to Client time zone.
dateFormatter.s etTimeZone(time ZoneClient);
return dateFormatter.f ormat(clientDat e);
}
}
;
/
Wrapper Code::::::::::: ::::::::::::::: ::::::::::::::: ::::::;
CREATE OR REPLACE function TimeZoneFormatt er (ClientTimezone varchar2,
ClientDate varchar2)
return varchar2 as
language java
name 'TimeZoneFormat ter.Convert(jav a.lang.String, java.lang.Strin g)
return java.lang.Strin g';
/
Test::::::::::: ::::::::::::::: ::::::::::::::: ::::::::;
select TimeZoneFormatt er('Europe/Paris','Wed Mar 09 23:22:24 CST 2005')
from dual ;
*
ERROR at line 1:
ORA-29531: no method Convert in class TimeZoneFormatt er
Thank you very much in advance!
Jeff
following code? I have researched Metalink regarding ORA-29531, and the
most common cause of this error is the failure to declare the method
"public" and "static". I have done both here and still have the same
error:
Java Code::::::::::: ::::::::::::::: ::::::::::::::: :::::
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "TimeZoneFormat ter" AS
import java.util.TimeZ one;
import java.util.Date;
import java.text.DateF ormat;
public class TimeZoneFormatt er {
public static String Convert(String clientTimezone, Date clientDate)
{
//set the format for the dates
DateFormat dateFormatter =
DateFormat.getD ateTimeInstance (DateFormat.LON G, DateFormat.LONG );
TimeZone timeZoneClient = TimeZone.getTim eZone(clientTim ezone);
// Set the time zone of the date formatter to Client time zone.
dateFormatter.s etTimeZone(time ZoneClient);
return dateFormatter.f ormat(clientDat e);
}
}
;
/
Wrapper Code::::::::::: ::::::::::::::: ::::::::::::::: ::::::;
CREATE OR REPLACE function TimeZoneFormatt er (ClientTimezone varchar2,
ClientDate varchar2)
return varchar2 as
language java
name 'TimeZoneFormat ter.Convert(jav a.lang.String, java.lang.Strin g)
return java.lang.Strin g';
/
Test::::::::::: ::::::::::::::: ::::::::::::::: ::::::::;
select TimeZoneFormatt er('Europe/Paris','Wed Mar 09 23:22:24 CST 2005')
from dual ;
*
ERROR at line 1:
ORA-29531: no method Convert in class TimeZoneFormatt er
Thank you very much in advance!
Jeff
Comment