JMSException Failed to lookup OpenJMS administration server at url
aksgag <[email protected]> Tue, 1 Jan 2008 01:42:51 -0800 (PST)
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
--===============0928850175==
Content-Type: multipart/alternative;
boundary="----=_Part_4552_6956715.1199180571262"
------=_Part_4552_6956715.1199180571262
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I am using OpenJMS for some application. I have server running on one machine
and form some other 2 machines I try to write messages on the queues on the
server. Before writing to the queue, I first create the queue dynamically
and then write to it. I have the same classes on all the machines. But from
one of the machines , when I am tying to create an admin object , I get an
error like :
JMSException Failed to lookup OpenJMS administration server at URL:
tcp://10.74.64.157:3035
Ans surprisingly this error comes only once.. I mean I am creating this
admin object at several places in the code.. but it throws this exception
only once. I am also attaching the code that I have written to add
destination to the server.
public String addDestination(String url,String name, int retryCount)
{
//Queuename = url.replace(".","/");
this.Queuename = name.replace(".", "/");
url="tcp//" + url + ":3035";
System.out.println("JMSServerHandler : Queuename = " + Queuename);
System.out.println("JMSServerHandler : url = " + url);
try{
admin = AdminConnectionFactory.create(url, "admin", "openjms");
Boolean isQueue = Boolean.TRUE;
if (!admin.destinationExists(Queuename)) {
if (!admin.addDestination(Queuename, isQueue)) {
mLog.error("Failed to create queue " + Queuename);
System.out.println("Failed to create queue "
+ Queuename);
} else {
System.out.println("A fresh Queue Created " + Queuename);
}
}
else{
System.out.println("Queue already Exists");
}
}
catch (MalformedURLException e) {
mLog.error("JMSServerHandler: MALFormed URL Exception"
+ e.getMessage());
System.out
.println("JMSServerHandler : MALFormed URL Exception"
+ e.getMessage());
return null;
} catch (JMSException e) {
mLog.error("JMSServerHandler: JMSException "
+ e.getMessage());
System.out.println("Could not add the JMS Destination - JMSServerHandler:
JMSException "
+ e.getMessage()+ " " + e.getErrorCode()+ " " +
e.getLocalizedMessage());
return null;
}finally{admin.close();}
return Queuename;
}
I would be really thankful if you could suggest me some reason as in, why I
might be getting this error.
--
View this message in context: http://www.nabble.com/JMSException-Failed-to-lookup-OpenJMS-administration-server-at-url-tp14565415p14565415.html
Sent from the OpenJMS - User mailing list archive at Nabble.com.
------=_Part_4552_6956715.1199180571262
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
I am using OpenJMS for some application. I have server running on one machine and form some other 2 machines I try to write messages on the queues on the server. Before writing to the queue, I first create the queue dynamically and then write to it. I have the same classes on all the machines. But from one of the machines , when I am tying to create an admin object , I get an error like :
JMSException Failed to lookup OpenJMS administration server at URL: tcp://10.74.64.157:3035
Ans surprisingly this error comes only once.. I mean I am creating this admin object at several places in the code.. but it throws this exception only once. I am also attaching the code that I have written to add destination to the server.
public String addDestination(String url,String name, int retryCount)
{
//Queuename = url.replace(".","/");
this.Queuename = name.replace(".", "/");
url="tcp//" + url + ":3035";
System.out.println("JMSServerHandler : Queuename = " + Queuename);
System.out.println("JMSServerHandler : url = " + url);
try{
admin = AdminConnectionFactory.create(url, "admin", "openjms");
Boolean isQueue = Boolean.TRUE;
if (!admin.destinationExists(Queuename)) {
if (!admin.addDestination(Queuename, isQueue)) {
mLog.error("Failed to create queue " + Queuename);
System.out.println("Failed to create queue "
+ Queuename);
} else {
System.out.println("A fresh Queue Created " + Queuename);
}
}
else{
System.out.println("Queue already Exists");
}
}
catch (MalformedURLException e) {
mLog.error("JMSServerHandler: MALFormed URL Exception"
+ e.getMessage());
System.out
.println("JMSServerHandler : MALFormed URL Exception"
+ e.getMessage());
return null;
} catch (JMSException e) {
mLog.error("JMSServerHandler: JMSException "
+ e.getMessage());
System.out.println("Could not add the JMS Destination - JMSServerHandler: JMSException "
+ e.getMessage()+ " " + e.getErrorCode()+ " " + e.getLocalizedMessage());
return null;
}finally{admin.close();}
return Queuename;
}
I would be really thankful if you could suggest me some reason as in, why I might be getting this error.
<br><hr align="left" width="300">
View this message in context: <a href="http://www.nabble.com/JMSException-Failed-to-lookup-OpenJMS-administration-server-at-url-tp14565415p14565415.html">JMSException Failed to lookup OpenJMS administration server at url</a><br>
Sent from the <a href="http://www.nabble.com/OpenJMS---User-f2762.html">OpenJMS - User mailing list archive</a> at Nabble.com.<br>
------=_Part_4552_6956715.1199180571262--
--===============0928850175==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--===============0928850175==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
openjms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openjms-user
--===============0928850175==--