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 » NoClassDefFoundError: com.ibm.ws.sib.utils.ras.SibTr

Post new topic  Reply to topic
 NoClassDefFoundError: com.ibm.ws.sib.utils.ras.SibTr « View previous topic :: View next topic » 
Author Message
mattd
PostPosted: Wed Jan 16, 2008 12:28 pm    Post subject: NoClassDefFoundError: com.ibm.ws.sib.utils.ras.SibTr Reply with quote

Newbie

Joined: 16 Jan 2008
Posts: 4

Hi,

From within RAD7, I am trying to connect to an deployed application to run some test messages through. I have a project set up to connect to the Queue Manager to place some test messages on the queue. This worked in RAD6 (WAS 5.1) but since upgrading to RAD7, I get this error:

Code:
Caused by: java.lang.NoClassDefFoundError: com.ibm.ws.sib.utils.ras.SibTr
   at com.ibm.ws.sib.api.jms.impl.JmsFactoryFactoryImpl.<clinit>(JmsFactoryFactoryImpl.java:78)


Any ideas?

I have the Websphere 6.1 libraries included in the project path, and everything compiles fine. I just get this error when trying to run a JUnit test.

Thanks for any help,

Matt
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 16, 2008 12:33 pm    Post subject: Reply with quote

Grand High Poobah

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

mattd wrote:
Caused by: java.lang.NoClassDefFoundError: com.ibm.ws.sib.utils.ras.SibTr
at com.ibm.ws.sib.api.jms.impl.JmsFactoryFactoryImpl.<clinit>(JmsFactoryFactoryImpl.java:7


Are you doing anything with the web JMS engine SIBus ??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mattd
PostPosted: Wed Jan 16, 2008 12:37 pm    Post subject: Reply with quote

Newbie

Joined: 16 Jan 2008
Posts: 4

Yes, I have a bus, qcf, and queues created for the application. We recently upgraded from 5.x to 6.1 and I am trying to test the new architecture with Activation Specs, the SIBus, etc...

fjb_saper wrote:
Are you doing anything with the web JMS engine SIBus ??
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Jan 16, 2008 12:58 pm    Post subject: Reply with quote

Grand High Poobah

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

mattd wrote:
Yes, I have a bus, qcf, and queues created for the application. We recently upgraded from 5.x to 6.1 and I am trying to test the new architecture with Activation Specs, the SIBus, etc...


Well, looks like you're missing something from your classpath...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mattd
PostPosted: Mon Jan 28, 2008 10:58 am    Post subject: Reply with quote

Newbie

Joined: 16 Jan 2008
Posts: 4

Here is the missing JAR IBM recommended I add to the classpath. Seemed to fix it:

{RAD70 Install
Dir}/SDP70/runtimes/base_v61/plugins/com.ibm.ws.sib.utils_2.0.0.jar.
Back to top
View user's profile Send private message
eai_guy
PostPosted: Thu Mar 13, 2008 2:34 am    Post subject: Exception in thread "main" java.lang.NoClassDefFou Reply with quote

Voyager

Joined: 18 Oct 2007
Posts: 90

Hi,

I m getting a following runtime error,
Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/Resour
ceException
at com.ibm.mq.MQEnvironment.<clinit>(MQEnvironment.java:252)
at readFile.initMQ(readFile.java:42)
at readFile.main(readFile.java:100).

I m using MQ 5.3 and my java version is 1.4, Operatin sys is windows XP with service pack 2.
I have written a java application which reads a message from a file and makes a put operation on a MQ queue . Program is getting compiled without any issues .
My classpathC:\j2sdk1.4.1_01\bin\;C:\j2sdk1.4.1_01\lib\com.ibm.mq.jar;C:\j2sdk1.4.1_01\lib\jta.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\;C:\j2sdk1.4.1_01\lib\com.ibm.mqbind.jar;C:\j2sdk1.4.1_01\lib\com.ibm.mqjms.jar;C:\j2sdk1.4.1_01\lib\fscontext.jar;C:\j2sdk1.4.1_01\lib\jndi.jar;C:\j2sdk1.4.1_01\lib\jms.jar;C:\Program Files\IBM\WebSphere MQ\Java\lib\jdbc\;

Path variable
C:\Program Files\IBM\WebSphere MQ\Java\lib\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\j2sdk1.4.1_01\bin\;C:\Program Files\IBM\WebSphere MQ\bin;C:\Program Files\IBM\WebSphere MQ\tools\c\samples\bin;C:\j2sdk1.4.1_01\lib\;C:\Program Files\IBM\WebSphere MQ\Java\lib\;C:\Program Files\IBM\WebSphere MQ\Java\lib\jdbc\;

I have also copied the MQ dlls from java/lib in system32 folder of windows.

Any inputs on this will be of great help, Thanks in advance.

here is my application code,

import com.ibm.mq.*;

import java.io.*;
import java.util.*;
import java.lang.*;
import java.text.*;

public class readFile{

StringBuffer output = new StringBuffer();
String message = " ";

private String qManager = "testQM";


public void readOrder(){

try{
String srFile = "C:\\test.txt";
File f1 = new File(srFile);
BufferedReader in = new BufferedReader(new FileReader(f1));
String line = "";

while((line = in.readLine()) != null)
{
output.append(line);
}

message = output.toString();
}
catch(Exception ex)
{
System.out.println("Exception"+ex.toString());

}


}

public void initMQ(){

MQEnvironment.hostname = "10.118.70.117";
MQEnvironment.channel = "CHANNEL1";
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES);

}


public void putOrder(){

try{

MQQueueManager qMgr = new MQQueueManager(qManager);

// Set up the options on the queue we wish to open...
// Note. All MQSeries Options are prefixed with MQC in Java.
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT ;
// Now specifythe queue that we wish to open,
// and the open options...
MQQueue local_queue = qMgr.accessQueue("testQueue",openOptions);
// Define a simple MQSeries message, and write some text in UTF format..
MQMessage hello_world = new MQMessage();
hello_world.writeUTF(message);
// specifythe message options...
MQPutMessageOptions pmo = new MQPutMessageOptions(); // accept the // defaults,


// put the message on the queue
local_queue.put(hello_world,pmo);

qMgr.disconnect();


}
catch (MQException ex)
{
System.out.println("An MQSeries error occurred : Completion code " +
ex.completionCode + " Reason code " + ex.reasonCode);
}
// Was it a Java buffer space error?
catch (java.io.IOException ex)
{
System.out.println("An error occurred whilst writing to the message buffer: " + ex);
}





}





public static void main(String args[]){

readFile r = new readFile();
r.readOrder();// reads order from file
r.initMQ(); // initializes MQ series
r.putOrder(); // puts order in MQ queue


}








}
Back to top
View user's profile Send private message
marcin.kasinski
PostPosted: Thu Mar 13, 2008 2:46 am    Post subject: Re: Exception in thread "main" java.lang.NoClassDe Reply with quote

Sentinel

Joined: 21 Dec 2004
Posts: 850
Location: Poland / Warsaw

eai_guy wrote:
Hi,

I m getting a following runtime error,
Exception in thread "main" java.lang.NoClassDefFoundError: javax/resource/Resour
ceException
at com.ibm.mq.MQEnvironment.<clinit>(MQEnvironment.java:252)
at readFile.initMQ(readFile.java:42)
at readFile.main(readFile.java:100).

...


Please add connector.jar to classpath and test it.
_________________
Marcin
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Thu Mar 13, 2008 3:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

PLEASE DON'T USE MQ v5.3!

It's out of support.
_________________
I am *not* the model of the modern major general.
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 » NoClassDefFoundError: com.ibm.ws.sib.utils.ras.SibTr
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.