Strange errors with OracleLoader
Posted: Thu 20 Jan 2022 13:34
Hi,
The OraclelLoader class is giving me some very strange errors. The error message is completely misleading. I believe the problem is somewhere else in the driver while the error reported is wrong.
In my case i have the followng lines of code (cut down version)
//loader.SetValue("GEOIP_CITY_NAME", entry.Geoip.NullSafeGet(a => a.CityName));
loader.SetValue("GEOIP_COUNTRY_CODE2", entry.Geoip.NullSafeGet(a => a.CountryCode2));
loader.SetValue("GEOIP_COUNTRY_NAME", entry.Geoip.NullSafeGet(a => a.CountryName));
loader.SetValue("GEOIP_LATITUDE", entry.Geoip.NullSafeGet(a => a.Latitude));
loader.SetValue("GEOIP_LOCATION", null);
loader.SetValue("GEOIP_LONGITUDE", entry.Geoip.NullSafeGet(a => a.Longitude));
//loader.SetValue("GEOIP_REAL_REGION_NAME", entry.Geoip.NullSafeGet(a => a.RealRegionName));
If I add back the commented out code, it breaks. If I leave it commented it works.
Error I get
Additional information: ORA-01461: can bind a LONG value only for insert into a LONG column
The GEOIP_CITY_NAME is 64 byte varchar2 and GEOIP_REAL_REGION_NAME is 128 byte varchar2. The values I am passing is no more then 20 characters. Please help! There is a definite bug in your code
The OraclelLoader class is giving me some very strange errors. The error message is completely misleading. I believe the problem is somewhere else in the driver while the error reported is wrong.
In my case i have the followng lines of code (cut down version)
//loader.SetValue("GEOIP_CITY_NAME", entry.Geoip.NullSafeGet(a => a.CityName));
loader.SetValue("GEOIP_COUNTRY_CODE2", entry.Geoip.NullSafeGet(a => a.CountryCode2));
loader.SetValue("GEOIP_COUNTRY_NAME", entry.Geoip.NullSafeGet(a => a.CountryName));
loader.SetValue("GEOIP_LATITUDE", entry.Geoip.NullSafeGet(a => a.Latitude));
loader.SetValue("GEOIP_LOCATION", null);
loader.SetValue("GEOIP_LONGITUDE", entry.Geoip.NullSafeGet(a => a.Longitude));
//loader.SetValue("GEOIP_REAL_REGION_NAME", entry.Geoip.NullSafeGet(a => a.RealRegionName));
If I add back the commented out code, it breaks. If I leave it commented it works.
Error I get
Additional information: ORA-01461: can bind a LONG value only for insert into a LONG column
The GEOIP_CITY_NAME is 64 byte varchar2 and GEOIP_REAL_REGION_NAME is 128 byte varchar2. The values I am passing is no more then 20 characters. Please help! There is a definite bug in your code