|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
BIP2432E The correlation name 'testval' is not valid |
« View previous topic :: View next topic » |
Author |
Message
|
seanrocket |
Posted: Wed May 14, 2003 12:24 pm Post subject: BIP2432E The correlation name 'testval' is not valid |
|
|
Newbie
Joined: 08 May 2003 Posts: 8
|
Hi,
I am trying to write a simple insert query statement to SQL server using a Java plugin node. I understand that MQSI does not support JDBC in the java plugin . So i am using the MbNode's createSQLstatement and execute methods. I have created the ODBC data source correctly and tested it using the system DSN tab under Start->programs-admin tools->ODBC data sources.
My message flow has an input node and a java plugin node. I put a test message into the input queue corresponding to the input node and the message is
<element>349824823</element>.
==============================================
I get an exception at the createSQLstatement in the plugin node . The error I get when I try to debug my message flow is :
[WMQIv210:2432]BIP2432E: (, ) : The correlation name 'testval' is not valid. Those in scope are: Environment, InputLocalEnvironment, OutputLocalEnvironment, InputRoot, InputBody, InputProperties, OutputRoot, InputExceptionList, OutputExceptionList, InputDestinationList, OutputDestinationList.
The first element of a field reference must be a valid correlation name, from those in scope. This message may sometimes be due to an incorrectly formed or spelled expression which is not intended to be a field reference being parsed as if it were a field reference because the parser does not recognize it.
Correct the syntax of the expression and redeploy the message flow. : First path element must be a valid correlation name
============================================
A snippet of the java plugin node is :
public String query(String acctnum,MbMessageAssembly in,MbMessageAssembly out)
{
MbSQLStatement stmt = null;
String dataSourceName = "test"
String testval = "343402343423";
String queryStr = "PASSTHRU('insert into lookup (acctnumber) values(?)',testval)";
try {
stmt = createSQLStatement(dataSourceName,queryStr,MbSQLStatement.SQL_TRANSACTION_COMMIT );
}catch(MbException me){
pw.println("LookupNode:: query mb exception in create sql statement" + me.getMessage() );
}catch (Exception e){
pw.println("LookupNode:: query exception ");
}
try{
stmt.execute(in);
pw.println("LookupNode:: query the result is "+ out.toString());
}catch(MbException me){
pw.println("LookupNode:: query mb exception in select statement" + me.getMessage() );
}catch (Exception e){
pw.println("LookupNode:: query exception in select statement " +e.getMessage());
e.printStackTrace(pw);
} // Execute the query
return "";
}//end query
-----------------------------------------------------------------------
I then tried a qualified name such as
String queryStr = "PASSTHRU('insert into lookup (acctnumber) values(?)',InputRoot.XML.element)";
try {
stmt = createSQLStatement(dataSourceName,queryStr,MbSQLStatement.SQL_TRANSACTION_COMMIT );
}catch(MbException me){
pw.println("LookupNode:: query mb exception in create sql statement" + me.getMessage() );
}catch (Exception e){
pw.println("LookupNode:: query exception ");
}
but I get an error :
BIP2519E: (, ) : Error executing SQL statement 'insert into lookup (acctnumber) values(?)' against datasource 'test' with parameters 'NULL, '.
The following error occurred during execution of a database SQL statement against datasource 'test'
1. Do you know what the problem could be?
2. Are there any sample queries for java plugin nodes that use ODBC?
3. Are there any docs that give instructions on how to connect to the database and issue queries in a Java plugin node. I have checked the Business Integration Solution with MQ series Integrator, the Developing Solutions in Websphere MQ integrator, and the Websphere MQ integrator programming guide.
-Sean |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|