Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.ClassCastException: weblogic.jms.common.SessionCallback_WLStub

0 views
Skip to first unread message

Ivaylo Mihov

unread,
Aug 7, 2001, 5:30:05 PM8/7/01
to

I am running WL5.1SP10 and am trying to create a DurableTopicSubscriber like this:

public void init(Context ctx, String topicName)
throws NamingException, JMSException, InterruptedException
{
System.out.println("Looking up TopicConnectionFactory: " + JMS_FACTORY);
tconFactory = (TopicConnectionFactory) ctx.lookup(JMS_FACTORY);
System.out.println("Creating TopicConnection..");
tcon = tconFactory.createTopicConnection();
System.out.println("Creating TopicSession..");
tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
try {
topic = (Topic) ctx.lookup(topicName);
} catch (NamingException ne) {
topic = tsession.createTopic(topicName);
ctx.bind(topicName, topic);
}
System.out.println("Creating DurableSubscriber...");
tsubscriber = tsession.createSubscriber(topic);
//tsubscriber = tsession.createDurableSubscriber(topic, "Subscriber 1");
System.out.println("Created DurableSubscriber...");
tsubscriber.setMessageListener(this);
tcon.start();
}

Here is the output when I try to run the entire thing:

C:\work\jms\topic\classes>java -cp C:\weblogic\classes;C:\weblogic\lib\weblogica
ux.jar;.\ TopicReceive t3://localhost
Looking up TopicConnectionFactory: jms.connection.isdsLogFactory
Creating TopicConnection..
Creating TopicSession..
Creating DurableSubscriber...
Exception in thread "main" javax.jms.JMSException: System error: java.lang.ClassCastException:
weblogic.jms.common.SessionCallback_WLStub
at weblogic.jms.common.JMSUtilities.jmsException(JMSUtilities.java:18)
at weblogic.jms.client.JMSSession.handleException(JMSSession.java:682)
at weblogic.jms.client.JMSSession.establishSessionCallback(JMSSession.java:652)
at weblogic.jms.client.JMSTopicSession.createSubscriber(JMSTopicSession.java:71)
at weblogic.jms.client.JMSTopicSession.createSubscriber(JMSTopicSession.java:56)
at TopicReceive.init(TopicReceive.java:73)
at TopicReceive.main(TopicReceive.java:101)

Any hints on this?

Duncan Smith

unread,
Aug 7, 2001, 5:47:55 PM8/7/01
to
Sorry to say it, but I'm glad to see I'm not the only one with this problem
;)

What JDK/J2EE versions are you running?


"Ivaylo Mihov" <i...@instill.com> wrote in message
news:3b704fcd$1...@newsgroups.bea.com...

Lisa Popp

unread,
Aug 9, 2001, 2:53:14 PM8/9/01
to
Just to reiterate what has already be noted elsewhere...

You need to apply the weblogic510sp10.jar to both the server and the client.

-Lisa

Pranjal

unread,
Sep 19, 2001, 9:39:06 AM9/19/01
to

HI
I have applied the same but same error is coming ???
has anybody solved this problem ???
Pranjal

Lisa Popp

unread,
Sep 19, 2001, 5:37:10 PM9/19/01
to

This problem should go away with the proper application of the SP to both the
server and the clients classpaths. Please check for any spelling typos and make
sure the client classpath is picking up the SP10 jar file.

-Lisa

0 new messages