Author |
Message
|
mattd |
Posted: Wed Jan 16, 2008 12:28 pm Post subject: NoClassDefFoundError: com.ibm.ws.sib.utils.ras.SibTr |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Jan 16, 2008 12:33 pm Post subject: |
|
|
 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 |
|
 |
mattd |
Posted: Wed Jan 16, 2008 12:37 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Jan 16, 2008 12:58 pm Post subject: |
|
|
 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 |
|
 |
mattd |
Posted: Mon Jan 28, 2008 10:58 am Post subject: |
|
|
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 |
|
 |
eai_guy |
Posted: Thu Mar 13, 2008 2:34 am Post subject: Exception in thread "main" java.lang.NoClassDefFou |
|
|
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 variableC:\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 |
|
 |
marcin.kasinski |
Posted: Thu Mar 13, 2008 2:46 am Post subject: Re: Exception in thread "main" java.lang.NoClassDe |
|
|
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 |
|
 |
jefflowrey |
Posted: Thu Mar 13, 2008 3:10 am Post subject: |
|
|
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 |
|
 |
|