The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

SD45 JDBC error 1722 .... what is this?

Highlighted
Vasily Aksenov
Esteemed Contributor

SD45 JDBC error 1722 .... what is this?

Hello ALL
i try to edit workorder in SD45, and get massage JDBC error 1722 invalid number SQL state 42000 for query insert INTO itsm_historylines_workorder ....
What does it mean?
I Never have seen this message in SD4.0
One more bug of SD4.5?

Vasily
2 REPLIES
Vasily Aksenov
Esteemed Contributor

Re: SD45 JDBC error 1722 .... what is this?

Yes, i found answer by myself.


JDBC error 1722: ORA-01722: invalid number when saving item

The problem is that if your application server is running on a system that has a
locale other than US_en then you can get an error when logging any object
containing a number with decimals used for databasestorage. Some example fields
are the duration fields and spent time field(s) (these are stored as numbers for
example a duration of 12 hours is stored as 0.5 (days)). The error you get is
JDBC error 1722: ORA-01722: invalid number. This appears to apply only to the
JDBC driver for oracle.

example from log file when using French(French) locale:
mer., 24/07/2002 15:23:30 JDBC error 1722: ORA-01722: invalid
number
, SQL state: 42000 for query: INSERT INTO itsm_servicecalls
( ser_sel_oid
,ser_sta_oid
,ser_maximumduration
,ser_apt_status
,ser_attachment_exists
,ser_srv_oid
,ser_pri_oid
,slc_ser_per_oid
,ser_cla_oid
,ser_cat_oid
,ser_tem_oid
,ser_frequentlyaskedquestion
,ser_oid
,reg_created_by_oid
,reg_created
,ser_deadline
,ser_poo_oid
,ser_description
,ser_id
,ser_ass_wog_from_oid
,ser_assignstatus
,ser_ass_per_from_oid
,ser_ass_per_to_oid
,ser_ass_wog_oid
,ser_cit_oid
,ser_waitforwo
,ser_lockseq
) VALUES ( ?
,?
,?
,?
,0
,NULL
,?
,?
,?
,?
,?
,0
,?
,?
,TO_DATE(?,'YYYY/MM/DD HH24:MI:SS')
,TO_DATE(?,'YYYY/MM/DD HH24:MI:SS')
,?
,?
,?
,?
,?
,?
,?
,?
,?
,0
,?)
Values:
281478684934155
281478223758247
3.333333 <---- In this case this one causes the error in this example and is
related in fact the ser_maximumduration
281478256721931
3094610074
281478223500310
281482208346426
281478223757319
281478224740353
281484031820224
1
2002/7/24 13:23:16
2002/7/30 13:23:16
281478223298567
< Functional area (or abbreviation of): Event >
46832
281478223501213
3095986178
281478223500310
281478223500375
281478223501041
281480403747012
1




fix

The JDBC driver for ORACLE gets it's regional settings from the OS while the
driver for SQL Server always used the decimal seperator ".".
I changed the code that builds an SQL string to first check the database used
and then check the decimalSeperator. Based on this the correct
string is build for decimal seperator.

Solved in Service Desk 4.5 SP3




workaround

Copy from the tools\4875 directory on your SD 4.5 CD the files installserver.bat
and sd_server.bat to your server\bin directory. Then re-install the Service Desk
server service by running uninstallservice.bat and installservice.bat.


JoeGozman
Acclaimed Contributor

Re: SD45 JDBC error 1722 .... what is this?

Thank you, dude. It might not fix my problem but we are getting the same thing when reading no records from an Oracle DB. There is no records to be selected but sporadically error like this is taken place. We use hibernate, WebSphere and Oracle 10g to make sure that all things are clear.

[ WebContainer : 485] WARN [2011-05-16 17:45:47] org.hibernate.util.JDBCExceptionReporter SQL Error: 1722, SQLState: 42000
[ WebContainer : 485] ERROR [2011-05-16 17:45:47] org.hibernate.util.JDBCExceptionReporter ORA-01722: invalid number
//Add this to "OnDomLoad" event