#137 publishing from websphere 5.1

v0.7.6.1
open
nobody
jndi (13)
5
2005-05-24
2005-05-24
sanneoanu
No

1. I am using openJMS for publishing/subscribing
2. I am able to publish using openJMS example of
SimplePublisher.java as independent java classes,
through servlet in tomcat.

Problem:
The moment I use the same code in websphere 5.1 I am
getting null connections when "createTopicConnection"
is called. The exception is as below:

[5/23/05 18:14:12:350 EDT] 54205420 SystemErr R
java.lang.NullPointerException

[5/23/05 18:14:12:380 EDT] 54205420 SystemErr R at
java.lang.Throwable.<init>(Throwable.java:54)

[5/23/05 18:14:12:380 EDT] 54205420 SystemErr R at
java.lang.Throwable.<init>(Throwable.java:68)

[5/23/05 18:14:12:380 EDT] 54205420 SystemErr R at
java.lang.NullPointerException.<init>
(NullPointerException.java:63)

[5/23/05 18:14:12:380 EDT] 54205420 SystemErr R at
org.exolab.jms.client.JmsConnectionFactory.addConnect
ion(JmsConnectionFactory.java:171)

[5/23/05 18:14:12:380 EDT] 54205420 SystemErr R at
org.exolab.jms.client.JmsTopicConnectionFactory.create
TopicConnection(JmsTopicConnectionFactory.java:115)

[5/23/05 18:14:12:390 EDT] 54205420 SystemErr R at
org.exolab.jms.client.JmsTopicConnectionFactory.create
TopicConnection(JmsTopicConnectionFactory.java:103)

[5/23/05 18:14:12:390 EDT] 54205420 SystemErr R at
openjms.examples.client.console.SimplePublisher.main
(SimplePublisher.java)

Wonder if its a bug?

Discussion

  • sanneoanu
    sanneoanu
    2005-05-24

    Logged In: YES
    user_id=1283997

    To add on the above

    Context context = ContextHelper.getContext(cmdline);
    returns context, there is a difference in context data [as seen
    in debugger]
    java.naming.factory.url.pkgs=:com.ibm.ws.naming:com.ibm.w
    s.naming:com.ibm.ws.naming} is also there in context-
    >myprops
    This ..url.pkgs is not there at all when class is executed
    independently. I removed this property but still the exception,
    also dont know if this makes the problem

    also when following is executed
    TopicConnectionFactory factory = (TopicConnectionFactory)
    context.lookup("JmsTopicConnectionFactoryNew");

    factory is returned but the factory->_connections = null [as
    seen in debugger]

    I am not able to find any document which specify the different
    usage in websphere.

     
  • Tim Anderson
    Tim Anderson
    2005-06-08

    Logged In: YES
    user_id=557161

    Looking at the code, I can't see that _connections ever gets set
    to null. Are you using 0.7.6.1, or some other version.
    The source for JmsConnectionFactory in 0.7.6.1 is here:
    http://cvs.sourceforge.net/viewcvs.py/openjms/openjms/src/main/o
    rg/exolab/jms/client/Attic/JmsConnectionFactory.java?
    rev=1.19&only_with_tag=openjms_0_7_6_maint

     
  • Tim Anderson
    Tim Anderson
    2005-06-22

    Logged In: YES
    user_id=557161

    The following shouldn't make any difference, but not having a
    websphere installation, I can't verify.
    1. Download and extract the 0.7.6.1 sources
    2. Edit src/main/org/exolab/jms/client/JmsConnectionFactory.java
    and remove all "transient" keywords.
    3. Recompile.
    > build.bat jar
    (Jars willl be created in the lib dir.
    See docs/devguide/build.html in the binary distro
    for more build instructions)