JMS Connectivity problem
Hi,
On one of our production deployments using Weblogic 10.3.0, we are getting the following exception when trying to connect to a JMS queue on one of the managed server. We are able to access the queues on other managed servers(there are 4 managed servers in all).
javax.naming.NameNotFoundException: Unable to resolve 'weblogic.messaging.dispatcher.S:+<ManagedServerName>+'. Resolved 'weblogic.messaging.dispatcher'; remaining name 'S+:<ManagedServerName>+'
This error message starts coming up after the server has been up for few days. Once this exception comes up, we cannot fetch messages from the JMS queues on the affected managed server. We have a java process that connects to the managed servers and picks up the JMS messages and sends it to external systems. The problem occurs when connecting from this process. I tried to find the queue depth by writing a simple java program that uses a JMS queue browser. The program fails too.
I checked the JNDI tree to find if a binding exists with 'weblogic.messaging.dispatcher.S:+<ManagedServerName>+'. To my surprise, the binding exists. Just wondering what could possibly cause this issue.
My JMS settings are like follows:
I have four JMS servers, each targeted to the corresponding managed server.
I have distributed JMS queues that are targetted onto the cluster.
I have normal JMS queues that are targeted onto the corresponding managed server.
The connection factory is targeted onto the cluster.
The problem happens with my normal JMS queues on one of the managed servers.
Please let me know if I am going wrong with my setup. Note that this issue happens after the server is running for few days. Upon restarting the affected server, I am able to connect to the JMS queues and pick-up messages.
regards,
Anand
Edited by: Anand1982 on Jun 5, 2011 10:51 PM
I can think of two potential reasons why this error might come up. The first is that your WebLogic Cluster might be failing so that JNDI name-space replication between cluster servers has at least partially stopped working. The second is that you're working with multiple domains but there are duplicated names configured between domains. For the former, look for Warnings in your logs and also consult the general documentation for cluster troubleshooting information. As for the latter, consult the best practices section of the JMS configuration guide.
Regards,
Tom
Similar Messages
-
Weblogic jms connection problem
Hi All,
My jms bpel process listening on jms Queue. If I deploy bpel process first time I am not getting any jms connection problem with weblogic , but if redploy I am getting jms conneciton problem. saying
Adapter_start: Jms Adapter started
<2005-12-07 10:19:20,044> <ERROR> <default.collaxa.cube.activation> <JMSAdapter::Inbound> Error whil
e creating managed connection:
<2005-12-07 10:19:20,044> <ERROR> <default.collaxa.cube.activation> <JMSAdapter::Inbound>
ORABPEL-12141
ERRJMS_CONN_FAC_NOT_FOUND.
Unable to instantiate connection factory. JMS adapter was unable to look up the connection factor BP
ELJMS neither through JNDI nor instantiate it as a Java class
Please examine the log file to determine the problem.
at oracle.tip.adapter.jms.JMS.JMSConnectionFactoryFactory.getConnectionFactory(JMSConnection
FactoryFactory.java:156)
at oracle.tip.adapter.jms.JMS.JMSConnectionFactoryFactory.getQueueConnectionFactory(JMSConne
ctionFactoryFactory.java:95)
at oracle.tip.adapter.jms.JMS.JMSConnection.init(JMSConnection.java:143)
at oracle.tip.adapter.jms.JMS.JMSConnection.<init>(JMSConnection.java:102)
at oracle.tip.adapter.jms.JmsManagedConnectionFactory.createConnection(JmsManagedConnectionF
actory.java:355)
at oracle.tip.adapter.jms.JmsManagedConnectionFactory.createDefaultConnection(JmsManagedConn
ectionFactory.java:346)
at oracle.tip.adapter.jms.JmsManagedConnectionFactory.createConnection(JmsManagedConnectionF
actory.java:309)
at oracle.tip.adapter.jms.JmsManagedConnectionFactory.createManagedConnection(JmsManagedConn
ectionFactory.java:99)
at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(Applic
ationConnectionManager.java:564)
at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnection(ConnectionPoolImpl.java:
Work around is I need to restart the BPEL server.
Is there any permanant solution for this, Please suggest.
Thanks,
Srinisrini,
see this thread
JMS Connection
thanks,
-Ng. -
Application Server don't start, because of jms connection problems
Hello All,
i encountered of problems as i try to start the appserver under Linux Debian. This is my log-file.
[#|2006-04-06T17:18:17.293+0200|INFO|sun-appserver-pe8.2|javax.enterprise.tools.launcher|_ThreadID=10;|
/java/sun/appserver/jdk/bin/java
-client
-Xmx512m
-XX:NewRatio=2
-Dcom.sun.aas.defaultLogFile=/java/sun/appserver/domains/domain1/logs/server.log
-Djava.endorsed.dirs=/java/sun/appserver/lib/endorsed
-Djava.security.policy=/java/sun/appserver/domains/domain1/config/server.policy
-Djava.security.auth.login.config=/java/sun/appserver/domains/domain1/config/login.conf
-Dsun.rmi.dgc.server.gcInterval=3600000
-Dsun.rmi.dgc.client.gcInterval=3600000
-Djavax.net.ssl.keyStore=/java/sun/appserver/domains/domain1/config/keystore.jks
-Djavax.net.ssl.trustStore=/java/sun/appserver/domains/domain1/config/cacerts.jks
-Djava.ext.dirs=/java/sun/appserver/jdk/jre/lib/ext:/java/sun/appserver/domains/domain1/lib/ext:/java/sun/appserver/derby/lib
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Djavax.management.builder.initial=com.sun.enterprise.admin.server.core.jmx.AppServerMBeanServerBuilder
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory
-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar
-Dcom.sun.enterprise.taglisteners=jsf-impl.jar
-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
-Dcom.sun.aas.configName=server-config
-Dorg.xml.sax.parser=org.xml.sax.helpers.XMLReaderAdapter
-Ddomain.name=domain1
-Djmx.invoke.getters=true
-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
-Dcom.sun.aas.promptForIdentity=true
-Dorg.xml.sax.driver=com.sun.org.apache.xerces.internal.parsers.SAXParser
-Dcom.sun.aas.instanceRoot=/java/sun/appserver/domains/domain1
-Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
-Dcom.sun.aas.domainName=domain1
-Djava.util.logging.manager=com.sun.enterprise.server.logging.ServerLogManager
-Dproduct.name=Sun-Java-System/Application-Server
-Dcom.sun.enterprise.overrideablejavaxpackages=javax.faces,javax.servlet.jsp.jstl,javax.xml.bind,javax.help
-Dcom.sun.aas.configRoot=/java/sun/appserver/config
-Djava.library.path=/java/sun/appserver/jdk/jre/lib/i386/client:/java/sun/appserver/jdk/jre/lib/i386/client:/java/sun/appserver/jdk/jre/lib/i386:/java/sun/appserver/jdk/jre/../lib/i386:/java/sun/appserver/lib:/usr/lib/lwp:/java/sun/appserver/lib:/usr/lib/lwp:/java/sun/appserver/jdk/jre/lib/i386/client:/java/sun/appserver/jdk/jre/lib/i386:/java/sun/appserver/jdk/jre/../lib/i386:/java/sun/appserver/lib:/java/sun/appserver/lib:/java/sun/appserver/lib:
-Dcom.sun.aas.instanceName=server
-Dcom.sun.aas.processLauncher=SE
-cp
/java/sun/appserver/jdk/lib/tools.jar:/java/sun/appserver/lib/appserv-rt.jar:/java/sun/appserver/lib/j2ee.jar:/java/sun/appserver/lib/activation.jar:/java/sun/appserver/lib/appserv-cmp.jar:/java/sun/appserver/lib/admin-cli.jar:/java/sun/appserver/lib/appserv-admin.jar:/java/sun/appserver/lib/appserv-jstl.jar:/java/sun/appserver/lib/commons-launcher.jar:/java/sun/appserver/lib/commons-logging.jar:/java/sun/appserver/lib/j2ee-svc.jar:/java/sun/appserver/lib/jaxr-api.jar:/java/sun/appserver/lib/jaxr-impl.jar:/java/sun/appserver/lib/jaxrpc-api.jar:/java/sun/appserver/lib/jaxrpc-impl.jar:/java/sun/appserver/lib/dom.jar:/java/sun/appserver/lib/mail.jar:/java/sun/appserver/lib/jax-qname.jar:/java/sun/appserver/lib/relaxngDatatype.jar:/java/sun/appserver/lib/saaj-api.jar:/java/sun/appserver/lib/saaj-impl.jar:/java/sun/appserver/lib/jmxremote.jar:/java/sun/appserver/lib/jmxremote_optional.jar:/java/sun/appserver/lib/jsf-api.jar:/java/sun/appserver/lib/xsdlib.jar:/java/sun/appserver/lib/jsf-impl.jar:/java/sun/appserver/lib/rmissl.jar:/java/sun/appserver/lib/xalan.jar:/java/sun/appserver/lib/xercesImpl.jar:/java/sun/appserver/lib/appserv-upgrade.jar:/java/sun/appserver/lib/appserv-ext.jar:/java/sun/appserver/lib/install/applications/jmsra/imqjmsra.jar:/java/sun/appserver/imq/lib/jaxm-api.jar:/java/sun/appserver/imq/lib/fscontext.jar:/java/sun/appserver/lib/ant/lib/ant.jar
com.sun.enterprise.server.PEMain
start
display|#]
[#|2006-04-06T17:19:18.750+0200|INFO|sun-appserver-pe8.2|javax.enterprise.resource.jms|_ThreadID=10;|JMS5035: Timed out after 60000 milliseconds while trying to verify if the JMS service startup succeeded.|#]
[#|2006-04-06T17:19:18.752+0200|INFO|sun-appserver-pe8.2|javax.enterprise.resource.jms|_ThreadID=10;|JMS5037: Check permissions of MQ instance directory /java/sun/appserver/imq/var/instances|#]
[#|2006-04-06T17:19:18.752+0200|INFO|sun-appserver-pe8.2|javax.enterprise.resource.jms|_ThreadID=10;|JMS5036: More details may be available in the log file for the JMS service broker instance imqbroker. Please refer to the JMS provider documentation for the exact location of this log file.|#]
[#|2006-04-06T17:19:18.752+0200|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.core|_ThreadID=10;|UnknownException during startup. Disable quick startup by setting system property com.sun.enterprise.server.ss.ASQuickStartup to false
com.sun.appserv.server.ServerLifecycleException: [C4003]: Fehler beim Herstellen von Verbindung aufgetreten. - festgestellt java.net.ConnectException: Connection refused
at com.sun.enterprise.jms.JmsProviderLifecycle.checkProviderStartup(JmsProviderLifecycle.java:427)
at com.sun.enterprise.server.ss.ASLazyKernel.startASSocketServices(ASLazyKernel.java:54)
at com.sun.enterprise.server.PEMain.run(PEMain.java:274)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
Caused by: com.sun.messaging.jms.JMSException: [C4003]: Fehler beim Herstellen von Verbindung aufgetreten. - festgestellt java.net.ConnectException: Connection refused
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.getJMSConnectException(ExceptionHandler.java:233)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleConnectException(ExceptionHandler.java:180)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:191)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:116)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:54)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:61)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:102)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnectionOld(ConnectionInitiator.java:291)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:113)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:98)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:613)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:1194)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1949)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:745)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:315)
at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.QueueConnectionImpl.<init>(QueueConnectionImpl.java:32)
at com.sun.messaging.ConnectionFactory.createQueueConnection(ConnectionFactory.java:72)
at com.sun.messaging.jmq.admin.jmsspi.JMSAdminImpl.pingProvider(JMSAdminImpl.java:783)
at com.sun.enterprise.jms.JmsProviderLifecycle.waitForJmsProvider(JmsProviderLifecycle.java:335)
at com.sun.enterprise.jms.JmsProviderLifecycle.checkProviderStartup(JmsProviderLifecycle.java:396)
... 3 more
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:525)
at com.sun.enterprise.server.ss.ASClientSocketImpl.connect(ASClientSocketImpl.java:181)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:171)
... 21 more
|#]
[#|2006-04-06T17:19:18.765+0200|SEVERE|sun-appserver-pe8.2|javax.enterprise.system.core|_ThreadID=10;|Exception while stoppping Lifecycle.
com.sun.appserv.server.ServerLifecycleException: MQ startup failed :[C4003]: Fehler beim Herstellen von Verbindung aufgetreten. - festgestellt java.net.ConnectException: Connection refused
at com.sun.enterprise.jms.JmsProviderLifecycle.checkProviderStartup(JmsProviderLifecycle.java:376)
at com.sun.enterprise.jms.JmsProviderLifecycle.onShutdown(JmsProviderLifecycle.java:445)
at com.sun.enterprise.server.ss.ASLazyKernel.stopLifecycle(ASLazyKernel.java:178)
at com.sun.enterprise.server.ss.ASLazyKernel.stopMQ(ASLazyKernel.java:172)
at com.sun.enterprise.server.ss.ASLazyKernel.exitServer(ASLazyKernel.java:74)
at com.sun.enterprise.server.ss.ASLazyKernel.startASSocketServices(ASLazyKernel.java:67)
at com.sun.enterprise.server.PEMain.run(PEMain.java:274)
at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
|#]
[#|2006-04-06T17:19:18.896+0200|INFO|sun-appserver-pe8.2|javax.enterprise.system.core|_ThreadID=11;|sending notification to server...server|#]
[#|2006-04-06T17:19:18.900+0200|INFO|sun-appserver-pe8.2|javax.enterprise.system.core|_ThreadID=11;|Server shutdown complete.|#]I don't know what's wrong here? I need support, please.
Thank you!
LutzHi Lutz
[C4003]: Fehler beim Herstellen von Verbindung
aufgetreten. - festgestellt
java.net.ConnectException: Connection refused
at
t
com.sun.enterprise.jms.JmsProviderLifecycle.checkProvi
derStartup(JmsProviderLifecycle.java:427)It appears that there is an issue connecting to the MQ broker process.
Is there another process using the MQ broker port [ default 7676, or if you have configured a custom port, check if the custom port is in use]?
Could you post the jms-service element in domain.xml [available under install-dir/domains/domain1/config/domain.xml] and the MQ broker log [available under install-dir/domains/domain1/imq/instances/imqbroker/log/log.txt]?
Could you also try by switching off quick startup by setting the following system property in the java-config element in domain.xml com.sun.enterprise.server.ss.ASQuickStartup to false [This could be done using the admin GUI as documented at http://docs.sun.com/app/docs/doc/819-2554/6n4r8s7u6?a=view]?
Thanks
--Siva. -
JMS Connection Problems (WARNING: [4003])
Hello
I was wondering if anyone can help me out on how to bypass a connection time out.
I receive the following error when trying to connect to a remote machin (+Sun Application Server 9.1+):_
Queue name is jms/OnlineFakturaRequestQueue
25.apr.2008 13:29:14 com.sun.messaging.jms.ra.ResourceAdapter start
INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
25.apr.2008 13:29:35 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
WARNING: [C4003]: Error occurred on connection creation [ast-devmachine:35925]. - cause: java.net.ConnectException: Connection timed out: connect
The server allready got another ConnectionFactory running for another project, so why can't I get connection for the one I've sat up?
Locally (+Sun Application Server 9.1+) the code runs smoothly
Please adviceHello
I was wondering if anyone can help me out on how to bypass a connection time out.
I receive the following error when trying to connect to a remote machin (+Sun Application Server 9.1+):_
Queue name is jms/OnlineFakturaRequestQueue
25.apr.2008 13:29:14 com.sun.messaging.jms.ra.ResourceAdapter start
INFO: MQJMSRA_RA1101: SJSMQ JMS Resource Adapter starting...
25.apr.2008 13:29:35 com.sun.messaging.jmq.jmsclient.ExceptionHandler throwConnectionException
WARNING: [C4003]: Error occurred on connection creation [ast-devmachine:35925]. - cause: java.net.ConnectException: Connection timed out: connect
The server allready got another ConnectionFactory running for another project, so why can't I get connection for the one I've sat up?
Locally (+Sun Application Server 9.1+) the code runs smoothly
Please advice -
Problem with transacted JMS connection factory and transaction timeouts
We encountered an interesting problem using transacted JMS connection factories.
An EJB starts a container managed transaction and tries to validate a credit card
before creating some information to a database for the user, in case of success
an SMS is sent to the user via the transacted JMS queue. If the credit card authentications
duration is about the same as the transactions timeout (in this case the default
30 seconds) sometimes the database inserts is committed but the JMS insert is
rollbacked. How can this be?
If the authorization duration is much longer than 30 seconds everything works
fine (both database and JMS inserts rollbacked), the same is true if a rollback
is insured by calling EJBContext.setRollbackOnly(). The problem thus occurs only
if the duration is approximately the same as the transaction timeout, it appears
that the database insert is not timeouted but the JMS insert is. How can this
be if they are both participating in the same transaction.
The JMSConnectionFactory used is a Connection factory with XA-enabled. The result
is the same also with the default "javax.jms.QueueConnectionFactory" and if we
configure our own factory with user transactions enabled.
Any help appreciated!
Tomas Granö wrote:
> We encountered an interesting problem using transacted JMS connection factories.
> An EJB starts a container managed transaction and tries to validate a credit card
> before creating some information to a database for the user, in case of success
> an SMS is sent to the user via the transacted JMS queue. If the credit card authentications
> duration is about the same as the transactions timeout (in this case the default
> 30 seconds) sometimes the database inserts is committed but the JMS insert is
> rollbacked. How can this be?
It should not be.
>
> If the authorization duration is much longer than 30 seconds everything works
> fine (both database and JMS inserts rollbacked), the same is true if a rollback
> is insured by calling EJBContext.setRollbackOnly(). The problem thus occurs only
> if the duration is approximately the same as the transaction timeout, it appears
> that the database insert is not timeouted but the JMS insert is. How can this
> be if they are both participating in the same transaction.
>
> The JMSConnectionFactory used is a Connection factory with XA-enabled. The result
> is the same also with the default "javax.jms.QueueConnectionFactory" and if we
> configure our own factory with user transactions enabled.
>
> Any help appreciated!
Make sure that your session is not "transacted". In other words,
the first parameter to createSession() must be false. There is an
unfortunate name re-use here. If a session is "transacted", it
maintains an independent "inner transaction" independent of the
outer transaction. From the above description, it seems unlikely
that your application has this wrong, as you say that
"setRollbackOnly" works - but please check anyway.
Make sure that you are using a true XA capable driver and database
(XA "emulation" may not suffice)
Beyond the above, I do not see what can be going wrong. You
may want to try posting to the transactions and jdbc newsgroups. Note
that JMS is appears to be exhibiting the correct behavior, but the
JDBC operation is not. The JDBC operation appears to have
its timeout independent of the transaction monitor's timeout.
Tom
-
Resolving connection problems with JMS
Hi,
we are two students. We're studying JMS and we have some dubts.
If we want to manage connection problems(i.e.: server crashes), how can we manage data recovery?
JMS functionalities are sufficient to fight this problem or not?
Thanks a lot!!!
Help us, please!!!Hi
Depending on the implementation you use (your JMS provider), JMS is more than sufficient. JMS provides several mechanisms for what is known as "guaranteed messaging". One of these is Store-and-Forward, which makes persistent the messages until they are delivered. This can be done using flat files, a database, etc...., up to the JMS provider.
Another mechanism is the message acknowledgments, that are use to know wether a message has been delivered or not.
There is capacity for transactions, too, that if not completed successfully, can be rolled-back. If everything goes OK, they are committed.
For example, if you receive a message in a transaction, and some process of it fails, a rollback makes that the message is never lost (it remains in the queue).
Finally, some vendors implement Dead Letter Queues (DLQ), for storing messages that have beeb underiverable due to some reason.
These mechanism are usually customizable and optional, either in your JMS code, or in the admnistration tools of your JMS provider. -
I am not able to create a JMS connection from a custom component in UCM
I am trying to create a custom component which makes a JMS connection and inserts messages in JMS Queue.
THe JMS server is hosted on Weblogic Application Server.
When the code runs I am getting the factory object and the queue object.
But when I try to get a connection it throws an error as pasted below.
WHen I googled the same error It has shown a simliar problem in TOmcat in sun thread
It said two jar files xerces.jar and xml-apis.jar are obsolete.
I replaced with the new version.
still the same problem occurred
Please help
Pasting the code and exception here
Code __________________________________________
import java.util.Date;
import java.util.Hashtable;
import javax.jms.*;
import javax.naming.*;
import weblogic.jms.client.WLConnectionImpl;
import weblogic.jms.extensions.*;
import javax.rmi.PortableRemoteObject;
public class SimpleProducer {
public static void drive() {
final int NUM_MSGS;
NUM_MSGS = 93;
Context jndiContext = null;
Hashtable<String, String> ht;
ht = new Hashtable<String, String>();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
ht.put(Context.PROVIDER_URL, "t3://punitp52975d:7001");
try {
jndiContext = new InitialContext(ht);
} catch (NamingException e) {
System.out.println("Could not create JNDI API context: " +
e.toString());
System.exit(1);
ConnectionFactory connectionFactory = null;
Destination dest = null;
try {
Object home = jndiContext.lookup("CNFT"); // where iiopTestDS is jndi name for my DataSource.
connectionFactory =(ConnectionFactory)PortableRemoteObject.narrow(home , ConnectionFactory.class);
Object home1 = jndiContext.lookup("QUEUE2"); // where iiopTestDS is jndi name for my DataSource.
dest =(Destination)PortableRemoteObject.narrow(home1 , Destination.class);
/*connectionFactory = (ConnectionFactory) jndiContext.lookup(
"CNFT");
dest = (Destination) jndiContext.lookup("QUEUE2");
System.out.println("connectionFactory,dest "+connectionFactory+dest);*/
} catch (Exception e) {
System.out.println("JNDI API lookup failed: " + e.toString());
e.printStackTrace();
System.exit(1);
//WLConnectionImpl connection = null;
WLConnection connection = null;
WLMessageProducer producer = null;
try {
System.out.println("Getting Connection "+(WLConnection) connectionFactory.createConnection());
//connection = (WLConnection) connectionFactory.createConnection();
System.out.println("Connection created");
WLSession session =
(WLSession) connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
producer = (WLMessageProducer) session.createProducer(dest);
WLMessage message = (WLMessage) session.createTextMessage();
//TextMessage message = session.createTextMessage();
for (int i = 91; i < NUM_MSGS; i++) {
((TextMessage) message).setText("This is message " + (i + 1));
Long l = new Date().getTime();
message.setLongProperty("ReleasedDate",l );
System.out.println("Sending message: " + ((TextMessage) message).getText());
producer.send(message);
producer.send(session.createMessage());
} catch (Exception e) {
System.out.println("Exception occurred: " + e.toString());
} catch (Throwable et) {
System.out.println("Exception occurred: " + et.toString());
et.printStackTrace();
finally {
if (connection != null) {
try {
connection.close();
} catch (Exception e) {
System.out.println("*************Instantiating Producer***************");
Exception_________________________________________________________________
Exception occurred: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:124)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:115)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:143)
at weblogic.xml.jaxp.WebLogicSAXParserFactory.<init>(WebLogicSAXParserFactory.java:62)
at weblogic.rmi.internal.wls.WLSRMIEnvironment.getSAXParser(WLSRMIEnvironment.java:136)
at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:170)
at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:159)
at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:104)
at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
at weblogic.rmi.internal.OIDManager.initializeDGCServer(OIDManager.java:231)
at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:144)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
at weblogic.corba.server.naming.ReferenceHelperImpl.exportObject(ReferenceHelperImpl.java:233)
at weblogic.rmi.extensions.PortableRemoteObject.exportObject(PortableRemoteObject.java:34)
at weblogic.messaging.dispatcher.DispatcherImpl.export(DispatcherImpl.java:85)This is probably related to this other issue http://www.adobeforums.com/webx/.59b7fbab/0.
Jasmin -
How to find out status of JMS Connection ( connected or closed )
Is there a way to find out the status ( connected or closed ) of JMS Connection at any point of time . JMS Connection interface doesn't seem to have any isAlive( ) sort of method ?
I'm using a shared instance JMS Connection and if someone calls connection.close() on this instance the code starts flunking.Crap isn't it! Would also be useful for creating a JMS connection pool, or for testing connections that stay open for time time and may be closed by network problems etc.
I can think of a couple of options (haven't tested them so may be flawed)
1. Extend your vendors QueueConnectionFactory object to return a decorated Connection, which adds an isAlive() method and records internally whether someone has called .close(); This could be tricky if you use JNDI to retrieve the QCF - you'll have to bind your custom QCF and remove the old one. Much easier if you use a bean factory like Spring.
2. You may be able to do this with the underlying vendor's API. If you choose this option put all the vendor specific code in a separate class and abstract it behind an interface. In future if you change to a JMS provider that does not support this feature, you can always change your isAlive() method return true no matter what;
3. Wrap the JMS sender / receiver in an Adapter class. The adapter delegates send / receive methods to the wrapped class, but if it receives a JMS exception will reconnect and try again. A second JMS Exceptions should be thrown back to the client. All your client code sees is a single send / receive method as if it was using a normal JMS sender / receiver. -
Error in looking up the JMS Connection Factory
Hi,
I am using weblogic6.1. I created a JMS Connection factory from administrator
console with the name QueueConnectionFactory..But when i restart the server and
try to look up that factory its giving an NameNotFoundException...This is the
entry of the factory in config.xml
<JMSConnectionFactory JNDIName="QueueConnectionFactory"
Name="QueueConnectionFactory" Targets="myserver"/>
But if i change reapply the target server to myserver from admin console whenever
restart the server it works fine..
I dont know where is the problem..Can u please update me on the problem if u people
have any idea.
The trace of the exceptions i got is as below:
java.rmi.RemoteException: javax.naming.NameNotFoundException: Unable to
resolve QueueConnectionFactory. Resolved
: '' Unresolved:'QueueConnectionFactory' ; remaining name ''
java.rmi.RemoteException: javax.naming.NameNotFoundException: Unable to resolve
QueueConnectionFactory. Resolved: '' Unr
esolved:'QueueConnectionFactory' ; remaining name ''
Thanx
Regards,
Narayan
Hi Zach,
No, I dont think ur interpretation is right..Once the entry corresponding
to JMS Connection Factory is there in config.xml, the server should automatically
bind it at the time of booting.. right. Why should this administrator server come
into the picture.
Thanx
"Zach" <[email protected]> wrote:
>Don't know. Sounds like the admin server is not notifying JMS of the
>changes under certain situations. You might post in the management.console
>newsgroup.
>
>_sjz.
>
>"Narayan" <[email protected]> wrote in message
>news:[email protected]...
>>
>> Hi,
>> I am using weblogic6.1. I created a JMS Connection factory from
>administrator
>> console with the name QueueConnectionFactory..But when i restart the
>server and
>> try to look up that factory its giving an NameNotFoundException...This
>is
>the
>> entry of the factory in config.xml
>>
>> <JMSConnectionFactory JNDIName="QueueConnectionFactory"
>> Name="QueueConnectionFactory" Targets="myserver"/>
>> But if i change reapply the target server to myserver from admin console
>whenever
>> restart the server it works fine..
>> I dont know where is the problem..Can u please update me on the problem
>if
>u people
>> have any idea.
>> The trace of the exceptions i got is as below:
>> ****************
>> java.rmi.RemoteException: javax.naming.NameNotFoundException:
>Unable to
>> resolve QueueConnectionFactory. Resolved
>> : '' Unresolved:'QueueConnectionFactory' ; remaining name ''
>> java.rmi.RemoteException: javax.naming.NameNotFoundException: Unable
>to
>resolve
>> QueueConnectionFactory. Resolved: '' Unr
>> esolved:'QueueConnectionFactory' ; remaining name ''
>>
>> **********************
>>
>> Thanx
>> Regards,
>> Narayan
>>
>>
>
>
-
Why do the number of active JMS connections increase?
<strong>Problem</strong>
- Number of active JMS connections and current JMS messages increases until the Weblogic instances crash with an OutOfMemory exception
<strong>Setup</strong>
- Weblogic v9.2.3, Cluster with 4 Nodes
- A JMS Message is sent from a MDB in Weblogic to a distributed queue which has a member on each of the 4 Weblogic nodes. The session is created as follows session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE), the message delivery mode is set programmatically to persistent and the delivery mode override of the queue setup is set to persistent too
- Standalone JMS client processes: each one is attached to <strong>all</strong> 4 nodes. Each one uses a unique JMS message selector so that we have more than one queue consumer for one queue but every message is exactly dedicated to one queue consumer. We us weblogic.jar for the clients.
- Use of Weblogic auto reconnect feature. JMS client code:
Connection connection = this.connectionFactory.createQueueConnection();
final WLConnection wlconnection = (WLConnection)connection;
wlconnection.setReconnectPolicy(JMSConstants.RECONNECT_POLICY_ALL);
wlconnection.setTotalReconnectPeriodMillis(-1);
wlconnection.setReconnectBlockingMillis(-1);
<strong>Remarks and Questions</strong>
- There are no pending JMS messages which is good
- In our setup, each JMS client is connected to all 4 nodes as the messages are not distributed to all nodes: if a message is put to Queue A but the client is only connected to Queue B, the message is NOT transfered from Queue A to Queue B. We set the parameter "Forward Delay" to 5 seconds with no effects. Is this the normal behavior?
- Not all JMS clients are visible in the Weblogic console under JMS Services -> JMS Servers -> [Server] -> Monitoring -> Active Connections. Which one are visible? Which one are not visible? There are also clients where the number of connections is not zero but stays constant; we know that as several independent clients on different hosts are started and the IP adress is visible in the Weblogic console. Why....?
- What reasons can lead to increasing connections? Is this due to client or server problems? Do we have to acknowledge the message in the onMessage(Message) method of the client JMS consumer? So far as I know, we don't have to.
- Are the increasing number of current messages due to the increasing number of JMS connections?
- May the RECONNECT_POLICY_ALL policy produce this problem?
Any hint is appreciated.
Peter
Edited by: pkeller on 23.10.2008 17:08To answer the question about the forwarding of messages from one queue to another myself: As mentioned at http://forums.bea.com/thread.jspa?threadID=400000611, the forwarding for queues does only work if all queue consumers are attached to the same queue. This means that our setup is OK.
But the main question is still unanswered: why do the number of active JMS connections increase? I forgot to mention that
- all messages arrive at the clients and that no exceptions are visible in the log
- if you kill the client, the connections are still visible in the Weblogic console!?
Please help as this problem is very urgent.
Peter
Edited by: pkeller on 24.10.2008 09:06
Edited by: pkeller on 24.10.2008 09:10 -
Mule, Weblogic and MQ JMS : deadlock problem
Dear Oracle community,
We are hosting our Mule ESB (3.1) application on a Weblogic 10.3 (11g) server and are using IBM Websphere MQ's JMS solution (with libraries version 7.0.1.7).
The problem we are facing is that JMS connections are created by one of Weblogic's worker (thread) and the close() method for those connections are not necessarily called by the same thread.
This is bad because from what I know this behavior is undefined from JMS specification
(see http://docs.oracle.com/cd/E15051_01/wls/docs103/jms/design_best_practices.html#wp1061413 ) and it is a blocker issue in our case because this lead to a deadlock.
Do someone has any idea how to enforce the fact that the same thread do create and close the connection through Weblogic and/or Mule configuration (without re-implementing the connector) ?
Thanks in advance for your help,
Best regards,
Y.
PS : I've already posted this question on Mule ESB's forum : http://forum.mulesoft.org/mulesoft/topics/mule_weblogic_and_mq_jms_deadlock_problem
Edited by: user7428803 on May 14, 2012 2:26 PMI hope you found a solution by now, but as an FYI:
* The JMS specification specifically requires that JMS providers support the ability to call connection.close() and session.close() from an arbitrary thread even when another thread is making calls on these objects. It furthermore goes into some detail about the expected behavior of these calls. The best practices link you cited alludes to this: "The JMS Specification states that multi-threading a session, producer, consumer, or message method results in undefined behavior +except when calling close().+"
* Depending on your use case, you may not need to use Mule to integrate MQ with WebLogic. WebLogic supports a variety of options for integrating MQ directly without the use of third party tooling. See http://download.oracle.com/docs/cd/E17904_01/web.1111/e13727/interop.htm .
Tom -
Can't deploy a jms connection factory
I am getting errors when trying to deploy a jms connection factory. Here is the xml file jms-factories.xml:
<?xml version="1.0" encoding="utf-8"?>
<jms-factories>
<application-name>MyApplicationName</application-name>
<connection-factory>
<connection-factory-type>QueueConnectionFactory</connection-factory-type >
<factory-name>MyQueueConnectionFactory</factory-name>
<context-factory-type>
<link-factory-name>jmsfactory/default/MyConnectionFactory</link-factory-name>
<initial-context-factory>
com.sap.engine.services.jndi.InitialContextFactoryImpl
</initial-context-factory>
<provider-url>localhost</provider-url>
<security-principal>Administrator</security-principal>
</context-factory-type>
</connection-factory>
</jms-factories>
Below is the error:
java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 5215450:com.sap.engine.services.jmsconnector.exceptions.BaseDeploymentException: Class loading error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MyConnectionFactory.
at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:650)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:344)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:638)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sap.engine.services.jmsconnector.container.JmsContainerImpl.loadFactory(JmsContainerImpl.java:1306)
at com.sap.engine.services.jmsconnector.container.JmsContainerImpl.prepareStart(JmsContainerImpl.java:577)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:233)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:193)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:380)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:421)
at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:539)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:171)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:315)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3163)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:674)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:658)
at com.sap.engine.services.jmsconnector.container.JmsManagerImpl.deployJmsResource(JmsManagerImpl.java:281)
at com.sap.engine.services.jmsconnector.command.DeployJmsResource.exec(DeployJmsResource.java:81)
at com.sap.engine.services.shell.processor.environment.CommandBase.exec(CommandBase.java:132)
at com.sap.engine.services.shell.processor.Interpreter.applyLineCommand(Interpreter.java:391)
at com.sap.engine.services.shell.processor.Interpreter.apply(Interpreter.java:150)
at com.sap.engine.services.shell.processor.Shell.work(Shell.java:148)
I am actually trying to do an automated deploy but I kept getting this error so I am trying to manually deploy it with the J2EE Engine Console tool. The command is:
deploy_jms_resource d:\jay\jms-factories.xml
Anybody have any ideas? At the top of the stack trace it mentions Class loading error but it is not the InitialContextFactoryImpl that is causing the problem because if I enter a totally bogus class name I get a nice ClassNotFound exception.Hi Jay,
Which Reference guide do you mean? You find the jms-resources.xsd here: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/55e7d51e-0e01-0010-7b84-a95ee55eadeb">Java Messaging</a>, pages 52-58. -
Error in looking up JMS connection factory in cluster
Hi,
We have setup a JMS connection factory targeted to clustered servers. We currently
have two physical servers defined in the cluster.
When the clustered servers first comes up, we can't see the JMS connection factory
in the JNDI tree of any of the clustered servers. We can see in the server log
that factory is actually being started. Binding to the JNDI tree is not happening.
Through Management console when we move the target of connection factory back
and forth, then the problem is gone.
Any pointers to the problem are welcome.
P.S. We are using WL 7.0.1
Thanks
Nishchit
Hi,
We have setup a JMS connection factory targeted to clustered servers. We currently
have two physical servers defined in the cluster.
When the clustered servers first comes up, we can't see the JMS connection factory
in the JNDI tree of any of the clustered servers. We can see in the server log
that factory is actually being started. Binding to the JNDI tree is not happening.
Through Management console when we move the target of connection factory back
and forth, then the problem is gone.
Any pointers to the problem are welcome.
P.S. We are using WL 7.0.1
Thanks
Nishchit
-
Why do JMS connections stay connected after Flex clients close?
Hello,
I am using AMF_Polling and the JMS Adapter to receive discardable messages on a topic from Fiorano JMS. It works very well except for one thing. When the Flex client goes away because the browser closed, the JMS connection to FIorano is still there. It seems to stay there for a very long time and may never timeout and go away.
Questions:
1. Is this normal behavior for the JMS adapter?
2. Is there a way to force these unused connections to close between the JMS server and the Flex JMS adapter?
3. Is the JMS adapter continuing to receive messages after the Flex client goes away?
4. If so, are messages stacking up in memory which will eventually fill up and cause problems?
Thanks,
Chris Shafer, George Weiss AssociatesTo answer the question about the forwarding of messages from one queue to another myself: As mentioned at http://forums.bea.com/thread.jspa?threadID=400000611, the forwarding for queues does only work if all queue consumers are attached to the same queue. This means that our setup is OK.
But the main question is still unanswered: why do the number of active JMS connections increase? I forgot to mention that
- all messages arrive at the clients and that no exceptions are visible in the log
- if you kill the client, the connections are still visible in the Weblogic console!?
Please help as this problem is very urgent.
Peter
Edited by: pkeller on 24.10.2008 09:06
Edited by: pkeller on 24.10.2008 09:10 -
Producer and Consumer JMS Connections
Hello,
I am writing a JMS provider and I notice that Flex creates a
JMS connection for a Producer and another JMS connection for a
Consumer in my test application. Is this normal behavior for Flex
or do I have a problem with my provider that is causing this?
Thanks,
Chris Shafer, George Weiss AssociatesIf your goal is to have one JMS Consumer which receives
messages and broadcasts them to Flex clients, you can do this
without using the JMS adapter. Write some Java code either as a
"message driven bean" or using the JMS apis directly to grab the
JMS messages. You can then convert these messages to flex messages
and send them to an ActionScriptAdapter flex messaging destination.
See the Feed.java sample for the code necessary to do this. The
trickiest part of this is getting the JMS messages in the first
place. We are working on packaging up our JMS consumer apis so you
can do this more easily in a future release.
Maybe you are looking for
-
Calculation of Depreciation for Group Asset
Hi Experts, I am getting a problem while doing depreciation for group asset Ex: 80,000; Rate 10% total depreiaiton p.a is Rs 8000/- as per the Indian standards if it is below 180 days it should take Rs 4000/-, but in my system it is showing Rs 3333
-
How to add a link on an imported swf movie?
I convert into a button and put this code btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage); function fl_ClickToGoToWebPage(event:MouseEvent):void navigateToURL(new URLRequest("http://www.google.com"), "_blank"); and there is a link but o
-
Profile manager w/o Apple Push Certification
Hello all. Is it possible to use Profile manager without using Apple Push Certification? The Mac Pro running Lion Server has no Internet access but i want to use it to manage network accounts for the lab (all iMac and Mac Mini systems). Can this be d
-
I don't know whether I am barking up the wrong tree so to speak, but I think I am having problems with my Geforce FX 5900 Ultra. I am running a 22" iiayma on the system which is a P4 3.2Ghz with 2Gb RAM. I built it about 6 months ago and it has been
-
Sudden Increase in database size
Hi all, I have noticed sudden increase in sys schema size, after making queries on DBA_TABLESPCAES, DBA_DATA_FILE, DBA_EXTENTS,DBA_SEGMENTS. Does it means Oracle has generated lot of data after queries to these views ? It's very urgent . Please reply