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 » ESQL reference and BIP2558E (V9)

Post new topic  Reply to topic Goto page 1, 2  Next
 ESQL reference and BIP2558E (V9) « View previous topic :: View next topic » 
Author Message
Dave Ziegler
PostPosted: Fri Oct 03, 2014 12:58 pm    Post subject: ESQL reference and BIP2558E (V9) Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

This ESQL is defined in a project, and the ESQL file resides in a folder called \Shared.

Code:

BROKER SCHEMA Shared

CREATE COMPUTE MODULE DoSomething
   CREATE FUNCTION Main() RETURNS BOOLEAN
   BEGIN      
      -- blah
      SET OutputRoot = InputRoot;      
      CALL DoAnotherThing(OutputRoot);
      -- blah
      RETURN TRUE;
   END;
END MODULE;


That project references a Library containing a single ESQL file where this procedure is defined:

Code:

CREATE PROCEDURE DoAnotherThing(IN outRoot REFERENCE)
BEGIN
   -- Blah...
END;


A clean/build does not yield any problems. When I attempt to deploy to my local integration node, I get:

Code:

BIP2087E: Broker 'DEV' was unable to process the internal configuration message.
The entire internal configuration message failed to be processed successfully.
Use the messages following this message to determine the reasons for the failure. If the problem cannot be resolved after reviewing these messages, contact your IBM Support center. Enabling service trace may help determine the cause of the failure.
BIP4041E: Execution group 'default' received an administration request that encountered an exception.
While attempting to process an administration request, an exception was encountered. No updates have been made to the configuration of the execution group.
Review related error messages to determine why the administration request failed.
BIP2558E: (Shared.DoSomething.Main, 4.8) : Undefined function '.DoAnotherThing'.
The program is attempting to call a function which is not defined or is not in the schema path.
Correct the syntax of your ESQL expression in node 'Shared.DoSomething.Main', around line and column '4.8', then redeploy the message flow.
BIP2871I: The request made by user 'dziegler' to 'deploy' the resource 'C:/Workspace/IBM/Test/GeneratedBarFiles/Testproject.generated.bar' of type 'BAR' on parent 'default' of type 'ExecutionGroup' has the status of 'FAILED'.


If I r-click 'Move' the ESQL file from \Shared to the default schema, this deploys as expected. I think the phrase "or is not in the schema path" seems relevant, but I also attempted adding PATH Common; after the BROKER SCHEMA line and that didn't seem to make a difference (the referenced library is called Common).

What black magic am I overlooking?


Last edited by Dave Ziegler on Tue Oct 07, 2014 1:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
mgk
PostPosted: Fri Oct 03, 2014 2:50 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1638

Hi,

I think the problem is that the schema that contains the function you are trying to call is not called "Common" and so the name of the schema that the function is in is the key item here. If the function is in a schema called "Shared2" them you can either qualify the call it using:

Code:
CALL Shared2.DoAnotherThing(OutputRoot);


Or you can add Shared2 to the PATH for "Shared". If it's in the "default" (no-name) schema then try giving it a name to allow it to be qualified.

Kind regards,
_________________
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
Dave Ziegler
PostPosted: Fri Oct 03, 2014 3:13 pm    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

Yeah I tried doing CALL Common.DoSomethingElse but that didn't work.

What I find confusing is that intellisense can find the procedure, and there are no build errors or warnings, but the exception comes up when deploying.

And everything works just fine if I move the calling esql to the default broker schema.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sun Oct 05, 2014 7:31 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

Don't know if it is relevant but you showed

Code:
schema shared

CREATE MODULE...


This is typical from having the flow in the shared schema. Not just some procedures you are calling.
It would then generate it's modules in the same schema...

Have fun [/code]
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Dave Ziegler
PostPosted: Tue Oct 07, 2014 8:03 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

fjb_saper wrote:

This is typical from having the flow in the shared schema. Not just some procedures you are calling.
It would then generate it's modules in the same schema...


I don't have any flows in *edit* the default schema *edit*, but I do have an ESQL in Shared. I didn't post that originally, my bad.

I don't understand why the Toolkit doesn't report anything wrong, and intellisense "knows" about the function I'm calling, but the problem manifests at deployment. Is something wrong or not?


Last edited by Dave Ziegler on Tue Oct 07, 2014 8:35 am; edited 1 time in total
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 07, 2014 8:14 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

well if you don't have anything directly tied to a flow, I am wondering what the CREATE compute MODULE does there....
I would have expected to only find CREATE PROCEDURE and or CREATE FUNCTION...
And remember not to use InputRoot or OutputRoot in the code. Those would have to be passed in by reference from the calling flow....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Dave Ziegler
PostPosted: Tue Oct 07, 2014 8:25 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

I didn't say that. I have a flow containing a compute node using that esql. I don't have any flows deployed to the default schema, which is what I thought you meant by "the shared schema".
Back to top
View user's profile Send private message
Dave Ziegler
PostPosted: Tue Oct 07, 2014 8:47 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

fjb_saper wrote:
And remember not to use InputRoot or OutputRoot in the code. Those would have to be passed in by reference from the calling flow....


Like this?

Code:
CREATE PROCEDURE DoAnotherThing(IN outRoot REFERENCE)
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Oct 07, 2014 8:47 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

O.K. better understanding...
For clarification:
When you said

Code:
schema Shared
what did you mean? This is the "shared" schema I was mentioning.

As well please refactor any common / shared procedures and functions into a schema that has no Modules in it. Makes for a cleaner deploy and no modules hanging around when not used...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Dave Ziegler
PostPosted: Tue Oct 07, 2014 9:15 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

We are talking about the same Shared schema, I thought you meant (default) as in: no schema specified.

The project has a flow in \Shared with a compute node, referencing an ESQL in \Shared that has a compute module. That module refers to an imported library reference containing ESQL functions.

Nothing to refactor, already doing what you state...
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 07, 2014 9:29 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Is the library included in the application that is trying to call it?

Is the ESQL file that contains the function that is being called in a Schema or not?

You say you tried to reference the function including the schema but "it didn't work". How did it not work? same error? different error?
Back to top
View user's profile Send private message
Dave Ziegler
PostPosted: Tue Oct 07, 2014 10:00 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

mqjeff wrote:
Is the library included in the application that is trying to call it?


It is referenced.

mqjeff wrote:

Is the ESQL file that contains the function that is being called in a Schema or not?


I think this touches on what MGK was hinting at. It is in a file called Common.esql, in a folder called Common. I tried calling Common.DoSomethingElse, but that gets me to...

mqjeff wrote:

You say you tried to reference the function including the schema but "it didn't work". How did it not work? same error? different error?


Intellisense "sees" the function with no qualification. If I qualify the function with a schema . function, then I get: Incorrect function or procedure name "DoSomethingElse" or argument count.

So, "it didn't work" is fairly accurate.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 07, 2014 10:05 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Does the esql file named common in the folder called common include a SCHEMA statement at the top that says that all of the stuff included is in the schema named Common?

The file name is completely irrelevant. The folder name is only relevant if there's actually a declared Schema.

Also, on a side note, I've forgotten what the rules for passing references are, in regards to IN/INOUT/OUT. Also, I don't think it's strictly required these days to pass OutputRoot into a procedure/function as the name is supposed to be in scope everywhere.
Back to top
View user's profile Send private message
Dave Ziegler
PostPosted: Tue Oct 07, 2014 10:19 am    Post subject: Reply with quote

Centurion

Joined: 15 Apr 2014
Posts: 118

No, it does not include a SCHEMA statement. This is working as-is for another developer so I am hesitant to add one. Also, refer to my previous post... moving the referencING schema to (default) works. Leaving it where it is, then I only see a problem when deploying.

So confused...
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 07, 2014 10:27 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

In the absence of a BROKER SCHEMA statement, all functions, procedures, modules, and constants belong to the default schema.

So the procedure is officially in the default schema, even though it's in a folder labelled Common. Does the folder appear as a 'Broker Schema' in the Toolkit, or as a normal folder?

Are you positive the ESQL file is getting compiled and included in the BAR file and deployed? I'd think it would fail if the file was in the wrong place relevant to the schema.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL reference and BIP2558E (V9)
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.