473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Connecting to a JMS topic

Hi ALL,
I am trying to connect to a JMS topic but getting an exception.To connect to that JMS topic username and password are required.I have provided the required username and the pwd but still getting this exception.
The exception is as follows:-
Expand|Select|Wrap|Line Numbers
  1. javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason://sam03:8083/q~q~uq~???sr org.jnp.server.NamingServer_Stubxrjava.rmi.server.RemoteStub??????exrjava.rmi.server.RemoteObject?a??
  2.  
  3. a3xpw8
  4.  
  5.       UnicastRef2]]
  6.  
  7.         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:47)
  8.  
  9.         at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:636)
  10.  
  11.         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:306)
  12.  
  13.         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:239)
  14.  
  15.         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
  16.  
  17.         at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
  18.  
  19.         at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
  20.  
  21.         at javax.naming.InitialContext.init(Unknown Source)
  22.  
  23.         at javax.naming.InitialContext.<init>(Unknown Source)
  24.  
  25.         at TopicReceive.getInitialContext(TopicReceive.java:175)
  26.  
  27.         at TopicReceive.main(TopicReceive.java:142)
  28.  
  29. Caused by: weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason://sam03:8083/q~q~uq~???sr org.jnp.server.NamingServer_Stubxrjava.rmi.server.RemoteStub??????exrjava.rmi.server.RemoteObject?a??
  30.  

The JNDI connection code is:-
Expand|Select|Wrap|Line Numbers
  1. tconFactory = (TopicConnectionFactory) PortableRemoteObject.narrow(
  2.                                                             ctx.lookup("DummyConnectionFactory"), TopicConnectionFactory.class);
  3.                                     tcon = tconFactory.createTopicConnection("xyz","xyz");
  4.                                     tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
  5.                                     topic = (Topic) PortableRemoteObject.narrow(ctx.lookup(topicName),                                                            Topic.class);                                  
  6.   tsubscriber = tsession.createSubscriber(topic);
  7.                                     tsubscriber.setMessageListener(this);
  8.                                     tcon.start();
  9.  
Any help would be great.

-Hussain.
Jun 8 '07 #1
1 6240
First of all you have not reached the line where you tying to get Topic. You failed on getting InitialContext. This error says that you must set login/password not for Topic or maybe Queue, but for InitialContext
Expand|Select|Wrap|Line Numbers
  1. environment.put(Context.SECURITY_PRINCIPAL, USER);
  2. environment.put(Context.SECURITY_CREDENTIALS, PASSWORD);
  3. environment.put(Context.SECURITY_AUTHENTICATION, "simple");
  4. jndiContext = new InitialContext(environment);
  5.  
That's maybe not the answer, but obvious logic according to your code lines. I also have pretty similar problem, but the error in my case is
Expand|Select|Wrap|Line Numbers
  1. javax.naming.CommunicationException [Root exception is weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason: HTTP/1.0 501 Not Supported]]
  2.  
and first steps which a made was setting of the password/loging for context. But that doesn't helped)))) But maybe it gives some directions .. who knows ..
Sep 17 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Camp | last post by:
Hey, I don't know much more than the basics of C++, and I've been trying to write a program that will let me connect to an actual proccess through a port. The thing is, I don't just want to know if...
2
by: John Spiegel | last post by:
Hey All, This may be a bit off topic, but I'm looking for recommendations on sources for OLEDB/ODBC drivers that will allow me to connect w/ ADO.NET to an informix database hosted locally on a...
3
by: Krish | last post by:
Hi Friends, Does anyone know how to connect access database into Visual C++ in Visual Studio 6.0. I know the procedure to connect access database into Visual Studio .Net. But Visual Studio 6.0...
14
by: Hemant Shah | last post by:
Folks, I installed DB2 UDB 8.2 FP8 ESE on Win 2K syatem. I cataloged node and database on AIX system. When I try to connect to the database on windows system from an AIX system I get following...
14
by: John Spiegel | last post by:
Hi all, I'm missing something, probably stupid, on connecting to a SQL Server database from an aspx file. I haven't really done much w/ SQL Server and suspect that it's a problem on that side. ...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
3
by: GTDriver | last post by:
I'm trying to connect my application with a web service located on my own web server(localhost). I guess when the solution/proect is built it makes a file called 'Web...
18
by: Barry Wright | last post by:
Hi All, I have been connecting to this group through Rogers cable my internet service provider. However, Rogers has announced that effective Dec 15th they will no longer providing access to...
3
by: Laurence | last post by:
Hi there, Does somebody know the efficent way to connect DB2/400? Through iSeries Access ODBC/OLEDB driver or DB2 Connect? Which will more fast and efficent? In addition, does DB2 Connect use...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.