Tags: apis, broker, core, firsti, java, javalangnoclassdeffounderror, javax, jbuilder, jms, jmsexception, joram, linux, message, open-source, redhat, registry, running
java.lang.NoClassDefFoundError: javax/jms/JMSException
On Java Studio » Java Core APIs
2,709 words with 2 Comments; publish: Thu, 20 Sep 2007 00:10:00 GMT; (15078.13, « »)
Good day:
I am running Redhat Linux 7.3, JBuilder 7 and Joram 3.0.1 Open-Source Message Broker.
FIRST:
I have started my java REGISTRY with no problems with:
%rmiregistry 1099 &
THEN:
I have bound my SERVER with no problems in the registry as follows:
% java -Djava.rmi.server.codebase=file:///usr/local/LINKS_Newsgroup/classes/ Newsgroup_Server_Main &
THEN:
I start up my Joram 3.0.1 (Open source Message Broker) with no problem as follows:
%../../../jakarta-ant-1.5.1/bin/ant server0 &
and then:
../../../jakarta-ant-1.5.1/bin/ant classic_admin
THEN: I start my client in JBuilder 7. This shows a client dialog that has a login button. When i press the login button, it is meant to GET A REFERENCE to the SERVER that has been bound, THEN invoke a simple method: Here's the code as it appears in my login dialog class:
void login_button_actionPerformed(ActionEvent e) {
try{
LINKS_NewsgroupIF impl = LINKS_NewsgroupIF)Naming.lookup("LINKS_Newsgroup_Server");
impl.authenticateTutor(username.getText(), password.getText());
this.setVisible(false);
}//end of try
catch (java.rmi.RemoteException re) {
System.out.println("A wierd remote exception was thrown! " +
re.toString());
}//end of catch
WHAT'S THE PROBLEM then?
The "impl" object comes back ok. (i.e the debugger goes BEYOND THIS STEP WITHOUT throwing Naming Exception, etc).
But now that i have the "impl" instance, if i try to execute the method "authenticateTutor", then it throws the following exception:
A wierd remote exception was thrown! java.rmi.ServerError: Error occurred in server thread; nested exception is:
java.lang.NoClassDefFoundError: javax/jms/JMSException
MY QUESTION IS WHAT THE HECK JMSEXCEPTION has to do with executing a simple method through RMI?! Why is it doing that?
Thanx for any suggestions.
http://java-apis.developerfaqs.com/q_java-core-apis_28849.html
All Comments
Leave a comment...
- 2 Comments

Hi,
I am using RMI + JMS and running into a different problem. I am able to start RMI registry, J2EE (java reference implementation of JMS) and the server binds find with the RMI registry. I start the client that creates JMS subscriber and then uses the RMI interface.
The problem is, the client does not receive the messages published by a publisher. But RMI works.
If I comment out using the RMI section in my client code, then the client receives the JMS messages. But if the client does an rmi naming lookup, JMS does not work.
Is there a problem using RMI + JMS? Are there any tricks to make these work together?
#1; Sat, 07 Jul 2007 19:43:00 GMT

- I was using RMISecurityManager. Commented it out and it works fine!#2; Sat, 07 Jul 2007 19:43:00 GMT