Consultor Eletrônico



Kbase P114556: SQL: Server crashes invoking an SQL-92 stored procedure
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/8/2008
Status: Verified

SYMPTOM(s):

SQL: Server crashes invoking an SQL-92 stored procedure

Server crashes running an SQL-92 stored procedure that creates a user.

SQL Explorer Tool Error message under OpenEdge 10.0B04:
=== Statement 1. ===
CALL createUser('alpha', 'beta');
=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-30034
[JDBC OpenEdge Driver]:Unable to connect to Server
Errors 1.

SQL Explorer Tool Error message under 9.1D09 and 9.1E02:
=== Statement 1. ===
CALL createUser('alpha', 'beta');
=== SQL Exception 1 ===
SQLState=HY000
ErrorCode=-20217
[JDBC Progress Driver]:-20217
Errors 1.

Executing the following SQL-92 script using the Progress SQL Explorer Tool:
DROP PROCEDURE createUser;
CREATE PROCEDURE createUser(
IN ipcUserID VARCHAR(30) NOT NULL,
IN ipcPassword VARCHAR(30) NOT NULL
)
BEGIN
SQLIStatement stmtCreateUser = new SQLIStatement("create user ?,?");
stmtCreateUser.setParam(1, ipcUserID);
stmtCreateUser.setParam(2, ipcPassword);
stmtCreateUser.execute();
END;
COMMIT WORK;

SQL Explorer Tool crash detail message under 9.1D09 and 9.1E02:
java.lang.UnsatisfiedLinkError: java/security/AccessController.doPrivileged Possible causes: If you are trying to use J/Direct (@dll.import), check your compiler version (for JVC, requires 4336 or greater.) If you are trying to use RNI, there are new requirements: see documentation.
at java/security/AccessController.doPrivileged
at java/rmi/server/RemoteServer.<clinit>
at com/progress/vj/explorer/ProgressExplorer.getClientEventBroker
at com/progress/vj/util/ProDialog.<clinit>
at com/progress/vj/util/ProDialog.getActiveProDlg
at com/progress/vj/util/ProMsgBox.show
at com/progress/vj/util/ProMsgBox.error
at com/progress/vj/util/ProMsgBox.error
at com/progress/vj/sql/explorer/SQLExplorerGUI.doRunAction
at com/progress/vj/sql/explorer/SQLExplorerGUI.executeButton_click
at com/progress/vj/sql/explorer/SQLExplorerGUI.toolBar_buttonClick
at com/ms/wfc/ui/ToolBarButtonClickEventHandler.invoke
at com/ms/wfc/ui/ToolBar.onButtonClick
at com/ms/wfc/ui/ToolBar.wmReflectCommand
at com/ms/wfc/ui/ToolBar.wndProc
at com/ms/wfc/ui/Control$ControlWindow.wndProc
at com/ms/wfc/app/Window.callback
at com/ms/wfc/win32/Windows.SendMessage
at com/ms/wfc/ui/Control.sendMessage
at com/ms/wfc/ui/Control.reflectMessage
at com/ms/wfc/ui/Control.wmCommand
at com/ms/wfc/ui/Control.wndProc
at com/ms/wfc/ui/Form.wndProc
at com/ms/wfc/app/Application$ParkingForm.wndProc
at com/ms/wfc/ui/Control$ControlWindow.wndProc
at com/ms/wfc/app/Window.callback
at com/ms/wfc/win32/Windows.CallWindowProc
at com/ms/wfc/app/Window.defWndProc
at com/ms/wfc/ui/Control$ControlWindow.defWndProc
at com/ms/wfc/ui/Control.defWndProc
at com/ms/wfc/ui/Control.wmMouseUp
at com/ms/wfc/ui/Control.wndProc
at com/ms/wfc/ui/ToolBar.wndProc
at com/ms/wfc/ui/Control$ControlWindow.wndProc
at com/ms/wfc/app/Window.callback
at com/ms/wfc/win32/Windows.DispatchMessage
at com/ms/wfc/app/Application$ThreadContext.runMessageLoop
at com/ms/wfc/app/Application.run
at com/progress/vj/sql/explorer/SQLExplorerGUI.main

SQL Explorer Tool crash detail message under OpenEdge 10.0B04:
Java.lang.NoClassDefFoundError.
java.lang.NoClassDefFoundError
at sun/rmi/server/RemoteProxy.getSkeleton
at sun/rmi/server/UnicastServerRef.setSkeleton
at sun/rmi/server/UnicastServerRef.exportObject
at java/rmi/server/UnicastRemoteObject.exportObject
at java/rmi/server/UnicastRemoteObject.<init>
at com/progress/common
etworkevents/EventBroker.<init>
at com/progress/vj/explorer/ProgressExplorer.getClientEventBroker
at com/progress/vj/util/ProDialog.<clinit>
at com/progress/vj/util/ProDialog.getActiveProDlg
at com/progress/vj/util/ProMsgBox.show
at com/progress/vj/util/ProMsgBox.error
at com/progress/vj/util/ProMsgBox.error
at com/progress/vj/sql/explorer/SQLExplorerGUI.doRunAction
at com/progress/vj/sql/explorer/SQLExplorerGUI.executeButton_click
at com/progress/vj/sql/explorer/SQLExplorerGUI.toolBar_buttonClick
at com/ms/wfc/ui/ToolBarButtonClickEventHandler.invoke
at com/ms/wfc/ui/ToolBar.onButtonClick
at com/ms/wfc/ui/ToolBar.wmReflectCommand
at com/ms/wfc/ui/ToolBar.wndProc
at com/ms/wfc/ui/Control$ControlWindow.wndProc
at com/ms/wfc/app/Window.callback
at com/ms/wfc/win32/Windows.SendMessage
at com/ms/wfc/ui/Control.sendMessage
at com/ms/wfc/ui/Control.reflectMessage
at com/ms/wfc/ui/Control.wmCommand
at com/ms/wfc/ui/Control.wndProc
at com/ms/wfc/ui/Form.wndProc
at com/ms/wfc/app/Application$ParkingForm.wndProc
at com/ms/wfc/ui/Control$ControlWindow.wndProc
at com/ms/wfc/app/Window.callback
at com/ms/wfc/win32/Windows.CallWindowProc
at com/ms/wfc/app/Window.defWndProc
at com/ms/wfc/ui/Control$ControlWindow.defWndProc
at com/ms/wfc/ui/Control.defWndProc
at com/ms/wfc/ui/Control.wmMouseUp
at com/ms/wfc/ui/Control.wndProc
at com/ms/wfc/ui/ToolBar.wndProc
at com/ms/wfc/ui/Control$ControlWindow.wndProc
at com/ms/wfc/app/Window.callback
at com/ms/wfc/win32/Windows.DispatchMessage
at com/ms/wfc/app/Application$ThreadContext.runMessageLoop
at com/ms/wfc/app/Application.run
at com/progress/vj/sql/explorer/SQLExplorerGUI.main

FACT(s) (Environment):

All Supported Operating Systems
Progress 9.1D
Progress 9.1E
Progress 9.1E04 Service Pack
OpenEdge 10.0B
OpenEdge 10.0B04 Service Pack

CAUSE:

Bug# OE00127523

FIX:

Upgrade to OpenEdge 10.1B or later. If upgrading to 10.1B or later is not feasible, then a workaround is not to use parameters as per the above syntax. That is modify the code, specifically the SQLIStatement statement, as follows:
DROP PROCEDURE createUser;
CREATE PROCEDURE createUser(
IN ipcUserID VARCHAR(30) NOT NULL,
IN ipcPassword VARCHAR(30) NOT NULL
)
BEGIN
SQLIStatement stmtCreateUser = new SQLIStatement("create user '" + ipcUserID + "', '" + ipcPassword + "'");
stmtCreateUser.execute();
END;
COMMIT WORK;