Re: ConnectionFactory.createConnection returns null

"George H" <[email protected]> Sat, 26 May 2007 10:19:49 +0300
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
Hi,

I've struggled a bit with similar problems. First off I'd say make
sure your program is reading your jndi.properties file correctly
(maybe it's not in your class path?) or maybe it is not setup right?
using the standard tcp, also noticed that the OpenJMS server must
listen on both TCP and RMI ports for it to actually work. I once
turned off the RMI listener and nothing worked.

On 5/26/07, Judd Bourgeois <[email protected]> wrote:
> I have a small application that has run fine in the past using Sun MQ 3.6.
> The MQ server is being replaced so I decided to try out OpenJMS as a
> potential replacement.
>
> I'm able to connect to OpenJMS and create a ConnectionFactory (CF) but my CF
> does not appear to create connections properly.  It simply returns null when
> I call createConnection() and does not throw any exceptions.  Here's a code
> snippet:
>
> // set up initial context
> Properties prop = new Properties();
> prop.put(Context.INITIAL_CONTEXT_FACTORY, CTX);
> prop.put(Context.PROVIDER_URL, PROV_URL);
> Context ictx = new InitialContext(prop);
>
> ConnectionFactory cf = (ConnectionFactory) ictx.lookup(MYQCF_LOOKUP_NAME);
> Connection cnx = cf.createConnection("admin", "openjms");
> Session sess = cnx.createSession(true, 0); /* Null pointer exception thrown
> here */
>
> I'm a little stumped.  There's nothing in the OpenJMS log that offers any
> clues.
>
> Thanks-
> J
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> openjms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openjms-user
>
>


-- 
"Nothing is impossible for the person that doesn't have to do it"
"The probability of anything happening is in inverse ratio to its desirability"
"If I were a roman statue, I'd be made alabastard"
--
George H
[email protected]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/