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 » Exception executing SQL Query in Java Compute Node

Post new topic  Reply to topic
 Exception executing SQL Query in Java Compute Node « View previous topic :: View next topic » 
Author Message
vmurali_au
PostPosted: Wed Sep 06, 2006 3:34 am    Post subject: Exception executing SQL Query in Java Compute Node Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

I'm trying the following query

Quote:
String strSymbolic = "ABCD";

selectQueryStr = "SET Environment.Variables.RESULTS[] = SELECT T2.STATE_INDEX_NM FROM Database.MBADMIN.SYMBOLIC_MST AS T1, Database.MBADMIN.STATE_INDEX_MST AS T2, Database.MBADMIN.SYMBOLIC_STATE_INDEX_ASSOC AS T3 WHERE T3.SYMBOLIC_ID = T1.SYMBOLIC_ID AND T3.STATE_INDEX_ID = T2.STATE_INDEX_ID AND T1.SYMBOLIC_NM = '"+ strSymbolic +"';";

state = createSQLStatement("WMBDB",selectQueryStr,MbSQLStatement.SQL_TRANSACTION_AUTO);

state.setThrowExceptionOnDatabaseError(true);
state.setTreatWarningsAsErrors(true);

state.select(contact admin,outAssembly);


I'm getting the following exception after the select() statement

(com.ibm.broker.plugin.MbFatalException) <com.ibm.broker.plugin.MbFatalException class:JNI method:SqlStatementGroup::execute source:BIPv600 key:2488 >

After this exception my debugger just terminates.

I can very well execute this query in oracle command prompt (after removing "Database" and "AS" strings from the above query line)

I donno how to pinpoint the error.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 06, 2006 4:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What happens when you run it from ESQL, instead of Java?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vmurali_au
PostPosted: Wed Sep 06, 2006 5:09 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

Jeff,

I tried the following in ESQL compute node

Quote:
DECLARE strSymbolic CHAR 'ABCD';

SET Environment.Variables.RESULTS[] = SELECT T2.STATE_INDEX_NM FROM Database.MBADMIN.SYMBOLIC_MST AS T1, Database.MBADMIN.STATE_INDEX_MST AS T2, Database.MBADMIN.SYMBOLIC_STATE_INDEX_ASSOC AS T3 WHERE T3.SYMBOLIC_ID = T1.SYMBOLIC_ID AND T2.STATE_INDEX_ID = T3.STATE_INDEX_ID AND T1.SYMBOLIC_NM = strSymbolic;


I got the result in Environment. No Exceptions.

I donno why i'm getting error in the Java Compute Node though as both have the same statements.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 06, 2006 5:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Did you also set the properties of the Compute Node to Throw Exceptions on Database Error and Treat Warnings as Errors?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vmurali_au
PostPosted: Wed Sep 06, 2006 5:21 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

No. I've enabled "Throw Exception on Database Errors" in the Compute Node.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 06, 2006 5:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Well, your Java code is setting Treat Warnings as Errors.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
dirac
PostPosted: Wed Sep 06, 2006 5:46 am    Post subject: Reply with quote

Novice

Joined: 31 Mar 2005
Posts: 23

The 2488 in your error message refers to BIP2488
---------
BIP2488E: (insert1, insert2) Error detected whilst executing the SQL statement 'insert3'.
The message broker detected an error whilst executing the given statement. An exception has been thr
own to cut short the SQL program.
See the following messages for details of the error.
-----------
Which suggests that you are causing an SQL exception rather than a database problem...
Back to top
View user's profile Send private message
vmurali_au
PostPosted: Wed Sep 06, 2006 5:50 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

But i donno how an SQL Exception is being caused as i'm not getting the Exception while executing SQL in ESQL Compute Node.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Sep 06, 2006 5:57 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You're probably getting an SQL Warning, that you have coded to instruct Broker to treat as an Error.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vmurali_au
PostPosted: Wed Sep 06, 2006 7:35 am    Post subject: Reply with quote

Voyager

Joined: 26 Mar 2004
Posts: 76

Jeff,

Even with "TreatWarningsAsErrors" turned to false in the Java Compute Node i'm getting the same Exception.
Back to top
View user's profile Send private message
msukup
PostPosted: Wed Sep 06, 2006 10:20 am    Post subject: Reply with quote

Acolyte

Joined: 11 Feb 2002
Posts: 56

vmurali,

please post the stack trace (in execution group's stderr file) as well as any entries written to syslog or event viewer.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Exception executing SQL Query in Java Compute Node
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.