Author |
Message
|
brgmo |
Posted: Wed Aug 14, 2002 12:28 am Post subject: mqdb2log.java program not compiling please help |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
Dear All,
i am trying to compile mqdb2log.java program given on the mqseries.net site. however the compilation gives the following error:
Code: |
mqdb2log.java:192: cannot resolve symbol
symbol : method getJDBCConnection (COM.ibm.db2.jdbc.DB2XADataSource)
location: class com.ibm.mq.MQQueueManager
jdbcConn = qMgr.getJDBCConnection(myDataSource);
^
1 error
|
i reffered the mqmanager class and it doesnt show the getJDBCConnection method. what can be the problem.ANy hellp will be appreciated.
regards
Prabhat. |
|
Back to top |
|
 |
bduncan |
Posted: Wed Aug 14, 2002 6:36 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Well it sounds like you don't have the DB2 JDBC driver installed, which is why it is complaining about COM.ibm.db2.jdbc.DB2XADataSource missing. And if you have installed the DB2 JDBC driver, perhaps the classes aren't in the classpath. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
brgmo |
Posted: Thu Aug 15, 2002 10:01 am Post subject: |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
Hi Brandon
everything is in place. i have set the classpath db2java.zip which contains the datasource class. still its not working. but i think the problem which i am encountering is that of qmanager not getting the getJDBCConnection method. please reply asap.
Prabhat |
|
Back to top |
|
 |
brgmo |
Posted: Thu Aug 15, 2002 7:54 pm Post subject: |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
is there anybody out there who can help me in solving why my mqdblog.java program is giving error that no getJDBCConnection method found in MQQueueManager class. |
|
Back to top |
|
 |
brgmo |
Posted: Thu Aug 15, 2002 9:06 pm Post subject: why my program mqdb2log.java not compiling |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
hi all
mqdb2log.java program not compiling . it says that getJDBCConnection method npt found in qmanager class. however evrythin is in line i.e. ma88 package is installed and classes are in classpath. where it is going wrong. please help.
thanks in advance
prabhat |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Aug 16, 2002 7:35 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
I'm able to get it to compile. I used a c.bat file to set my path/classpath:
Code: |
set classpath=.
set classpath=%classpath%;c:\mqseries\java\lib\com.ibm.mqbind.jar
set classpath=%classpath%;c:\MQseries\java\lib\com.ibm.mq.jar
set classpath=%classpath%;c:\mqseries\java\lib
set classpath=%classpath%;c:\mqseries\java\lib\jta.jar
set classpath=%classpath%;c:\mqseries\java\lib\connector.jar
set classpath=%classpath%;c:\WebSphere\Appserver\lib\j2ee.jar
set classpath=%classpath%;c:\sqllib\java\db2java.zip
set classpath=%classpath%;c:\sqllib\java\sqlj.zip
set PATH=c:\mqseries\java\lib;C:\IBMDebug\bin;C:\Program Files\ibm\gsk5\lib;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Utilities;C:\Program Files\IBM\Trace Facility;C:\MQSeries\bin;C:\MQSeries\tools\c\samples\bin;C:\IBM\IMNNQ;C:\WebSphere\AppServer\bin;c:\websphere\appserver\java\bin;c:\tools;
set path=c:\mqseries\Java\lib\jdbc;%path%
set path=c:\sqllib\bin;%path%
set path=c:\mqseries\java\lib\backup;%path%
|
I have the latest ma88, mq, and db2. I also have some very sketchy directions:
Code: |
crtmqm javadb2.qmgr
db2 create database javadb2
db2 connect to javadb2
db2 update dbm cfg using TP_MON_NAME mqmax
create a table that i'll use
strmqm javadb2.qmgr
add a resource section:
Name - javadb2
SwitchFile - c:\mqseries\java\lib\jdbc\jdbcdb2.dll
XAOpenString - javadb2,userid,password
XACloseString - blank
ThreadOfControl - PROCESS
endmqm javadb2.qmgr
strmqm javadb2.qmgr
ran my program and it failed with an 805
db2 bind @db2cli.lst blocking all grant public
reran my program and it worked
|
Hope this helps.[/code] |
|
Back to top |
|
 |
brgmo |
Posted: Fri Aug 16, 2002 10:00 am Post subject: getJDBCConnection not found in MQQueueManager |
|
|
Master
Joined: 03 Jun 2002 Posts: 227
|
Dear Friend
i have tried c.bat file provided by you but still the program doesnt compile and says getJDBCConnection method not found in MQQueueManager class and its true also because MQQueueManager class doesnt contain the getJDBCConnection method. Friend, please help i have been trying to compile this program for last 5 days. i dont know why this error is coming. what can be the reasn.please help as soon as possible.
Thanks in advance
Prabhat |
|
Back to top |
|
 |
bduncan |
Posted: Sun Aug 18, 2002 5:36 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Prabhat,
I have helped dozens of people in the past with issues revolving around installing MA88, and getting JMS/Java applications to compile. Based on this experience, this really appears to be a classpath issue. Also, you'll notice that almost 100 people have downloaded the program, and I've never heard about anyone not being able to compile it, so I'm fairly certain this is NOT a problem with the mqdb2log.java program. Would you please post the CLASSPATH that you are using for javac, and indicate which path each of the required libraries is in? _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
|