JMS Java client - JMSExcepiton initializeConnection

Hello,
I'm working on a JMS java client to connect to an OC4J instance that's residing in a Oracle Application Server. I have the client jars in the Java client classpath and in fact the JNDI lookup for the connection factory and topic succeeded but when I try to create the connection it fails with the following error:
javax.jms.JMSException: initializeConnection
at com.evermind.server.jms.JMSUtils.make(JMSUtils.java:1050)
at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1130)
at com.evermind.server.jms.TCPJMSRemoteServer.initializeConnection(TCPJM
SRemoteServer.java:161)
at com.evermind.server.jms.TCPJMSRemoteServer.initializeConnection(TCPJM
SRemoteServer.java:114)
at com.evermind.server.jms.TCPJMSRemoteServer.<init>(TCPJMSRemoteServer.
java:72)
at com.evermind.server.jms.EvermindConnection.<init>(EvermindConnection.
java:124)
at com.evermind.server.jms.EvermindTopicConnection.<init>(EvermindTopicC
onnection.java:69)
at com.evermind.server.jms.EvermindTopicConnectionFactory.unprivileged_c
reateTopicConnection(EvermindTopicConnectionFactory.java:96)
at com.evermind.server.jms.EvermindTopicConnectionFactory.access$000(Eve
rmindTopicConnectionFactory.java:41)
at com.evermind.server.jms.EvermindTopicConnectionFactory$1.execute(Ever
mindTopicConnectionFactory.java:78)
at com.evermind.server.jms.RemoteClientProxy.doSecureOp(RemoteClientProx
y.java:94)
at com.evermind.server.jms.EvermindTopicConnectionFactory.createTopicCon
nection(EvermindTopicConnectionFactory.java:75)
at com.evermind.server.jms.EvermindTopicConnectionFactory.createTopicCon
nection(EvermindTopicConnectionFactory.java:66)
at beis_test.BEISConsumer.consumeMessage(BEISConsumer.java:51)
at beis_test.BEISConsumer.main(BEISConsumer.java:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.oc4j.appclient.ApplicationClientLauncherImpl.launch(Applicatio
nClientLauncherImpl.java:107)
at oracle.oc4j.appclient.AppClientContainer.main(AppClientContainer.java
:48)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.evermind.server.jms.TCPJMSRemoteServer$2.execute(TCPJMSRemoteServ
er.java:318)
at com.evermind.server.jms.RemoteClientProxy.doSecureOp(RemoteClientProx
y.java:94)
at com.evermind.server.jms.TCPJMSRemoteServer.makeSocket(TCPJMSRemoteSer
ver.java:315)
at com.evermind.server.jms.TCPJMSRemoteServer.initializeConnection(TCPJM
SRemoteServer.java:121)
... 18 more
JMSConsumer: Context Closed.
If I run this on the local machine it works - but it doesn't when I attempt it from my workstation. Any help will be greatly appreciated.
Thanks in advance,
Barry

JNDI lookups go through the RMI port, which you apparently have configured correctly. JMS operations (starting with and including JMS connection creation) go through the JMS port (which for OC4J JMS is always a different port than the RMI port). The JMS port is specified where the connection factory is configured -- in jms.xml.

Similar Messages

  • JMS:Java Client XAQueueConnectionFactory.createQueueConnection() exception

    Team,
    Running from stanalone java client. Whe I try to put the message on JMS, it throws the exception. Some other person found the same problem(JMS Exception: hosts (hostname:port) cannot be accessed!).
    I can create the initial context, lookup connection factory and look up queue succesfully but after that when I create the connection it throws the exception(listed below)
    Same code if I run under jsp running on SAP WS runs fine all the way and put the message on the queue.
    javax.jms.JMSException: The following hosts (hostname:port) cannot be accessed:
    . Check host names and ports.
            at com.sap.jms.client.connection.ConnectionFactory.getSocket(ConnectionF
    actory.java:447)
            at com.sap.jms.client.connection.ConnectionFactory.createConnection(Conn
    ectionFactory.java:300)
            at com.sap.jms.client.connection.ConnectionFactory.createConnection(Conn
    ectionFactory.java:244)
            at com.sap.jms.client.xa.XAQueueConnectionFactory.createQueueConnection(
    XAQueueConnectionFactory.java:122)
            at QueueSend.main(QueueSend.java:37)
    This where I print out the context, cf and queue.
    ctx=javax.naming.InitialContext@1833eca
      qcf=com.sap.jms.client.xa.XAQueueConnectionFactory@18f5824

    Peter solved it
    When you make a standalone java client the connection will be performed by a TCP socket to the server. Your problem is this cannot be achieved. When you do it from JSP your code will interact directly with the JMS on the server. No opening of socket to itself. That's why it works.
    I would suggest launching a visual administrator, then going to the "dispatcher" nodes, (not server) and checking the properties of the JMS_provider service. Set up there a valid TCP port (perhaps it is empty or it is not read ?), then try to restart the whole cluster.
    If that will not help you, please open a OSS message where the SAP supoprt guys can help you.
    HTH
    Peter

  • How to insert message in OC4J JMS from standalone java client.

    Hi,
    I have been following available examples for creating standalone java clients to insert messages in JMS queues.
    I am able to insert using java client when the SOA suite and the standalone java code are on same machine.
    package producerconsumerinjava;
    import javax.jms.*;
    import javax.naming.*;
    import java.util.Hashtable;
    public class QueueProducer
    public static void main(String[] args)
    String queueName = "jms/demoQueue";
    String queueConnectionFactoryName = "jms/QueueConnectionFactory";
    Context jndiContext = null;
    QueueConnectionFactory queueConnectionFactory = null;
    QueueConnection queueConnection = null;
    QueueSession queueSession = null;
    Queue queue = null;
    QueueSender queueSender = null;
    TextMessage message = null;
    int noMessages = 5;
    * Set the environment for a connection to the OC4J instance
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
    env.put(Context.SECURITY_CREDENTIALS, "mypass");
    env.put(Context.PROVIDER_URL,"ormi://myserver.company.com:12402"); //12402 is the rmi port
    * Set the Context Object.
    * Lookup the Queue Connection Factory.
    * Lookup the JMS Destination.
    try
    jndiContext = new InitialContext(env);
    queueConnectionFactory =
    (QueueConnectionFactory) jndiContext.lookup(queueConnectionFactoryName);
    queue = (Queue) jndiContext.lookup(queueName);
    catch (NamingException e)
    System.out.println("JNDI lookup failed: " + e.toString());
    System.exit(1);
    * Create connection.
    * Create session from connection.
    * Create sender.
    * Create text message.
    * Send messages.
    * Send non text message to end text messages.
    * Close connection.
    try
    queueConnection = queueConnectionFactory.createQueueConnection();
    queueSession =
    queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
    queueSender = queueSession.createSender(queue);
    message = queueSession.createTextMessage();
    for (int i = 0; i < noMessages; i++)
    message.setText("Message " + (i + 1));
    System.out.println("Producing message: " + message.getText());
    queueSender.send(message);
    queueSender.send(queueSession.createBytesMessage());
    catch (JMSException e)
    System.out.println("Exception occurred: " + e.toString());
    finally
    if (queueConnection != null)
    try
    queueConnection.close();
    catch (JMSException e)
    System.out.println("Closing error: " + e.toString());
    But when the SOA Suite is remote, I am struggling to get the settings correct
    Till now, here is what I have figured out from looking at blogs/tars etc on the Net:
    1. I need to use ApplicationClientInitialContextFactory instead of RMIInitialContextFactory (http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13975/jndi.htm)
    2. The project should have a META-INF/application-client.xml file, which may be dummy (http://www.wever.org/java/space/Oracle/JmsTar1). Question is, my code is there in a single absolutely standalone code..how I can use this application-client.xml and where it has to be placed.
    Errors:
    When trying to run exact same code on local server that tries to enqueue JMS on remotee serverer
    Exception occurred: javax.jms.JMSException: Unable to create a connection to "xxxxxxx.yyyyyy01.dev.com/10.42.456.11:12,602" as user "null".
    Any help is greatly welcome.
    As an exercise, I copied this complete code on the server and then ran locally using a telnet client...it worked. So the problem is coming when accessing the server remotely.
    Rgds,
    Amit

    1. I need to use ApplicationClientInitialContextFactory instead of RMIInitialContextFactoryNot necessarily.
    2. The project should have a META-INF/application-client.xml fileThat's only necessary if going the ApplicationClientInitialContextFactory route.
    There are two types of JMS client applications you can write -- a pure/plain Java app, and an "AppClient". That first is your everyday run-of-the-mill Java application, nothing special. That latter is a special, complicated beast that tries to act as a part of the whole client/server/J2EE architecture which provides you with a semi-managed environment. Either can be made to work, but if all you need is JMS access (using plain OC4J JMS factory/queue names and not JMS Connector names), then the first is easier to get working (and performs a tiny bit better as well due to being a lighter-weight solution).
    I think the problem you are having might be: When you use the plain Java client solution, you do not have any type of management, and that includes user management. With no user management (and if the JMS server is not configured to allow anonymous connections) you need to include the username and password in the call to createConnection. (I think it may be that this is actually true in the AppClient case as well -- I avoid using the AppClient model as much as possible so my memory there is weaker.)
    If you prefer to go the AppClient route, I would point you to a demo I wrote which had a functioning example, but Oracle seems to have removed it (and all of the 10.1.3 demos?) from OTN. :-(
    Hmm, it seems to still be available on the wayback machine:
    http://web.archive.org/web/20061021064014/www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html
    (Just look down the page for "With OEMS JMS (In-Memory and File-Based)" -- there is an .html document with info, and there is a .zip file with source code.)
    Question is, my code is there in a single absolutely standalone code..how I can use this application-client.xml and where it has to be placed.The app client in my demo had the following directory structure:
    myjavaclient.class
    jndi.properties
    META-INF\MANIFEST.MF
    META-INF\application-client.xml
    META-INF\orion-application-client.xml
    When you use ApplicationClientInitialContextFactory I think it just looks under .\META-INF for the .xml files.
    -Jeff

  • Java client for OSB proxy with JMS Transport

    Hi,
    I am trying to call OSB proxy with JMS Transport. I am generating the client through ant task clientgen and following this article
    http://www.oracle.com/technetwork/articles/murphy-soa-jms-092653.html
    The osb proxy is req-response and is simply routing to BS which return a string value.
    When I run my client, it get stuck and does not return at all. Has any one trying java client in such scenario?
    What I may be missing?
    Below is snipped of client code:
    String url = "http://localhost:7021/sbresource?PROXY/MySample/MyJMSProxyService";
    CreditLoanApprovalServiceSoapBindingQSService service = new CreditLoanApprovalServiceSoapBindingQSService_Impl(url);
    MyPortType port = service.getCreditLoanApprovalServiceSoapBindingQSPort();
    LoanStruct in = new LoanStruct(); //populated the data structure
    String loanResult = port.processLoanApp(in); // Stuck here without any error
    System.out.println("LoanResult--> " + loanResult);
    Thx
    /Ashwani

    http://localhost:7021/sbresource?PROXY/MySample/MyJMSProxyService is the WSDL URL of the proxy.
    Transport is is picked by the client from wsdl.
    As far as the documentation of client generation is there, there is no change.
    But meanwhile I have started working on sending the message directly to queue. JMSProxy is getting called. May be I will first run the proxy this way and then try troubleshooting the java client.
    Regards
    Ashwani

  • Booting WLS Java classes for JMS C Client

              ** Workshop 8.1 Beta **
              I am trying to boot the WLS server with the WLS Java classes (used for supporting
              the JMS C Client from dev2dev) contained in the CLASSPATH. The JVM is exiting
              with the attached error.
              I have removed the credentials in the config.xml as suggested by the error log.
              Any ideas? Thanks, Craig.
              [errors.txt]
              

              Problem with loading JMSCHandler.class in the class loader. Added JMSCHandler.class
              to weblogic.jar and problem was resolved..
              "craig" <[email protected]> wrote:
              >
              >
              >
              >** Workshop 8.1 Beta **
              >
              >I am trying to boot the WLS server with the WLS Java classes (used for
              >supporting
              >the JMS C Client from dev2dev) contained in the CLASSPATH. The JVM is
              >exiting
              >with the attached error.
              >
              >I have removed the credentials in the config.xml as suggested by the
              >error log.
              >
              >Any ideas? Thanks, Craig.
              

  • Design Problem : How to design/code a java client which is deployed to all the machines in a cluster and make sure that only one of the java client is active

              hi ,
              I have to design a java client (which is basically a JMS message listener)which
              is deplloyed to all the servers in the cluster. But as these are message listeners,
              i want only one of the instance to be active at a time.
              If the server on which the client is active goes down , I want the second server
              to start listening to messages.
              How do i design this ? Also is there a public api for multicasting that we can
              use ?
              Anybody has an idea on how to go about this..
              Thanks
              nisha
              

    Hi Nisha,
              Failover message listeners? Sounds like you want MDBs, which are deployed on all nodes in a
              cluster. If your JMS destination is a queue, then only one MDB will pick up the message. And just
              like any other ejb service, MDBs failover.
              Gene
              "Nisha" <[email protected]> wrote in message news:[email protected]..
              hi ,
              I have to design a java client (which is basically a JMS message listener)which
              is deplloyed to all the servers in the cluster. But as these are message listeners,
              i want only one of the instance to be active at a time.
              If the server on which the client is active goes down , I want the second server
              to start listening to messages.
              How do i design this ? Also is there a public api for multicasting that we can
              use ?
              Anybody has an idea on how to go about this..
              Thanks
              nisha
              

  • Stand-Alone JMS SAF Client

    Im interested in using a WL Stand-Alone JMS SAF Client to send messages to a server-side JMS destination,
              regardless of the servers availability.
              This is for a J2SE Swing Application. There currently is no app server interaction.
              I found the doc http://e-docs.bea.com/wls/docs92/client/saf_client.html
              It describes almost everything except for what the actual client will look like.
              Im stuck after "Modify Your JMS Client Applications.." section.
              Questions:
              A) Suggestions for other docs?
              B) Is anyone using a Stand-Alone JMS SAF Client?
              C) Does anyone know of any code examples?
              The odd thing is that a search on the net for "JMS SAF Client" or variants of yields nothing other than the WL docs...
              Thanks!

    I could not make stand-alone jms saf client work. Followed the doc, created ClientSAF.xml, made the change for intial-context factory. Tried using with provider_url and without it.
              I am not using default queue and connection factory. The client code is working fine when I don't use saf, i.e. "weblogic.jndi.WLInitialContextFactory" and provider_url.
              Getting following error:
              javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassCastException: weblogic.security.service.SubjectManagerImpl]
                   at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
                   at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
                   at javax.naming.InitialContext.init(Unknown Source)
                   at javax.naming.InitialContext.<init>(Unknown Source)
                   at weblogic.jms.safclient.agent.internal.ClientEnvironmentImpl.getContext(ClientEnvironmentImpl.java:76)
                   at weblogic.jms.forwarder.Forwarder.getInitialContext(Forwarder.java:334)
                   at weblogic.jms.forwarder.Forwarder.reconnect(Forwarder.java:210)
                   at weblogic.jms.forwarder.Forwarder.timerExpired(Forwarder.java:265)
                   at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:259)
                   at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
              Caused by: java.lang.ClassCastException: weblogic.security.service.SubjectManagerImpl
                   at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:106)
                   at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29)
                   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                   at java.lang.reflect.Constructor.newInstance(Unknown Source)
                   at java.lang.Class.newInstance0(Unknown Source)
                   at java.lang.Class.newInstance(Unknown Source)
                   ... 12 more
              java.lang.ClassCastException: weblogic.security.service.SubjectManagerImpl
                   at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:106)
                   at weblogic.jndi.WLInitialContextFactory.<init>(WLInitialContextFactory.java:29)
                   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)Stack level 1
                   at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                   at java.lang.reflect.Constructor.newInstance(Unknown Source)
                   at java.lang.Class.newInstance0(Unknown Source)
                   at java.lang.Class.newInstance(Unknown Source)
                   at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
                   at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
                   at javax.naming.InitialContext.init(Unknown Source)
                   at javax.naming.InitialContext.<init>(Unknown Source)
                   at weblogic.jms.safclient.agent.internal.ClientEnvironmentImpl.getContext(ClientEnvironmentImpl.java:76)
                   at weblogic.jms.forwarder.Forwarder.getInitialContext(Forwarder.java:334)
                   at weblogic.jms.forwarder.Forwarder.reconnect(Forwarder.java:210)
                   at weblogic.jms.forwarder.Forwarder.timerExpired(Forwarder.java:265)
                   at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:259)
                   at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)
              disconnect stack trace finished
              QUEUE NAME: jmssysmodule-ois!oisQueue

  • DLL's  - Websphere MQ and Java Client

    I am trying to post a message to Websphere MQ by using JMS Admin and Webspehre Application server. I have configured JMS Admin for registering the JNDI name with app server. I am using a standalone java (makes IIOP call) Application for posting the message. When I am running the java client in the machine where the MQ is installed the application runs fine. But, when I use it in a different machine, It is informing that variour DLLs are absent. Please let me know if all the Websphere MQ dlls need to be placed in the Stand alone java client machine.
    Thanks a lot in advance.
    Arun

    If you are using the JMSAdmin from IBM in the ma88 support pack and getting this error, then check to see if the following .dll files (or .dll files with similar names) are present in your PATH environment variable:
    mqjbdf01.dll
    mqjbnd04.dll
    MQXAi01.dll
    The above dlls are required for the MQSeries jar files to make native calls to MQSeries server.
    Please check and this should solve your problem.

  • How to create a JMS standalone client with SAS PE8.2 ?

    HI everyone,
    I use Creator2.1 and I want to write a JMS standalone client that communicate through JMS with a webapp built with Creator.
    My pb is that I dont know how to set up initialContext.
    Hashtable env=new Hashtable();
    env.put(Context.PROVIDER_URL, "mq://localhost:28676/jms");
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.enterprise.naming.SerialInitContextFactory");
    context = new InitialContext(env);
    factory = (TopicConnectionFactory) context.lookup(factoryName);
    For example this code doesnt work and I have the following exception when I try to run my client.
    29 sept. 2006 10:31:03 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
    ATTENTION: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2257)
    at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2278)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:208)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:221)
    at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
    at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:152)
    at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:146)
    at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:286)
    at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
    at org.omg.CosNaming.NamingContextHelper.narrow(NamingContextHelper.java:69)
    at com.sun.enterprise.naming.SerialContext.narrowProvider(SerialContext.java:89)
    at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:128)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:288)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at com.orange.clara.Main.main(Main.java:59)
    Caused by: java.lang.RuntimeException: java.net.ConnectException: Connection refused: connect
    at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:336)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:191)
    ... 12 more
    Caused by: java.net.ConnectException: Connection refused: connect
    at sun.nio.ch.Net.connect(Native Method)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:464)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
    at com.sun.enterprise.iiop.IIOPSSLSocketFactory.createSocket(IIOPSSLSocketFactory.java:320)
    ... 13 more
    Does anyone had already met this pb ?
    Regards
    R�gis

    Please refer to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6377822, particularly the evaluation. Could your situation be the same too (i.e server ip address changing dynamically)? Also, which OS are you using and do you have any firewalls setup that prevents access to port 3700?

  • JMS SAF client

    Hello ,
    Have a simple question about what jar files are required when using a safClient to connect to Weblogic.
    Some of the jar's are ,
    - weblogic.jar
    - wlclient.jar
    - wlfullclient.jar
    - wlsafclient.jar
    - wljmsclient.jar
    Are all of these jars required in the classpath on client side ?
    When we generate a wlfullclient.jar file using "java -jar wljarbuilder.jar" , Does this contain all the other jars ?
    In other words does wlfullclient.jar contain/include rest of the jar's ?
    Thanks,
    Stacy.

    Hi,
    In order to use JMS SAF client, you have the following options:
    1. using wlsafclient.jar and wljmsclient.jar/wlclient.jar together;
    2. using wlfullclient.jar, which contains wljmsclient.jar, wlclient.jar and wljmsclient.jar;
    3. using weblogic.jar, which contains everything.
    You'll get better performance if you use weblogic.jar.
    If you are using a recent release of WebLogic Server, say after 11gR1PS3, you have another option -- use wlthint3cleint and wlsaft3client.jar together. This will also give you better performance compared to option 1 and 2 above.
    -Dongbo

  • WebLogic 10.0 JMS Thin Client and JVM 1.4

    As mentioned in [WebLogic JMS Thin Client|http://download.oracle.com/docs/cd/E11035_01/wls100/client/jms_thin_client.html#wp1026979], it can be used on JVM 1.4 client, but it seems that wljmsclient.jar and wlclient.jar compiled using java 1.5 compiler with no 1.4 compatibility.
    Where can I get a 1.4 complied version of this jars for WebLogic 10 ?
    Edited by: user10385140 on 02.10.2008 2:32

    Hi,
    The doc is correct that the 1.4 JVM is supported for thin 10.0 clients, but note that 1.4 is not supported for 10.3 (the latest version). If you confirm that there's a problem, I recommend contacting customer support. Meanwhile, as a work-around, you can use a client jar from an earlier version (such as 9.2 at the latest MP).
    The latest updated version of the 10.0 client doc is at http://edocs.bea.com/wls/docs100/client/basics.html, the link you provided points to an older version of the edoc.
    You might want to look at using a generated "full client" rather than a thin client unless a smaller jar size is important in your use case. The reasoning is stated in the updated edoc.
    Regards,
    Tom Barnes
    WebLogic JMS Developer Team
    Edited by: TomB on Oct 2, 2008 6:52 AM

  • Subscribe OJMS Message from Java Client ??

    Hi
    I am using Oracle 9iAS (9.0.3) with OJMS as JMS Resource Provider. I could able to publish the messages and MDB's will be able to subscribes the messages.
    How to subscribe the above message from External Java Client.
    Can anybody will provide some sample code.
    Thanks in Advance
    Madhu

    The problem here is how to register JMS destination (topic or queue) in JNDI and then to obtain the initial context where they can be looked up. Then the business is the same for an External Java Client as the code that runs in JSP.
    To do it, you may see the code examples in
    http://www.oracle.com/technology/sample_code/tech/java/jms/index.html
    The second example, "JMS1.1 Domain Unification Sample" which is for 10g, does work for me. I did not try the first example, "JMS Sample Application", which is for oc4j 9.0.2 or higher.

  • PLSQL enqueue -- Java client

    Hi
    Can anyone shed some light on how to enqueue a message using dbms_aq.enqueue() and have a (connected) java client pick it up?
    I have managed to get a java-to-java pub/sub to work - I would like to do this with both a standard and multi-consumer queue.
    Thanks in advance.

    PL/SQL to send a JMS message to the SCO_QUEUE queue
    DECLARE
    Enqueue_options DBMS_AQ.enqueue_options_t;
    Message_properties DBMS_AQ.message_properties_t;
    Message_handle RAW(16);
    User_prop_array SYS.AQ$_JMS_USERPROPARRAY;
    Agent SYS.AQ$_AGENT;
    Header SYS.AQ$_JMS_HEADER;
    Message SYS.AQ$_JMS_TEXT_MESSAGE;
    Message_text VARCHAR2(500);
    BEGIN
    Agent := SYS.AQ$_AGENT('',NULL,0);
    User_prop_array := SYS.AQ$_JMS_USERPROPARRAY();
    Header := SYS.AQ$_JMS_HEADER( Agent, '', 'AQUSER', '', '', '', User_prop_array);
    Message_text := 'Message from score engine '|| TO_CHAR(SYSDATE, 'mm/dd/yyyy hh24:mi:ss');
    Message := SYS.AQ$_JMS_TEXT_MESSAGE(Header, LENGTH(Message_text), Message_text, NULL);
    DBMS_AQ.ENQUEUE(queue_name => 'SCO_QUEUE',
                             Enqueue_options => enqueue_options,
                             Message_properties => message_properties,
                             Payload => message,
                             Msgid => message_handle);
    DBMS_OUTPUT.PUT_LINE('Msgid: ' || message_handle);
    COMMIT;
    END;
    JAVA class to receive message
    public ScoreController() {
    try {
    //Connect to AQ (Oracle's JMS provider)
    QueueConnectionFactory queueConnectionFactory = AQjmsFactory.getQueueConnectionFactory("dax", "v48DEV",
    1521, "thin");
    //Create the queue Connection
    QueueConnection queueConnection = queueConnectionFactory.createQueueConnection("AQUSER", "AQUSER");
    queueConnection.start();
    //Create the Topic Session
    QueueSession queueSession = queueConnection.createQueueSession(true, Session.CLIENT_ACKNOWLEDGE);
    Queue queue = ((AQjmsSession) queueSession).getQueue("AQUSER", "SCO_QUEUE");
    //Create a non-durable Subscriber.
    QueueReceiver receiver = ((AQjmsSession) queueSession).createReceiver(queue);
    //get the next message off the queue
    while (true) {
    System.out.println("Looking for message ");
    TextMessage message = (TextMessage) receiver.receive(1000);
    if (message == null) {
    System.out.println("Gave up, No message found.");
    continue;
    } else {
    message.acknowledge();
    System.out.println("Received request");
    System.out.println("\tTime: " + System.currentTimeMillis() + " ms");
    System.out.println("\tMessage ID: " + message.getJMSMessageID());
    System.out.println("\tCorrel. ID: " + message.getJMSCorrelationID());
    System.out.println("\tReply to: " + message.getJMSReplyTo());
    System.out.println("\tContents: " + message.getText());
    } catch (JMSException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    }

  • Classpath for JMS standalone client

    Hi,
    I observed some problem, when I try to start my JMS client application. If in classpath is oc4j.jar it works, but when I replace oc4j.jar with oc4jclient.jar doesn't
    I notice the message:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/evermind/server/jms/EvermindXAConnectionFactory
    at com.evermind.server.jms.ConnectInfo.getPass(ConnectInfo.java:98)
    at com.evermind.server.jms.EvermindTopicConnectionFactory.createTopicCon
    nection(EvermindTopicConnectionFactory.java:83)
    at sapconnector.MaterialMoverClient.main(MaterialMoverClient.java:52)
    the line no. 52 exactly means:
    TopicConnection connection = factory.createTopicConnection();
    What the OC4J client jar (oc4jclient.jar) is not enough for starting JMS standalone client?
    regards
    Krzysztof

    Hi, thanks for the reply.
    Well, I figured out that problem. It was my jar file. One of the jar file, which is imqjmsra.jar wasn't really the right one and that was giving me the problem. Well, at least that is working not, but I am having new problems.
    Right, I have been trying to make this work for about three days now. The truth is that my standalone JMS does work, when it is running on the same machine where the J2EE Server is located, but I am trying to make my JMS standalone client to connect to J2EE server from different location. Now I am getting connection refused error. Well, I guess I will be keep trying util I get this working.

  • Java client connecting to multiple weblogic instances

    We have a standalone java client JMS application that needs to connect to multiple
    Weblogic instances running in different domains.
    The client works fine when we obtain an initial context to the multiple instances
    without specifying a security principle and password. As soon as we add in this
    information, we get problems: The initial context is still successfully retrieved
    for each of the weblogic instances, but we cannot send JMS messages to destinations
    on one of the Weblogic instances due to a security exception which states that
    there is an 'Invalid Principal'.
    Any advice would be appreciated.

    You should first establish a trust relationship between your Weblogic
    servers:
    http://e-docs.bea.com/wls/docs70/secmanage/domain.html#1171534
    It is very poorly documented since this is a change in the behavior with
    previous versions and should have been in the Release Notes but instead
    is inside the normal documentation.
    --dejan
    jonathan wrote:
    Thanks Arvind, but both JVMs are the same (1.3.1) and there is no jsse stuff in
    the classpath.
    "Arvind Gudipati" <[email protected]> wrote:
    check if yr client's jvm version is the same as server's jvm.. ive noticed
    this problem a few times when i was using client jvm (1.4.x) connecting
    to
    server jvm (1.3.x).. also check if u have any jsse libraries in yr
    classpath.. if so remove 'em
    +arvind
    "Jonathan" <[email protected]> wrote in message
    news:3f2f9f19$[email protected]..
    We have a standalone java client JMS application that needs to connect
    to
    multiple
    Weblogic instances running in different domains.
    The client works fine when we obtain an initial context to the multiple
    instances
    without specifying a security principle and password. As soon as we
    add in
    this
    information, we get problems: The initial context is still successfully
    retrieved
    for each of the weblogic instances, but we cannot send JMS messages
    to
    destinations
    on one of the Weblogic instances due to a security exception which
    states
    that
    there is an 'Invalid Principal'.
    Any advice would be appreciated.

Maybe you are looking for