Problem: Runtime errors in a database service.
Solution: Use the following procedure to troubleshoot database service errors during runtime and shutdown.
Sometimes parameters will be inout for output only, and other times they will be in or out for inout.
For example, the following procedure definition defines "returnval", and "reason" as output parameters.ALTER PROCEDURE "DBA"."sybstore_save_salesdata" (@salesid integer, @item_num char(20), @qty integer, @price decimal(10, 2), @dateofsale date, @returnval integer output, @reason char(200) output)
ALTER PROCEDURE "DBA"."sybstore_save_salesdata" (@salesid integer, @item_num char(20), @qty integer, @price decimal(10, 2), @dateofsale date, @returnval integer output, @reason char(200) output)
as
begin
insert into salesdata(sales_id, item_num, qty, price, dateofsale)
values(@salesid, @item_num, @qty, @price, @dateofsale)
select @returnval = 1,@reason = 'Saved successfully.'
end
If a stored procedure requires parameters, and one or more are deleted, a fatal error will occur, making it difficult to debug.
If a parameter is an inout, two parameters appear in the Operation Parameters pane with the same name, one for In and another for Out. The tooling allows you to delete one or both of them.
For example, if a procedure has an output parameter named "reason", the JDBC driver may define it as inout. There will be two parameters named reason, one for input, and one for output. If you delete the wrong one, for example, the reason parameter reason for output, there will only be an input parameter named reason, causing a runtime failure. The installation directory\EAServer \logs\MyHostName.log file has an error when building the response message indicating that parameter reason cannot be found. It sometime requires reading more than one log entyry in order to determine the actual problem.
The following log entries indicate reason was being looked for in salesdataResponse. It is not found because the output parameter was deleted to show this messages.
Log Entry |
Jul 25 11:17:07 2005: 2005-07-25 11:17:07 ,12 FINER 12 [SybStoreDBService.HTTPTransport.com.sybase.soa.services.csb.wsif.sybsuper.WSIFOperationSybSuper] executeRequestResponseOperation:433 - _tXnKtv0nEdmT-YxIqQU9pA - Looking up ContentFormat key [sybstore_save_salesdata|out|sybstore_save_salesdataResponse|reason] |
Log Entry |
Jul 25 11:17:07 2005: 2005-07-25 11:17:07,12 FINER 12 [SybStoreDBService.HTTPTransport.com.sybase.soa.services.csb.wsif.sybsuper.WSIFOperationSybSuper] executeRequestResponseOperation:456 - _tXnKtv0nEdmT-YxIqQU9pA - IGNORING: contentFormat not found for part [reason], using raw data content. At: com.sybase.soa.services.csb.wsif.sybsuper.WSIFOperationSybSuper.executeRequestResponseOperation(WSIFOperationSybSuper.java:456) |
Log Entry |
Jul 25 11:17:07 2005: 2005-07-25 11:17:07,22 SEVERE 12 [SybStoreDBService.HTTPTransport.com.sybase.soa.services.csb.wsif.sybsuper.WSIFOperationSybSuper] handleWSIFException:884 - _tXnKtv0nEdmT-YxIqQU9pA - Cannot get part 'reason'. Part was not found in message. |
The following table shows the SQL Fault returned by the service tester, and the error logged in the installation directory\EAServer \logs\MyHostName.log .
Section | Description |
---|---|
SQL Fault |
<SqlFaultType> <sqlError> <reason>JZ006: Caught IOException: java.net.ConnectException: Connection refused: connect</reason> <errorCode>0</errorCode> <sqlState> </sqlState> </sqlError> </SqlFaultType> |
EAServer log or Service Container log | Jul 25 10:14:33 2005: 010052-Error: Cannot get connection for cache: SybStoreDBService_cedarSybStore, driver: com.sybase.jdbc2.jdbc.SybDriver, conn url: jdbc:sybase:Tds:cedar:2648/SybStore?ServiceName=SybStore |
Example log entries:
Log Entry |
Jul 25 11:16:08 2005: 2005-07-25 11:16:08,897 FINER 11 [SybStoreDBService.HTTPTransport.com.sybase.soa.services.wshf.endpoint.soap.handler.SOAPHandler] onMessage:97 - _tXnKs_0nEdmT-YxIqQU9pA - On message called in SOAPHandler |
Log Entry |
Jul 25 11:16:08 2005: 2005-07-25 11:16:08,897 FINER 11 [SybStoreDBService.HTTPTransport.com.sybase.soa.services.wshf.endpoint.soap.handler.SOAPHandler] logEnvelope:613 - _tXnKs_0nEdmT-YxIqQU9pA - Request SOAPEnvelope follows... |
Log Entry |
Jul 25 11:16:08 2005: 2005-07-25 11:16:08,897 FINER 11 [SybStoreDBService.HTTPTransport.com.sybase.soa.services.wshf.endpoint.soap.handler.SOAPHandler] logEnvelope:618 - _tXnKs_0nEdmT-YxIqQU9pA - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <sybstore_save_salesdata xmlns="urn:mycompany:/SybStore/SybStoreDBService"> <salesid>3 </salesid> <item_num>A6500 </item_num> <qty>1 </qty> <price>10.00 </price> <dateofsale>2005-07-25 </dateofsale> <returnval>1 </returnval> <reason>error </reason> </sybstore_save_salesdata> </soapenv:Body> </soapenv:Envelope> |
Section | Description |
---|---|
Log Entry |
Jul 25 13:17:09 2005: 2005-07-25 13:17:09,782 FINER 10 [SybStoreDBService.HTTPTransport.com.sybase.soa.services.wsif.providers.jdbc.util.AIDebugHandler] println:36 - _tXnKuP0nEdmT-YxIqQU9pA - (Thread[Thread-20,5,main]): SPRequest.Create(), method info: SPMethodInfo: Method Name: getSales Data Catalog Name: Schema Name: Stored Procedure Name: Catalog Separator: . Stored Procedure Template: select * from salesdata where sales_id=? Stored Procedure Type: java.sql.PreparedStatement Quoted String Delimiter: " Return Value Index: -1 Auto Commit: false 1 parameters: [0]SPParamInfo: Parameter Name: salesId Parameter Mapped Name: salesId Parameter Type: 4 Parameter Mode: 1 Parameter is nullable: false Parameter is fragment: false Parameter will be substitued for the following marker positions: 0 1 result sets: [0]SPResultSetInfo: Result Set Name: Sales Result Set Number: 1 Result Row Name: order 5 columns: [0]SPColumnInfo: Column Name: sales_id Column Mapped Name: sales_id Jul 25 13:17:09 2005: Column Type: 4 Column is nullable: false [1]SPColumnInfo: Column Name: item_num Column Mapped Name: item_num Column Type: 1 Column is nullable: false [2]SPColumnInfo: Column Name: qty Column Mapped Name: qty Column Type: 4 Column is nullable: false [3]SPColumnInfo: Column Name: price Column Mapped Name: price Column Type: 3 Column Scale: 2 Column is nullable: false [4]SPColumnInfo: Column Name: dateofsale Column Mapped Name: dateofsale Column Type: 93 Column is nullable: false . |
In this case, call the Sybase Support team for assistance in helping you remove any artifacts that remain.
Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com
Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.