Menu

#74 "No value specified for parameter 1" when creating procedure

open
JDBC (13)
5
2007-05-02
2007-05-02
AmenRa
No

I am having a problem creating procedures in MySQL 5.0.37 using the Java Connector 5.0.5. I have had this problem for sometime but it's getting very annoying. I must have 30+ procedures, most build build fine however I do have eight of them that just will not build through the Druid. I can't seem to figure out the pattern to why they will not build. Here is an example:

Druid Error Message:
Raised exception during entity build
entity: RefineryLocations
exception: No value specified for parameter 1

I am trying to create this simple procedure:

--------------- Cut and Pasted -------------------

CREATE PROCEDURE RefineryLocations( IN pCharacterKey INT UNSIGNED )
MAIN: BEGIN

DECLARE mRecordNotFound BOOL DEFAULT FALSE;
DECLARE mCursorEOL BOOL DEFAULT FALSE;
DECLARE mFactionKey INT UNSIGNED DEFAULT 0;
DECLARE mSecurityClearance TINYINT UNSIGNED DEFAULT 0;
DECLARE mInventoryKey INT UNSIGNED DEFAULT 0;

-- Faction Inventory Cursor
DECLARE mFactionInventoryCursor CURSOR FOR
SELECT InventoryKey FROM FactionInv
WHERE FactionKey = mFactionKey AND SecurityClearance <= mSecurityClearance;

-- SQL Error Checking Definition
DECLARE CONTINUE HANDLER FOR NOT FOUND SET mRecordNotFound = TRUE;
DECLARE CONTINUE HANDLER FOR SQLSTATE "02000" SET mCursorEOL = TRUE;

-- ****************************************************************
-- VALIDATION

IF pCharacterKey < 1 THEN
CALL ServerLogEntry( 3, "RefineryLocations", "VALIDATION: pCharacterKey invalid." );
LEAVE MAIN;
END IF;

-- Obtain and Validate FactionKey
SET mRecordNotFound = FALSE;
SELECT FactionKey, SecurityClearance INTO mFactionKey, mSecurityClearance
FROM FactionMember WHERE CharacterKey = pCharacterKey;
IF mRecordNotFound = TRUE OR mFactionKey < 1 THEN
CALL ServerLogEntry( 3, "RefineryLocations", "VALIDATION: pCharacterKey invalid faction key or faction not found." );
LEAVE MAIN;
END IF;

-- VALIDATION
-- ****************************************************************

OPEN mFactionInventoryCursor;
SET mCursorEOL = FALSE;

FactionInventoryLoop: LOOP

SET mInventoryKey = 0;

-- Faction Inventory Item
SET mCursorEOL = FALSE;
FETCH mFactionInventoryCursor INTO mInventoryKey;
IF mCursorEOL = TRUE THEN
LEAVE FactionInventoryLoop;
END IF;

-- Does it have a Refinery Module?

END LOOP FactionInventoryLoop;

CLOSE mFactionInventoryCursor;

END MAIN;

Discussion


Log in to post a comment.