ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Root SQL Exception

Post new topic  Reply to topic
 Root SQL Exception « View previous topic :: View next topic » 
Author Message
brokerDev
PostPosted: Tue Jan 30, 2007 5:25 am    Post subject: Root SQL Exception Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Hi,

I am trying to call an oracle stored procedure with no success. I am using debug and as soon as I enter the node. I get a DatabaseException "Root SQL exception"

The ESQL is -

SET GeometryData = .................;
MOVE inRef FIRSTCHILD NAMESPACE * NAME 'SecurityStructure';

CALL myRegisterAccess (
inRef.{securityNS}:GASPIN,
inRef.{securityNS}:SPNUMBER,
'XXX',
1234,
CURRENT_DATE,
GeometryData,
transactionID);


CREATE PROCEDURE myRegisterAccess (
IN my_gaspin CHAR,
IN my_spNumber CHAR,
IN my_targetFormat CHAR,
IN my_blueskyLayerId INT,
IN my_dateOfInterest DATE,
IN my_geometryData CHAR,
OUT my_transactionId INT)
EXTERNAL NAME "registerAccess";

The Oracle stored proc has been defined as -

CREATE OR REPLACE PROCEDURE registerAccess
( p_gaspin IN SC_USER.GASPIN%TYPE DEFAULT NULL
,p_spNumber IN SC_USER.SP_ID%TYPE DEFAULT NULL
,p_targetFormat IN WF_LOG_MSG_FME.TARGET_FORMAT%TYPE
,p_blueskyLayerId IN MG_LAYERS.BLUESKY_LAYER_ID%TYPE
,p_dateOfInterest IN DATE DEFAULT NULL
,p_geometryData IN CLOB DEFAULT NULL
,p_transactionId OUT WF_LOG_MSG_FME.ID_WF_LOG_MSG%TYPE )

IS
BEGIN
p_transactionId := 66;
END registerAccess;
/


I can access the database ok and I am therefore satisfied that odbc connections etc are fine. Here is the bit of ESQL I used to test DB connectivity -

DECLARE jaRef reference to OutputLocalEnvironment;
SET jaRef.mine[] = (Select XXX.MESSAGE
From Database.WF_LOG_MSG as XXX
Where XXX.ID = 66
);

Does anyone have any suggestions as to why I am getting the database exception? I think the problem is with the stored proc...not sure how I check that though...

Thanks
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 30, 2007 6:02 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What version of WMB?

What version of Oracle?

What platform?

What ODBC driver is the DSN using?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brokerDev
PostPosted: Tue Jan 30, 2007 6:20 am    Post subject: Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

WMB Version 5.02

Oracle version:
- Broker sits on a 9i DB
- Stored proc sits on a 10g DB

Platform is AIX 5.3

ODBC Driver:
Driver=/usr/opt/wmqi/merant/lib/UKor818.so
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 30, 2007 6:37 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I don't remember if WBIMB v5 can call Oracle stored procedures or not.

A quick search here should show you some relevant stuff.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
brokerDev
PostPosted: Tue Jan 30, 2007 8:35 am    Post subject: Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Hi jefflowrey,

WBIMB v5 can call Oracle stored procs....I'll continue looking through the topics for clues.

Thanks
Back to top
View user's profile Send private message
mgk
PostPosted: Tue Jan 30, 2007 9:26 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Can you post the whole of the exception you receive please.
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
brokerDev
PostPosted: Tue Jan 30, 2007 10:54 am    Post subject: Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

I have made some progress with this. It seems there is some kind of incompatibity between the broker datatype and the CLOB parameter in the oracle stored proc. From what I have read though, there should be no such incompatibility.

We have removed this parameter from the oracle stored proc and broker can now call the stored proc.

Perhaps the way I have declared my variable that I am passing into the stored proc is incorrect? Here is how I have set up my parameter that I am passing to the CLOB parameter in the stored proc -

SET GeometryData = CAST(ASBITSTREAM(inRef2.{xxxNS}:GeometryData OPTIONS FolderBitStream) AS CHAR CCSID InputRoot.MQMD.CodedCharSetId);
Back to top
View user's profile Send private message
brokerDev
PostPosted: Thu Feb 01, 2007 8:15 am    Post subject: Reply with quote

Acolyte

Joined: 21 Jun 2006
Posts: 53

Problem resolved.

The 'GeometryData ' data I was passing in had sub-fields which contained a namespace I had not declared in my code. Consequently, the message
that I was passing was could not be consumed by the stored proc. I declared the namespaces and no longer got the error!

Here is a snippet of the xml that I was passing. As you can see NS2,3,4 are all the same but they were being treated as different.

GeometrySelectorData <NS1:GeometrySelector xmlns:NS1="http:/xxx.acme.com">
<NS1:PointSelector>
<NS1:Coordinates>
<NS2:coord xmlns:NS2="http://yyy.acme.com">
<NS2:X>3.1415926535897932384626433832795</NS2:X>
<NS2:Y>3.1415926535897932384626433832795</NS2:Y>
<NS2:Z>3.1415926535897932384626433832795</NS2:Z>
</NS2:coord>
<NS3:gid xmlns:NS3="http://yyy.acme.com">String</NS3:gid>
<NS4:SRSName xmlns:NS4=http://yyy.acme.com">String</NS4:SRSName>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Root SQL Exception
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.