Context.xml for Tomcat using Weblogic JMS
Hello,
has anyone succeeded in getting Tomcat to use a queue hosted by Weblogic? If so, could you please post a snippet of your context.xml with the <Resource>... sections appropriate? My last attempt drowned in a sea of bizarre security exceptions and hasn't been seen since.
Thanks,
Richard
Tom,
I'll see what happens when I move things about, but really, there's a difference here. One of the issues here is that Tomcat needs a class that implements the ReferenceFactory interface for its configuration. I can't find such a class in the Weblogic docs, but I might have it all wrong or be looking in the wrong place. Hence, my question.
The weblogic jar is not in the Tomcat classpath, it's in the WEB-INF/lib directory of the war file I'm working with.
Similar Messages
-
Using WebLogic JMS Wrappers with Spring
Hi,
I was just wondering if anyone used WebLogic JMS wrappers with Spring?
I am using WebLogic configured to have Sonic as my Foreign JNDI Provider. Weblogic provide me with specific entries on the admin console to set information such as the JNDI name of the Sonic Connection Factory. If I specify this JNDI name in the Spring config, and call getConnection() then I will get back a new connection each time.
I don't want this, I want to cache the connection (as connections are expensive in Sonic). This is where the WebLogic JMS wrappers come in, they can handle the pooling for me but the only way I can see to use them is via a resource-ref. It is possible for Spring to get a handle onto these wrappers or should I use Spring's own pooling mechanism instead?
P.S. I've also asked this question on the Spring forum
Thanks for any help
MandyMaybe you have already tried the following:
<beans xmlns:jee="http://www.springframework.org/schema/jee" ... >
<jee:jndi-lookup id="connectionFactory" jndi-name="jms.ConnectionFactory">
<jee:environment>
java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
java.naming.provider.url=t3://localhost:7001
</jee:environment>
</jee:jndi-lookup>
</beans>
an alternative is to use the JNDI template
<beans ... >
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
<prop key="java.naming.provider.url">t3://localhost:7001</prop>
</props>
</property>
</bean>
<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate" ref="jndiTemplate" />
<property name="jndiName"><value>jms.ConnectionFactory</value></property>
</bean>
</beans> -
How to setup the cluster environment for BPM using weblogic
want to setup the cluster environment for BPM using weblogic....
i have installed the oracle weblogic server 10gr3 and oracle BPM enterprise for weblogic 10gR3
i have used the Admin tools from the "oracle BPM enterprise for weblogic" to setup the configuration and create the weblogic domain servers.
i can launch the process administrator and import the project exp file to domain server.
but what should i do to setup cluster environment using weblogic?
what i want to do is :
setup one admin machine..
setup two product machine..
enable the cluster so the admin machine can monitor the status of the product machine..
thanks a lot ...The install guide at http://download-llnw.oracle.com/docs/cd/E13154_01/bpm/docs65/config_guide/index.html gives a reasonable amount of info on how to do this.
Personally I have not used the OBPM option to configure WebLogic instead I've used the information in the above install guide to create the weblogic domain in advance of configuring OBPM.
Once you've setup WebLogic configure OBPM using the values I mention in the following thread: How to set the JMX Engine parameter in Process Administation?
Let me know any specific config questions and I'll do my best to answer them for you.
Thanks,
Mike -
Using Weblogic JMS for internal delivery channel
hi,
I want my B2B to talk to back-end application through Weblogic JMS queues. I have configured internal delivery channel for this. I am getting error message 'Max retry exceeded' in b2b_idc_transport.log
2008.09.24 at 12:09:53:713: B2BStarter thread: (DEBUG) initialize TransportReceiver: [WLIOutbound_TServer < jms > < Wholesale >]
2008.09.24 at 12:09:53:713: B2BStarter thread: (DEBUG) JMSReceiver.init() started ....
2008.09.24 at 12:09:53:713: B2BStarter thread: (DEBUG) Establishing JMS Connection.
2008.09.24 at 12:10:03:704: B2BStarter thread: (DEBUG) Establishing JMS Connection.
2008.09.24 at 12:15:03:428: B2BStarter thread: (ERROR) Max retry exceeded, closing everything
java.lang.Exception: Max retry exceeded
at oracle.tip.transport.basic.jms.JMSMonitor.reconnect(JMSMonitor.java:833)
at oracle.tip.transport.basic.JMSReceiver.init(JMSReceiver.java:333)
at oracle.tip.transport.b2b.B2BTransport.init(B2BTransport.java:379)
at oracle.tip.adapter.b2b.transport.AppTransportInterface.initialize(AppTransportInterface.java:282)
at oracle.tip.adapter.b2b.engine.Engine.initialize(Engine.java:512)
at oracle.tip.adapter.b2b.init.B2BServer.initialize(B2BServer.java:280)
at oracle.tip.adapter.b2b.init.B2BStarter.startB2B(B2BStarter.java:297)
at oracle.tip.adapter.b2b.init.B2BStarter.run(B2BStarter.java:143)
at java.lang.Thread.run(Thread.java:534)
I have applied latest patch 7322333.
kindly let me know what is workaround for this? also, how can do debugging of this issue in B2B.
Thanks in advance.
Regards,
Vaibhav
Edited by: vaibs on Sep 26, 2008 12:15 AMhi Sinkar,
Thanks for reply. I have checked connectivity from b2b server to weblogic server, using java stub. Stub can connect to the Q successfully.
here is my b2b.log
2008.09.24 at 12:09:49:233: main: B2B - (DEBUG) B2B initialize
2008.09.24 at 12:09:49:233: Main thread: B2B - (DEBUG) This is Main thread executing..
2008.09.24 at 12:09:49:233: Main thread: B2B - (DEBUG) B2B start
2008.09.24 at 12:09:49:233: Main thread: B2B - (DEBUG) B2B start - context started
2008.09.24 at 12:09:49:233: B2BStarter thread: B2B - (DEBUG) B2BStarter - This is B2BStarter thread executing..
2008.09.24 at 12:09:49:233: B2BStarter thread: B2B - (DEBUG)
Maximum Heap Size = 530907136
Memory Allocated = 8323072
Free Memory = 842560
2008.09.24 at 12:09:50:544: B2BStarter thread: BusinessLogicLayer - (INFORMATION) ExecutionContextManager initialization is done
2008.09.24 at 12:09:50:544: B2BStarter thread: BusinessLogicLayer - (INFORMATION) User's maxCachedSessions is set to 0
2008.09.24 at 12:09:50:560: B2BStarter thread: B2B - (DEBUG) B2BStarter - Context Initialized
2008.09.24 at 12:09:51:762: B2BStarter thread: B2B - (DEBUG) B2BStarter - Start B2B
2008.09.24 at 12:09:51:762: B2BStarter thread: B2B - (DEBUG) B2BStarter - Starting B2B
2008.09.24 at 12:09:51:762: B2BStarter thread: B2B - (DEBUG) B2BStarter - configuration oained
2008.09.24 at 12:09:51:762: B2BStarter thread: B2B - (DEBUG) B2BStarter - clear global cache
2008.09.24 at 12:09:51:793: B2BStarter thread: B2B - (DEBUG) XEngine not running. So no need to clear cached objects inside XEngine.
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [0] HL7 over MLLP Exchange
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [1] EDI X12 over AS1
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [2] Custom Document over Generic Exchange
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [3] EDI EDIFACT over Generic Exchange
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [4] RosettaNet over RNIF
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [5] EDI X12 over Generic Exchange
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [6] Custom Document over MLLP Exchange
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [7] Custom Document over AS1
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [8] EDI EDIFACT over AS1
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [9] HL7 over Generic Exchange
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (NIFORMATION) Repository:print: [10] Custom Document over Internet
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [11] Custom Document over ebMS
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [12] EDI X12 over Internet
2008.09.24 at 12:09:51:824: B2BStarter thread: B2B - (INFORMATION) Repository:print: [13] EDI EDIFACT over Internet
2008.09.24 at 12:09:51:981: B2BStarter thread: B2B - (DEBUG) Repository:constructCertSQL SELECT cert.ID, cert.CLASSTYPE FROM TIP_Certificate_ra cert, TIP_Party_ra party, TIP_DocumentExchange_ra docex WHERE cert.ID = docex.signingcredential AND cert.tradingpartner = party.ID AND party.ishosted != 'Y'
2008.09.24 at 12:09:52:355: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.exchange.ebms.EBMSExchangePlugin:initialize Enter
2008.09.24 at 12:09:52:355: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.exchange.ebms.EBMSExchangePlugin:header name: ebXML SOAP Envelope
2008.09.24 at 12:09:52:355: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.exchange.ebms.EBMSExchangePlugin:header name: ebXML SOAP Message Header
2008.09.24 at 12:09:52:386: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.exchange.ebms.EBMSExchangePlugin:initialize Exit
2008.09.24 at 12:09:52:402: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.document.custom.CustomDocumentPlugin:initialize Enter
2008.09.24 at 12:09:52:433: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.document.custom.CustomDocumentPlugin:initialize Exit
2008.09.24 at 12:09:52:511: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize Enter
2008.09.24 at 12:09:52:511: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize resetListener = true
2008.09.24 at 12:09:52:511: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize initdcx = true
2008.09.24 at 12:09:52:543: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize initialize TPAProcessor
2008.09.24 at 12:09:52:558: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize Clear TPA Cache
2008.09.24 at 12:09:52:558: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize initialize DataContext. Pool Size 0
2008.09.24 at 12:09:52:574: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:initialize Treat Response as Request = false
2008.09.24 at 12:09:52:574: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:initialize Exit
2008.09.24 at 12:09:52:574: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize initialize Transport
2008.09.24 at 12:09:52:574: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.TransportInterface:initialize Initialize Transport Logger.
2008.09.24 at 12:09:52:574: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.TransportInterface:initialize Transport LogLevel = STATUS
2008.09.24 at 12:09:52:605: B2BStarter thread: B2B - (INFORMATION) Repository:getDeliveryEndPointList: Putting http://localhost
2008.09.24 at 12:09:52:605: B2BStarter thread: B2B - (INFORMATION) oracle.tip.adapter.b2b.transport.TransportInterface:initialize: Props: http://localhost port = 7777
PROTOCOL_ENDPOINT = null
2008.09.24 at 12:09:52:636: B2BStarter thread: B2B - (DEBUG) initialize TransportReceiver: [Wholesale_Transport_Server < http > < Wholesale >]
2008.09.24 at 12:09:53:682: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.AppTransportInterface:initialize Initialize AppTransport Logger.
2008.09.24 at 12:09:53:682: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.AppTransportInterface:initialize AppTransport LogLevel = WARNING
2008.09.24 at 12:09:53:698: B2BStarter thread: B2B - (INFORMATION) Repository:getInternalDeliveryEndPointList: Putting jms://[email protected]
2008.09.24 at 12:09:53:698: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.AppTransportInterface:initialize main Endpoint loop jms://[email protected]
2008.09.24 at 12:09:53:698: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.AppTransportInterface:initialize looping through transport Endpoint: jms://[email protected]
2008.09.24 at 12:09:53:698: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.transport.AppTransportInterface:initialize add jms transport Endpoint: jms://[email protected] {Destination Provider Properties=java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory;java.naming.provider.url=t3://10.76.168.156:7010, jms.receiver.destination_password=weblogic, Connection Factory Location=weblogic.jws.jms.QueueConnectionFactory, jms.receiver.jndi_connection_factory_location=weblogic.jws.jms.QueueConnectionFactory, isTopic=false, Message Type=bytes, jms.receiver.is_topic=false, jms.receiver.factory_provider_properties=java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory;java.naming.provider.url=t3://10.76.168.156:7010, transport_callout_waittime=30, jms.receiver.jndi_destination_provider_properties=java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory;java.naming.provider.url=t3://10.76.168.156:7010, jms.receiver.polling_interval=10, polling_interval=10, Factory Provider Properties=java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory;java.naming.provider.url=t3://10.76.168.156:7010, jms.receiver.jndi_destination_location=[email protected], jms.receiver.destination_username=weblogic}
2008.09.24 at 12:09:53:713: B2BStarter thread: B2B - (DEBUG) initialize TransportReceiver: [WLIOutbound_TServer < jms > < Wholesale >]
2008.09.24 at 12:35:52:276: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:startListen Enter
2008.09.24 at 12:35:52:276: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:startListen Exit
2008.09.24 at 12:35:52:276: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:run Thread start
2008.09.24 at 12:35:52:276: B2BStarter thread: B2B - (DEBUG) oracle.tip.adapter.b2b.engine.Engine:initialize Exit
2008.09.24 at 12:35:52:276: B2BStarter thread: B2B - (DEBUG) B2BStarter - B2B initialized
2008.09.24 at 12:35:52:884: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:run initialize Enter
2008.09.24 at 12:35:53:087: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:run initialize B2BListen turned off, will not listen on IP_OUT_QUEUE for messages
2008.09.24 at 12:35:53:087: Thread-10: B2B - (DEBUG) oracle.tip.adapter.b2b.data.MsgListener:run start listening on message
Thanks,
Vaibhav
Edited by: vaibs on Sep 28, 2008 3:20 AM -
Using Weblogic jms message id for unique id
Hi All,
We have a requirement to generate random unique id for each message processed by the application. We are planning to leverage weblogic jms message id for this purpose rather than building our own application logic for this purpose . Will there be any issue adopting this ? We think weblogic jms message id will be unique across the cluster as id is a hash of current timestamp + jms server name + wl server name + ?? .. is this correct ?
TIA
AtheekHi Atheek,
It depends on what are you planning to do with that id, as there are some gotchas on Weblogic's JMSMessageID generation.
I guess the msg id could be considered statiscaly unique as Tom says, but the msg id will change during the livecycle of your message, surprise! (yea, the JMS spec allows the JMS server to modify the msg ids).
So if you want to use that id to correlate messages id, or to group info related to one message, using JMSMessageID could be a problem.
You can consider to generate a UUID, using Java 1.5 support (java.util.UUID) or a external library (JUG http://jug.safehaus.org for instance), and attach that id as a JMSCorrelationId or a user defined property.
Hope this helps -
Message EJB using Weblogic JMS Server
Hi,
I trying get some working logic about using JMS with weblogic. I have created a JMS Server instance with all the necessary Connection Factories and Destinations. I am able to connect to from a normal Java class, but i want to deploy a message driven ejb in weblogic and connect to the same JMS Server instance. When i deploy my EJB i get an error about unable to connect to the JMS Server in the weblogic.log . Could any please refer me to any resourcce that may help me.
Thanks, i got it sorted out.
Tom Barnes <[email protected]> wrote:
>Unless you're descriptors make use of the weblogic extensions to specify
>the jndi URL, make sure that the MDB and the JMS Server instance are
>either
>both located on the same WL server or are both in the same cluster.
>
>If this doesn't help, please post the stack trace for you're error
>and attach your config.xml and MDB descriptor xml.
>
>Tom
>
>Riaan Minne wrote:
>
>> Hi,
>>
>> I trying get some working logic about using JMS with weblogic. I have
>created a JMS Server instance with all the necessary Connection Factories
>and Destinations. I am able to connect to from a normal Java class,
>but i want to deploy a message driven ejb in weblogic and connect to
>the same JMS Server instance. When i deploy my EJB i get an error about
>unable to connect to the JMS Server in the weblogic.log . Could any
>please refer me to any resourcce that may help me.
>
-
About setting the web.xml for Tomcat
for a project, I use more than one servlet. So i set the
<servlet>
<servlet-name>servlet1</servlet-name>
<servlet-class>servlet1</servlet-class>
<servlet-name>servlet2</servlet-name>
<servlet-class>servlet2</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>servlet1</servlet-name>
<url-pattern>/servlet1</url-pattern>
<servlet-name>servlet2</servlet-name>
<url-pattern>/servlet2</url-pattern>
<servlet-mapping>
but only the last servlet is there for the web server to find and call. I don't know what's the problem. Maybe I don't set other parameters in some files of Tomcat?
Thanks for your reply.<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
This is the web-app configurations that allow w3prj to work under
Apache Tomcat.
-->
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
<web-app>
<servlet>
<servlet-name>JDBC</servlet-name>
<servlet-class>TestServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>LoginServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>worker</servlet-name>
<servlet-class>workerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JDBC</servlet-name>
<url-pattern>/TestServlet</url-pattern>
<servlet-name>login</servlet-name>
<url-pattern>/LoginServlet</url-pattern>
<servlet-name>worker</servlet-name>
<url-pattern>/worker</url-pattern>
</servlet-mapping>
</web-app> -
CMT and using non-Weblogic JMS in a session bean
I am writing a session bean which sends a JMS message using a non-weblogic JMS
provider. This bean is marked for CMT and I want the JMS send to participate in
this CMT as well. My understanding is that I should be able to do this by defining
a <resource-ref> element in the ejb-jar.xml and a corresponding <resource-descriptor>
element in the weblogic-ejb-jar.xml file. The bean would then use the <res-ref-name>
defined under the <resource-ref> element to lookup the connection factory. What
do I have to put in weblogic-ejb-jar.xml file to make sure that the connection
factory specified in <res-ref-name> maps to a connection factory that is in a
foreign JNDI provider (e.g. in the non-Weblogic JMS provider's JNDI) and not in
Weblogic's JNDI?
Thanks in advance for your help.
It sounds like you're using Tibco JMS to receive messages from the MDB, and
then to send out a message. WLS 7.0 will handle the transaction enlistment
properly when it receives messages for the MDB, but you'll have to enlist
the JMS provider yourself when you send the message, using the white paper
that Tom pointed you to as a guide.
In WLS 8.1, coming soon, we'll automatically enlist the provider in the
transaction if you look it up using a "resource-ref" element in the EJB like
you described. Today, you can use that element but no transaction
enlistement is being done.
greg
"Venkat" <[email protected]> wrote in message
news:[email protected]...
>
> We also need this feature.
> We are using Weblogic 7.0 and Tibco JMS 3.0,
> which supports XA.
>
> We are mainly interested in subscribing using MDB
> and publishing using a session bean in one transaction.
> Do you think by using resource-refs in conjunction
> with registering with Weblogic JNDI during startup
> can do the job?
>
> Or how about using XAConnectionFactory and XASession
> classes for JMS publishing ?
>
> Thanks.
>
> Tom Barnes <[email protected]> wrote:
> >Hi Mihir,
> >
> >Support for automatic enlistment of foreign JMS vendors
> >via the resource-ref approach is not available in WLS.
> >This support will be available in the next release:
> >limited access beta is available now, public beta is available
> >in 2-3 months. You are the first customer I've heard of that
> >asked for this feature. Very cool. Good timing.
> >
> >As you are not using WebLogic JMS, you will need to do the
> >transaction enlistment yourself. This isn't that hard
> >to do. I suggest that you refer to the integrating foreign
> >JMS vendor white-paper available on dev2dev.bea.com.
> >Also, refer to the integrating transactions with
> >MQSeries integration paper, which will likely serve your
> >purposes better. Note that some JMS vendors
> >have problems with concurrent transactions in a single
> >JMS connection, or with transactions that attempt
> >to switch threads (eg. suspend() in one thread
> >and resume() in another).
> >
>
>http://dev2dev.bea.com/resourcelibrary/whitepapersdetail.jsp?highlight=whit
epapers&filePath=components%2Fdev2dev%2Fresourcelibrary%2Fwhitepapers%2Fwp_j
msproviders.htm
>
>http://dev2dev.bea.com/resourcelibrary/whitepapersdetail.jsp?highlight=whit
epapers&filePath=components%2Fdev2dev%2Fresourcelibrary%2Fwhitepapers%2Fwp_j
tatransactions.htm
> >
> >Tom
> >
> >mihir sharma wrote:
> >> I am writing a session bean which sends a JMS message using a
non-weblogic
> >JMS
> >> provider. This bean is marked for CMT and I want the JMS send to
participate
> >in
> >> this CMT as well. My understanding is that I should be able to do this
> >by defining
> >> a <resource-ref> element in the ejb-jar.xml and a corresponding
<resource-descriptor>
> >> element in the weblogic-ejb-jar.xml file. The bean would then use the
> ><res-ref-name>
> >> defined under the <resource-ref> element to lookup the connection
factory.
> >What
> >> do I have to put in weblogic-ejb-jar.xml file to make sure that the
> >connection
> >> factory specified in <res-ref-name> maps to a connection factory that
> >is in a
> >> foreign JNDI provider (e.g. in the non-Weblogic JMS provider's JNDI)
> >and not in
> >> Weblogic's JNDI?
> >>
> >> Thanks in advance for your help.
> >>
> >
>
-
hi weblogic users,
i have a problem in sending jms messages
across two different weblogic host/domain.
the configuration is:
jms client:
-JAX-WS webservice web app
-deployed in WebLogic Server Version: 10.3.1.0
-host: 192.168.30.133:7011
-domain: ChSoaAdminServer1
-can access server's console: http://192.168.1.22:6001/console
server:
-jms server, jms module, cf, queue configured
with subdeployment targeted to the jmsserver
-deployed in WebLogic Server Version: 10.3.2.0
-host: 192.168.1.22:6001
-domain: soa_domain
-cannot access client's console: http://192.168.30.133:7011/console
i use standard lookup method in my java client code:
String settingJmsServer="t3://192.168.1.22:6001";
String settingCF="jms/adminduk/cf";
String settingQueue="jms/adminduk/queue/central";
env=new Hashtable();
env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
env.put(Context.PROVIDER_URL, settingJmsServer);
ctx = new InitialContext( env );
System.out.println("-- Destination");
ds = (Destination) ctx.lookup(settingQueue);
System.out.println("-- ConnectionFactory");
cf = (ConnectionFactory) ctx.lookup(settingCF);
but it's getting exception
when looking up the connection factory (look at the bottom of my post):
ok now, how to solve this problem?
-i tried to change the server to another host with WL 10.3.1.0 installed (so
it's the same version with the client) and its ok (receiving messages)
-i tried to deploy the WS client to the same host as the jms (WL 10.3.2.0), so no
remote lookup needed (java lookup code adjusted), it's ok
-based on the stack trace:
"Could not find dynamically generated class:
'weblogic.jms.frontend.FEConnectionFactoryImpl_1032_WLStub
(class not found) ..."
-does it mean do i've to use the same version of WL installed in the client side ??
-is WL 10.3.2.0 compatible with WL 10.3.1.0 ?
-is it possible to use a different version of weblogic (in the client/server)
in using the jms feature ?
-do the jms server must have access to client's port (7011) for it to work ?
thanks,
any info/hints/helps will be appreciated :)
---------- start error ---------
####<Mar 23, 2010 4:24:51 PM ICT> <Error> <com.sun.xml.ws.server.sei.EndpointMethodHandler>
<coolpie> <ChSoaAdminServer1> <[ACTIVE] ExecuteThread: '1' for queue:
'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1269336291921> <BEA-000000>
<***** ASSERTION FAILED *****[ Could not find dynamically generated class:
'weblogic.jms.frontend.FEConnectionFactoryImpl_1032_WLStub' ]
weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Could not find dynamically
generated class: 'weblogic.jms.frontend.FEConnectionFactoryImpl_1032_WLStub' ]
at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:78)
at weblogic.rmi.internal.StubGenerator.hotCodeGenClass(StubGenerator.java:775)
at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:759)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:779)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:74)
at weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:213)
at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:207)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
weblogic.jms.client.JMSConnectionFactory.readExternal(JMSConnectionFactory.java:382)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
at
weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1031_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:400)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:388)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:194)
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:388)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at siak.model.MessageManager.init(MessageManager.java:101)
at siak.ws.SiakWS.sendEvent(SiakWS.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:101)
at
weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:83)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:152)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:264)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:249)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:453)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:250)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:140)
at
weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:298)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:211)
at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:297)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java
:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletConte
xt.java:3588)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
java.lang.ClassNotFoundException: weblogic.jms.frontend.FEConnectionFactoryImpl_1032_WLStub
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:55)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:36)
at
weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:100)
at
weblogic.wsee.util.JAXWSClassLoaderFactory$1.findClass(JAXWSClassLoaderFactory.java:45)
at
weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:85)
at
weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:80)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
weblogic.utils.classloaders.GenericClassLoader.defineCodeGenClass(GenericClassLoader.java:516
at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:73)
at weblogic.rmi.internal.StubGenerator.hotCodeGenClass(StubGenerator.java:775)
at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:759)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:779)
at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:74)
at weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:213)
at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:207)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
weblogic.jms.client.JMSConnectionFactory.readExternal(JMSConnectionFactory.java:382)
at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at
weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
at
weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1031_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:400)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:388)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at
weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:194)
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:388)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at siak.model.MessageManager.init(MessageManager.java:101)
at siak.ws.SiakWS.sendEvent(SiakWS.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:101)
at
weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:83)
at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:152)
at
com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:264)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:93)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:604)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:563)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:548)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:445)
at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:249)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:453)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:250)
at
com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:140)
at
weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:298)
at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:211)
at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:297)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java
:227)
at
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletConte
xt.java:3588)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
---------- end error ---------1 - A class-not-found is an odd exception to get on a server. Did you perhaps try to add client-only jars to the server classpath? The server classpath is already setup properly to act as a client.
2 - Its usually not a good practice to create contexts in client code (instead of simply using the Servlet context in your case), or to hard code URLs, dests, and CF references into the code. It works, but can be hard to maintain and inefficient.
3 - See:
[ Enhanced Support for Using WebLogic JMS with EJBs and Servlets | http://download.oracle.com/docs/cd/E15523_01/web.1111/e13727/j2ee.htm#g1329180 ]
and
[ Integrating Remote JMS Providers | http://download.oracle.com/docs/cd/E15523_01/web.1111/e13727/interop.htm#JMSPG553 ]
and the cross-domain advice in
[ Integration and Multi-Domain Best Practices |
http://download.oracle.com/docs/cd/E15523_01/web.1111/e13738/best_practice.htm#CACFBCHB ]
Hope this helps,
Tom -
When to use a JMS Bridge and when to use a Proxy
Hi,
We currently are running an OSB with most connections coming in via MQ to a JMS queue. We've been asked to implement a JMS Bridge.
Wen using a messaging bridge to a foreign provider, the documentation recommends using the Foreign JMS option to simplify the creation of bridge destinations anyway.
The key difference with using the bridge, is that you remove responsibility for the network transfer of messages from OSB's proxy and give it to the bridge. However, this now means that the messages are stored in WebLogic JMS with all the implications that brings. Is that really what you want? Isn't the whole point of MQ to be your reliable messaging service and not to use WebLogic JMS instead/as well?
But the Solutions design team mention
Without bridge
MQ >--------Receive -------->---------Send ---------> JMS
| ....... Transaction 1 ....| .....Transaction 2 ......|
With bridge
MQ >--------Receive -------->---------Send ---------> JMS
| ....... ............Transaction 1 .......... ......|
Is this true, so we have to use a bridge?I think your solution design team is wrong..
MQ --> OSB Proxy Receive ---> OSB Proxy Send --> JMS will be a single XA transaction.
An OSB proxy is preferred in this case for the following reasons:
1. Don't use bridge for receiving messages . Bridge should be used rather for sending messages to non highly available remote messaing providers. Even for this case weblogic recommends SAF .
2. Whatever the savings on transaction as mentioned by your design team doesn't appears to be correct.
3. Weblogic messaging bridge appears to be a buggy product. You will have to apply a couple of patches to make the bridge to work as expected. It will take some time to stabilise it in a production environment. Weblogic's EJB container is much stable and with MDB's it would be less prone to bugs. This is from my personal experience. Others might have a different experience.
4. You can leverage the out of box monitoring facilities provided by OSB. This can give you stats of how many messages were transferred between MQ and JMS, average & max response time etc. -
Problem in Interacting with Weblogic JMS through Informatica ETL server
Hi All,
We are trying to configure Informatica PowerCenter server to interact with JMS queues created on Weblogic 11gR1 server. We have copied the necessary
jar file - wlfullclient.jar to the classpath of the Informatica server.
Now when i try to read contents of a JMS queue created on Weblogic server through Informatica, i get this error:-
Failed to get the Queue Connection Factory [weblogic.jms.common.DestinationImpl]. Reason: Failed to look up object [While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'. Resolved 'weblogic.jms'Exception Stack: javax.naming.NameNotFoundException: While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'. Resolved 'weblogic.jms' [Root exception is javax.naming.NameNotFoundException: While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'. Resolved 'weblogic.jms']; remaining name 'common/DestinationImpl'
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:464)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:272)
at weblogic.jndi.internal.ServerNamingNode_1211_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:418)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.informatica.powerconnect.jms.server.common.JNDIConnection.getJNDIObject(JNDIConnection.java:84)
at com.informatica.powerconnect.jms.server.common.PlginJMSConnection$PlginJMSQueueConnection.createConnection(PlginJMSConnection.java:363)
at com.informatica.powerconnect.jms.server.common.PlginJMSConnection.<init>(PlginJMSConnection.java:90)
at com.informatica.powerconnect.jms.server.common.PlginJMSConnection$PlginJMSQueueConnection.<init>(PlginJMSConnection.java:352)
at com.informatica.powerconnect.jms.server.common.PlginJMSConnection.create(PlginJMSConnection.java:115)
at com.informatica.powerconnect.jms.server.reader.JMSReaderSQDriver.createPartitionDriver(JMSReaderSQDriver.java:557)
Caused by: javax.naming.NameNotFoundException: While trying to lookup 'weblogic.jms.common.DestinationImpl' didn't find subcontext 'common'
I have checked that this class file exists in the above said location :- "weblogic/jms/common/DestinationImpl.class" within the wlfullclient.jar but still the
code is not able to access the class. Similar error came initially while doing JNDI connection using "weblogic.jndi.WLInitialContextFactory" class but it vanished,
when i explicitly named the jar file on classpth, instead of just the folder containing the jar file.
To all the users/experts/moderators of Weblogic - Could you please help me understand why Weblogic is not able to look up subcontext 'common'
for the class - "weblogic.jms.common.DestinationImpl" ??
Thanks & Regards
Raj
Edited by: user8931188 on May 17, 2012 7:39 AMYou are experiencing a NameNotFoundException, not ClassNotFoundException so it seems there is something wrong about the client connection code or WebLogic config.
Can you share your client connection connection config/code? -
Any kind of integration experience with Weblogic JMS and Oracle AQ?
Hi,
In my company I work with java developers who believe in some kind of "holly" database independence I don't understand and as a result my life as a database developer is hell on earth.. Yesterday we again started to discuss, this time where to log, they believe database is slow and prefer logging to filesystem, after some hours finally I could convince them for some operational and reporting needs to use the database and will do this in an asyncronous way whiich they won't get slow. After all I believe the reason for a database is data, this is the place where data lives, and with the correct desing and implementation logging to database would perform better.
I love Oracle features, and know that we paid a lot for this software, so today I started investigating this promised solution. And quickly I found AQ and JMS topics in the documentation :)
After this introduction here is my problem; my company use BEA Weblogic as application server and the java guys want AQ to automatically (but of course with some delay) take their JMS log requests into database tables. Does any one have similar application experience, or any kind of integration experience with Weblogic JMS and Oracle AQ?
Any comments, references, documentation, sample code, url will be most welcomed :)
Thank you very much!
Tonguc
[email protected]
References I found upto now;
Oracle® Streams Advanced Queuing Java API Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14291/toc.htm
(Packages; javax.jms & oracle.jms)
Oracle® Streams Advanced Queuing User's Guide and Reference 10g Release 2 (10.2) http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14257/toc.htm
Part IV
Using Oracle JMS and Oracle Streams AQPart V describes how to use Oracle JMS and Oracle Streams Advanced Queuing (AQ).
Chapter 11, "Introducing Oracle JMS"
Chapter 12, "Oracle JMS Basic Operations"
Chapter 13, "Oracle JMS Point-to-Point"
Chapter 14, "Oracle JMS Publish/Subscribe"
Chapter 15, "Oracle JMS Shared Interfaces"
Chapter 16, "Oracle JMS Types Examples"
A Sample Code from Otn
http://www.oracle.com/technology/sample_code/tech/java/web_services/jmsws/NewsQueueEJB.java.htmlI wouldn't go as far to say Oracle AQ is out-dated today. However, it is indeed a proprietary technology that did not found much main-stream adoption in the earlier years after its introduction. The advent of JMS made it somewhat more useful (or should I say intriguing, because more people are trying to tie it together with other J2EE technologies), but the Oracle's JMS wrapper classes in aqapi.jar were not feature complete for a long while, so using it outside Oracle's application server was painful, if not impossible. I do agree that the info at the dev2dev's JMS newsgroup or in this forum is highly fragmented, as neither Oracle nor BEA provides an official solution to integrate AQ with WebLogic, so people like us have to learn the technology through experimentation and in a piecemeal fashion.
3 years ago I was literally "playing around" - we had a polling mechanism set up to use triggers to write Oracle data changes into an event table, and had a Java-based daemon to scan that table and publish events as JMS messages to the WebLogic JMS server. This continues to work reliably till today, but I was looking for a solution that has few parts - I wanted to hook up my WebLogic MDB directly to AQ as a foreign JMS provider. Although I was able to get it to work (including XA), there were a few hoops I had to jump through, such as decompiling the Oracle AQjms classes to make them bind to the WebLogic JNDI tree.
One year after that Diptanshu Parui took what I did a giant step further - he extended the Oracle AQjms classes to allow them to be bound to the WebLogic JNDI tree naturally, and he figured out how to use WebLogic JMS messging bridge to re-send single-threaded AQ JMS messages to clustered JMS queues, which allow concurrent message assumption by multiple instances of MDB's. My impression is that he is using that setup in a production environment.
I am sure you are aware of it but I would like to make it clear - in order to use AQ as a foreign JMS provider to WebLogic-hosted MDB's, you don't need to update your database to Oracle 10g - Oracle 8i is good enough (although I recommend at least 9i Release 2). It is not the database engine, but rather the aqapi.jar JMS wrapper on top of AQ that matters. I do recommend that you use aqapi.jar from Oracle Application Server 10.0.3 or up for better XA support, among other things. Again, you don't have to replace WebLogic with Oracle AS - you only need a single jar file from it and put it in your WebLogic's classpath. However, I don't know what this means from a licensing point of view if you ever go to production - do you have to pay the full price of OracleAS or OC4J just to use the aqapi.jar?
In the coming days I will test the latest aqapi.jar to see how much progress Oracle has made in terms of making their J2EE products more spec-compliant :-).
Hope the above gives you a different perspective.
Eric -
ClassNotFoundException for initial-context-factory using foreign JMS p.
Hi,
I am currently working on migrating an application from weblogic 9 to weblogic 10 and I bumped into this issue while MDB connecting to JMS.
[Loaded cz.jaksky.riskscenario.beans.RiskScenarioServiceLocalHome from file:/C:/SVN/app-WLS10-FRESH/app-deploy/servers/myserver/tmp/_WL_user/performance/nyubkw/point-interfaces.jar]
<17-Sep-2012 11:01:27 o'clock CEST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: PerformanceAsyncRequestBean is unable to connect to the JMS destination: wls.AsyncQueue. The Error was:
javax.naming.NoInitialContextException: Cannot instantiate class: cz.jaksky.common.jms.JMSInitialContextFactory [Root exception is java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:182)
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at weblogic.jms.common.CDS$2.run(CDS.java:486)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)
at weblogic.jms.common.CDS.lookupDestination(CDS.java:480)
at weblogic.jms.common.CDS.lookupDDAndCalloutListener(CDS.java:345)
at weblogic.jms.common.CDS.access$100(CDS.java:41)
at weblogic.jms.common.CDS$DDListenerRegistrationTimerListener.timerExpired(CDS.java:193)
at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: java.lang.ClassNotFoundException: cz.jaksky.common.jms.JMSInitialContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
... 23 more
I am using foreign JMS provider with provided mapping. Config follows:
ejb-jar.xml:
<enterprise-beans>
<message-driven>
<ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
<ejb-class>cz.jaksky.common.async.AsynchronousRequestMessageBean</ejb-class>
<transaction-type>Bean</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
<subscription-durability>Durable</subscription-durability>
</message-driven-destination>
<message-selector>
<![CDATA[ Service IN ('PortfolioRetriever')
AND MessageType = 'request'
AND BigBox = FALSE
]]>
</message-selector>
</message-driven>
</enterprise-beans>
weblogic-ejb-jar.xml:
<weblogic-enterprise-bean>
<ejb-name>PortfolioRetrieverAsyncRequestBean</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>64</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>wls.AsyncQueue</destination-jndi-name>
<initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
<connection-factory-jndi-name>ServiceLocatorAsyncQueueFactory</connection-factory-jndi-name>
</message-driven-descriptor>
<dispatch-policy>PortfolioAsyncQueueWorkManager</dispatch-policy>
</weblogic-enterprise-bean>
jmsconfig-jms.xml
<foreign-server name="TibjmsAsyncServer">
<default-targeting-enabled>true</default-targeting-enabled>
<foreign-destination name="AsyncQueue.LOCAL.prgdwm355410.7001">
<local-jndi-name>wls.AsyncQueue</local-jndi-name>
<remote-jndi-name>AsyncQueue.LOCAL.prgdwm355410.7001</remote-jndi-name>
</foreign-destination>
<foreign-connection-factory name="FTQueueConnectionFactory">
<local-jndi-name>ServiceLocatorAsyncQueueFactory</local-jndi-name>
<remote-jndi-name>FTQueueConnectionFactory</remote-jndi-name>
</foreign-connection-factory>
<initial-context-factory>cz.jaksky.common.jms.JMSInitialContextFactory</initial-context-factory>
<connection-url>tcp://JUSD-FTPOIA.jaksky.com:22542,tcp://JUSD-FTPOB.jaksky.com:22543</connection-url>
</foreign-server>
Module containing this MDB is packed as an ear file with following structure:
APP-INF/lib/modules.jar - contains AsynchronousRequestMessageBean class
APP-INF/lib/interface.jar - contains JMSInitialContextFactory (class used for initial-context-factory)
portfolio-async.jar
META-INF/ejb-jar.xml content pasted above
META-INF/webogic-ejb-jar.xml content pasted above
Weblogic system classpath doesn't contain any application sepcific libraries.
This set up was working for weblogic 9 without any problem. I am just wondering what the problem is whether I am faceing class loading issue or JMS configuration issue and how to resolve it.
Edited by: user13047709 on 18-Sep-2012 07:15
Edited by: user13047709 on 18-Sep-2012 07:16Hi,
When working with a non-WebLogic JNDI provider (or a non-WebLogic JMS provider), the non-WebLogic client classes must be made available to the classloader of the calling application in WebLogic Server. This is usually accomplished by adding them to the system classpath.
In your case, WebLogic is looking for a proprietary/foreign JNDI Context Factory class named "cz.jaksky.common.jms.JMSInitialContextFactory", which means you need to make sure that a jar/dir that contains the non-WebLogic class "JMSInitialContextFactory.class" is in the classpath.
The configuration for this should be similar in WL9 and WL10. It could be that your classpath is already setup to reference the foreign class, but it refers to a directory/jar that you haven't setup yet on your WL10 host.
HTH,
Tom -
What changes i should made in web.xml for using jsp/xml using weblogic
Hi all,
I just know some changes has to made in web.xml or weblogic.xml if i have to use weblogic for jsp/xml.
Pls. anybody post the steps to intereaction with xml using weblogic.
I am using jdk1.4The problem is solved.
The information is given at
http://e-docs.bea.com/wls/docs61/webapp/webappdeployment.html -
Sample weblogic-ejb-jar.xml for Resource-ref EJB 3.0
I am trying to create an MDB that can be re-used under different names.
@MessageDriven(description = "An MDB that transfers messages from one Queue to another", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class TransferMdb implements MessageListener {
private static final Logger LOG = Logger.getLogger(TransferMdb.class);
@Resource(name = "jms/connfactory")
private ConnectionFactory connectionFactory;
@Resource(name = "jms/targetDestination")
private Queue targetDestination;
<ejb-jar version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd">
<enterprise-beans>
<message-driven>
<ejb-name>TransferMdb</ejb-name>
<ejb-class>TransferMdb</ejb-class>
</message-driven>
</enterprise-beans>
</ejb-jar>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>TransferMdb</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>200</max-beans-in-free-pool>
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>test_queue</destination-jndi-name>
<transaction-descriptor>
<trans-timeout-seconds>20</trans-timeout-seconds>
</transaction-descriptor>
</message-driven-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jms/connectionfactory</res-ref-name>
<jndi-name>connectionfactory</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>jms/targetDestination</res-ref-name>
<jndi-name>reply_queue</jndi-name>
</resource-description>
</reference-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
However when I deploy the above, I get exceptions such as:
problem: cvc-complex-type.2.4a: Expected elements 'initial-context-factory@http://www.bea.com/ns/weblogic/weblogic-ejb-jar provider-url@http://www.bea.com/ns/weblogic/weblogic-ejb-jar connection-factory-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-polling-interval-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar generate-unique-jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar durable-subscription-deletion@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-messages-in-transaction@http://www.bea.com/ns/weblogic/weblogic-ejb-jar distributed-destination-connection@http://www.bea.com/ns/weblogic/weblogic-ejb-jar use81-style-polling@http://www.bea.com/ns/weblogic/weblogic-ejb-jar init-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar security-plugin@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element message-driven-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
problem: cvc-complex-type.2.4a: Expected elements 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar iiop-security-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-env-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar ejb-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar service-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar enable-call-by-reference@http://www.bea.com/ns/weblogic/weblogic-ejb-jar network-access-point@http://www.bea.com/ns/weblogic/weblogic-ejb-jar clients-on-same-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar run-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar create-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remove-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar passivate-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar local-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar dispatch-policy@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remote-client-timeout@http://www.bea.com/ns/weblogic/weblogic-ejb-jar stick-to-first-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'reference-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element weblogic-enterprise-bean@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
Truncated. see log file for complete stacktrace
I am clearly missing items in the weblogic-ejb-jar.xml. If anyone has a sample or tips, that would be awesome as a starting point.Those tags just declare that you are using our CMP provider and that
your descriptor is in META-INF/weblogic-cmp-rdbms-jar.xml.
FWIW, you might also want to check out EJBGen. It tends to keep more up
to date with WLS than xdoclet.
-- Rob
Gen wrote:
I am using xdoclets to generate descriptor file weblogic-ejb-jar.xml
for a BMP entity bean. Xdoclet is generating the descriptor file
alright, but is putting the following extra tags. This happens even
for samples which come with the download, so my tags in java file are
not wrong.
My question is, are the extra tags below harmless, or should I
manually go to each desciptor file and remove them?
Thanks.
----------- EXTRA TAGS GENERATED START ---------
persistence> <persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
----------- EXTRA TAGS GENERATED END ---------
----------- TAGS I PUT IN JAVA CLASS START --------
* @ejb:bean name="com.ejb.entity.Customer"
* jndi-name="com.ejb.entity.CustomerHome"
* view-type="remote"
* type="BMP"
* primkey-field="com.ejb.entity.CustomerPK"
* reentrant="false"
* @weblogic:cache
* max-beans-in-cache="1000"
* read-timeout-seconds="900"
* concurrency-strategy="ReadOnly"
----------- TAGS I PUT IN JAVA CLASS END --------
Maybe you are looking for
-
2 AIR applications directly communicating with each other in real time
Building a installation that requires 2 different kiosks to communicate with each other. I'd like to use Adobe AIR to create the individual applications. My question is Is it possible for 2 separate AIR applications to DIRECTLY communicate with each
-
I was trying to trick mac into thinking it had newer operating system so I could activate Iphone. Now it does not think it's 10.3.9 so skype and firefox no longer function. Please help!
-
I can't open Photoshop Elements 8 (Editor) Please Help
Hello, I am new here and I am hoping I can get someone to help me out. I've recently Downloaded Photoshop Elements 8 (trial) for my Brand New Computer (I use Windows 7) in hopes of purchasing it after learning the program a little bit, well I'm glad
-
Myfaces migration 1.1 - 1.2
hello, i tried to migrate my application from myfaces 1.1.5 to 1.2.3, after it i got an exception and i cannot find any solution, can you advice me? javax.faces.FacesException: Unable to convert string "net.tv.common.i18n.messages" to class "javax.el
-
Is Photoshop Premier Elements 11 different from Photoshop Elements 11?
I downloaded Photoshop Premier Elements 11 but when I typed in my serial number from my cd box it said it isn't associated with it? My box says Adobe Photoshop Elements 11, are there 2 different versions?