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 » loading 'com.ibm.mqjms.jar' into Oracle

Post new topic  Reply to topic
 loading 'com.ibm.mqjms.jar' into Oracle « View previous topic :: View next topic » 
Author Message
emqueuer
PostPosted: Thu Jan 08, 2009 3:56 am    Post subject: loading 'com.ibm.mqjms.jar' into Oracle Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

Hello,

I am trying to put a message on a queue triggered from a table on an Oracle database.

Does anyone know how to load 'com.ibm.mqjms.jar' into Oracle please?

I know this could potentially be seen as more of an Oracle issue than an MQ one but it seems that referencing 'com.ibm.mqjms.jar' using environment variables is not the way the OracleJVM works. Oracle documentation says that all referenced classes must be loaded onto the database but I get unresolved reference compilation errors. There must be a way around this.

If anyone has any ideas at all I would really appreciate it.

Many thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jan 08, 2009 4:04 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It's all apparently done with the loadjava command.

http://download.oracle.com/docs/cd/B19306_01/java.102/b14187/cheleven.htm#ABC2124788

You may have to load a number of jar flies before com.ibm.mqjms.jar will load without dependancy failures. These should be the same as the ones you need to specify on the CLASSPATH outside of Oracle.
Back to top
View user's profile Send private message
emqueuer
PostPosted: Fri Jan 09, 2009 5:02 am    Post subject: loading specific mq jar files to the database Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

Dear mqjeff,

I have tried loading the jar files but presumably there's a particular order in doing this which I do not know because I am getting many errors.

The classes that my code references is as follows:

import com.ibm.mq.jms.JMSC;
import com.ibm.mq.jms.MQQueue;
import com.ibm.mq.jms.MQQueueConnectionFactory;

Is it possible for me to load up only the jars I need, as opposed to all of them and is there a particular order?

Or do I need to load everything within the MQ lib directory?

many thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jan 09, 2009 5:10 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You don't need *everything* in Java/lib.

Again, your best bet is to set up a test environment outside of Oracle that uses CLASSPATH instead of the Oracle environment. Then experiment with that CLASSPATH until you get a minimal set of jar files and load those...

There might even be something in the MQ InfoCenter on this subject.
Back to top
View user's profile Send private message
emqueuer
PostPosted: Fri Jan 09, 2009 6:06 am    Post subject: mq classes still failing tyo resolve in Oracle Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

mqjeff wrote:
You don't need *everything* in Java/lib.

Again, your best bet is to set up a test environment outside of Oracle that uses CLASSPATH instead of the Oracle environment. Then experiment with that CLASSPATH until you get a minimal set of jar files and load those...

There might even be something in the MQ InfoCenter on this subject.


I have a non-Oracle version of my code set up and I stripped out every jar from the lib directory that is not required to put a message on the queue. The neccesary library files are:

C:\Program Files\IBM\WebSphere MQ\Java\lib\providerutil.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mqjms.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\ldap.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\jta.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\jndi.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\jms.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\connector.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\fscontext.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jar;
C:\Program Files\IBM\WebSphere MQ\Java\lib\com.ibm.mq.jms.Nojndi.jar;

C:\Program Files\IBM\WebSphere MQ\Java\lib\dhbcore.jar;

I then ensured all these jars were loaded onto Oracle. They all loaded fine except the last one, dhbcore.jar where there were a few errors.

Anyway, I thought I may as well try to re-load my own java code but got ' ORA 29534: referenced object TESTDB.com/ibm/mq/jms/MQQueue could not be resolved'

Any suggestions before I try your 'MQ InfoCentre' suggestion ?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jan 09, 2009 6:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

If you loaded all the jars and are now getting a classpath error, then it's more likely an issue with how they are loaded or referenced in Oracle than with anything the MQ Info Center will talk about...

There's a good bit of discussion in the Oracle library about how this stuff is supposed to work - in the Java programmer guide.

I haven't done this, though, so all I can recommend at this point is to review the Oracle documentation and ask on an Oracle/DBA forum. Maybe someone else has done this.
Back to top
View user's profile Send private message
emqueuer
PostPosted: Thu Jan 15, 2009 2:28 am    Post subject: MQ 6.0 v Oracle 11g Reply with quote

Novice

Joined: 21 Jun 2007
Posts: 24

Are the MQ 6.0 jars certified against Oracle 11g ?

I am still getting the ORA-29534 'Object could not be resolved' error when trying to load com.ibm.mq.jms.MQQueueConnectionFactory. Oracle support has so far not been able to provide a reason for this.
Back to top
View user's profile Send private message
broker_new
PostPosted: Fri Feb 26, 2010 2:41 pm    Post subject: Reply with quote

Yatiri

Joined: 30 Nov 2006
Posts: 614
Location: Washington DC

Guys,

Anyone succeeded on this problem, i have the same problem loading the jar files into oracle database.I tried setting the other way by putting the jar files in CLASSPATH, doesn;t work either way.

on
class com/ibm/msg/client/wmq/v6/direct/internal/TextMessageImpl: resolution
class com/ibm/msg/client/wmq/v6/direct/internal/TopicPublisherImpl: resoluti
on
class com/ibm/msg/client/wmq/v6/direct/internal/TopicSessionImpl: resolution

class com/ibm/msg/client/wmq/v6/direct/internal/TopicSubscriberImpl: resolut
ion
exiting : Failures occurred during processing
_________________
IBM ->Let's build a smarter planet
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Feb 27, 2010 10:22 pm    Post subject: Reply with quote

Grand High Poobah

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

If you cannot get all the provider jar files to load in oracle, you could potentially use the Oracle messaging gateway to bridge MQ-AQ. You can then put the message to oracle AQ and the gateway will move it over to MQ.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
steffi2
PostPosted: Sat Jan 01, 2011 7:29 pm    Post subject: Reply with quote

Apprentice

Joined: 04 Sep 2009
Posts: 31

I'd be interested in knowing how far you got trying to publish to MQ by trigger in 11g.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » loading 'com.ibm.mqjms.jar' into Oracle
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.