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 » IBM MQ Java / JMS » mqdb2log.java program not compiling please help

Post new topic  Reply to topic
 mqdb2log.java program not compiling please help « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Wed Aug 14, 2002 12:28 am    Post subject: mqdb2log.java program not compiling please help Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Wed Aug 14, 2002 6:36 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
brgmo
PostPosted: Thu Aug 15, 2002 10:01 am    Post subject: Reply with quote

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
View user's profile Send private message
brgmo
PostPosted: Thu Aug 15, 2002 7:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
brgmo
PostPosted: Thu Aug 15, 2002 9:06 pm    Post subject: why my program mqdb2log.java not compiling Reply with quote

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
View user's profile Send private message
bower5932
PostPosted: Fri Aug 16, 2002 7:35 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
brgmo
PostPosted: Fri Aug 16, 2002 10:00 am    Post subject: getJDBCConnection not found in MQQueueManager Reply with quote

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
View user's profile Send private message
bduncan
PostPosted: Sun Aug 18, 2002 5:36 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » mqdb2log.java program not compiling please help
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.