MDB Credential Mapper for connecting to secured foreign JMS  - Need WLST

Hello All
Weblogic 10.3.0
I am in a situation where i have the MDB trying to read messages from secure foreign jms . The ejb-jar and weblogic-jar.xml has the right values like
ejb-jar.xml
==========
<assembly-descriptor>
<security-role>
<role-name>admin</role-name>
</security-role>
</assembly-descriptor>
weblogic-ejb-jar.xml
==============
<run-as-principal-name>CFAMJMS</run-as-principal-name>
<security-role-assignment>
<role-name>admin</role-name>
<principal-name>CFAMJMS</principal-name>
</security-role-assignment>
</weblogic-ejb-jar>
If i am correct , to connect to the Secured Foreign JMS Connection - There are couple of steps involved
1) To create a new security wlsuser under myrealm - called CFAMJMS
2) Each MDB deployed as part of the ear file - I need to perform the credential Mapping - Means
EJB Component Credential Mappings - create a WLS user of the name CFAMJMS and supply the Remote JMS User Name and Password .
Today , i perform the setp 2 ) using the Weblogic Admin Console . Need to automate the same using wlst script . Please help

Hi,
Similar question was answered in this thread...
JMS integration with Tibco EMS via SSL
Could you please check if your TIBCO EMS is ssl enabled .Login on TIBCO EMS using putty and then type show config and check for the following parameter ssl_server_identity ,ssl_server_key . Go to the path mentioned in these two properties and see if the certificate with .pem is present there.
As you are getting following error in the log
Caused by: javax.jms.JMSSecurityException: Can not initialize SSL client: no trusted certificates are set
In TIBCO we need trusted store .pem certificate to make it ssl enabled.
Cheers,
Vlad
It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
https://forums.oracle.com/forums/ann.jspa?annID=893

Similar Messages

  • MDB connecting to Foreign JMS server in WL8.1

    Hello,
              I have this problem that I am hoping someone can help me with. There is a
              MDB deployed in a local WL8.1 that is trying to connect to a Foreign JMS
              Server which is also a WL8.1 running in a remote server. This MDB is
              attempting to subscribe to a topic hosted by that foreign server. In the
              local WL8.1 I created a Foreign JMS Server via the adminconsole and mapped
              the connection factory as well as destinations to the Foreign JMS Server.
              The MDB (via its deployment descriptor) only refers to the local JNDI names
              of the ConnectionFactory and Topic. Here are the scenarios concerning
              security:
              1) When security is turned off (user is in group everyone) everything works
              fine. Messages published to the foreign Topic are received by the MDB in
              the local WL8.1 server and processed.
              2) When a security policy is applied to the Topic (via the remote
              adminconsole), the MDB in the local server gets a 'permission denied'. I
              now have to get around this by defining a principle for the MDB to run as
              and to map the credentials of this principle to that of the user in the
              remote environment with access permissions to the Topic.
              3) When I specify the security identity of my MDB, its JNDI lookup of the
              Topic fails with 'not found'.
              4) Even when the security policy in the remote server is reverted back to
              'everyone' (effectively turning security off) but leaving the MDB running as
              the security principle, it still cannot find the Topic.
              I hope this is something that people have seen and dealt with before.
              Thanks for any and all help anyone can provide. I have also included the
              deployment descriptors for this MDB:
              <ejb-jar>
              <enterprise-beans>
              <message-driven>
              <ejb-name>MDB</ejb-name>
              <ejb-class>sample.class.MDB</ejb-class>
              <transaction-type>Container</transaction-type>
              <message-driven-destination>
              <destination-type>javax.jms.Topic</destination-type>
              </message-driven-destination>
              <security-identity>
              <run-as>
              <role-name>OutsideJMSUser</role-name>
              </run-as>
              </security-identity>
              </message-driven>
              </enterprise-beans>
              <assembly-descriptor>
              <security-role>
              <role-name>OutsideJMSUser</role-name>
              </security-role>
              </assembly-descriptor>
              </ejb-jar>
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>MDB</ejb-name>
              <message-driven-descriptor>
              <pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>ForeignTopic</destination-jndi-name>
              <connection-factory-jndi-name>ForeignConnectionFactory</connection-factory-j
              ndi-name>
              </message-driven-descriptor>
              <jndi-name>MDB</jndi-name>
              </weblogic-enterprise-bean>
              <security-role-assignment>
              <role-name>OutsideJMSUser</role-name>
              <principal-name>OutsideJMSUser</principal-name>
              </security-role-assignment>
              </weblogic-ejb-jar>
              

    Thanks for the suggestion Greg. I have enabled trust between the two
              domains and that has certainly cut down the variations of SecurityExceptions
              that I get. Now I am consistently only getting a JMSSecurityException with
              a access denied to the topic. I believe I have the credential mapped
              correctly between the run-as local user and the remote authorized user.
              Unfortunately the exception does not specify what username was rejected, it
              would have been useful in determining the next debugging step to take.
              I think you're right, I should engage the security forum for this. Thanks
              again for the help.
              "Greg Brail" <[email protected]> wrote in message
              news:[email protected]...
              > Hmm. The security people (on weblogic.developer.interest.security) might
              > have to help you here, too. When you set the "runAs" identity for the MDB,
              > it's doing everything, including the JNDI lookup, under that identity. So
              if
              > that identity is one that's recognized by the remote domain, then you
              should
              > be OK. One way to make your local identity recognized by the remote domain
              > is to make your domains trusted, but you may wish not to do that.
              >
              > greg
              >
              > "Steve Chan" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hello,
              > >
              > > I have this problem that I am hoping someone can help me with. There is
              a
              > > MDB deployed in a local WL8.1 that is trying to connect to a Foreign JMS
              > > Server which is also a WL8.1 running in a remote server. This MDB is
              > > attempting to subscribe to a topic hosted by that foreign server. In
              the
              > > local WL8.1 I created a Foreign JMS Server via the adminconsole and
              mapped
              > > the connection factory as well as destinations to the Foreign JMS
              Server.
              > > The MDB (via its deployment descriptor) only refers to the local JNDI
              > names
              > > of the ConnectionFactory and Topic. Here are the scenarios concerning
              > > security:
              > >
              > > 1) When security is turned off (user is in group everyone) everything
              > works
              > > fine. Messages published to the foreign Topic are received by the MDB
              in
              > > the local WL8.1 server and processed.
              > >
              > > 2) When a security policy is applied to the Topic (via the remote
              > > adminconsole), the MDB in the local server gets a 'permission denied'.
              I
              > > now have to get around this by defining a principle for the MDB to run
              as
              > > and to map the credentials of this principle to that of the user in the
              > > remote environment with access permissions to the Topic.
              > >
              > > 3) When I specify the security identity of my MDB, its JNDI lookup of
              the
              > > Topic fails with 'not found'.
              > >
              > > 4) Even when the security policy in the remote server is reverted back
              to
              > > 'everyone' (effectively turning security off) but leaving the MDB
              running
              > as
              > > the security principle, it still cannot find the Topic.
              > >
              > > I hope this is something that people have seen and dealt with before.
              > > Thanks for any and all help anyone can provide. I have also included
              the
              > > deployment descriptors for this MDB:
              > >
              > > <ejb-jar>
              > > <enterprise-beans>
              > > <message-driven>
              > > <ejb-name>MDB</ejb-name>
              > > <ejb-class>sample.class.MDB</ejb-class>
              > > <transaction-type>Container</transaction-type>
              > > <message-driven-destination>
              > > <destination-type>javax.jms.Topic</destination-type>
              > > </message-driven-destination>
              > > <security-identity>
              > > <run-as>
              > > <role-name>OutsideJMSUser</role-name>
              > > </run-as>
              > > </security-identity>
              > > </message-driven>
              > > </enterprise-beans>
              > >
              > > <assembly-descriptor>
              > > <security-role>
              > > <role-name>OutsideJMSUser</role-name>
              > > </security-role>
              > > </assembly-descriptor>
              > >
              > > </ejb-jar>
              > >
              > > <weblogic-ejb-jar>
              > > <weblogic-enterprise-bean>
              > > <ejb-name>MDB</ejb-name>
              > > <message-driven-descriptor>
              > > <pool>
              > > <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              > > </pool>
              > > <destination-jndi-name>ForeignTopic</destination-jndi-name>
              > >
              > >
              >
              <connection-factory-jndi-name>ForeignConnectionFactory</connection-factory-j
              > > ndi-name>
              > > </message-driven-descriptor>
              > > <jndi-name>MDB</jndi-name>
              > > </weblogic-enterprise-bean>
              > >
              > > <security-role-assignment>
              > > <role-name>OutsideJMSUser</role-name>
              > > <principal-name>OutsideJMSUser</principal-name>
              > > </security-role-assignment>
              > >
              > > </weblogic-ejb-jar>
              > >
              > >
              >
              >
              

  • Foreign JMS vs. Remote MDB

    Hi,
              I have a JMS scenario that I'm hoping to get some input on. The system architecture is as follows:
              One WebLogic 8.1 SP5 domain with a JMS server
              One WebLogic 9.2 MP1 domain with no JMS server
              We'd like to consume a JMS message that's sitting on a queue in the 8.1 domain by code running on the 9.2 domain.
              Without configuring a JMS server in the 9.2 domain (which we'd like to avoid), the two obvious options are:
              1. An MDB running on the 9.2 server that connects to a queue on the 8.1 server
              2. An MDB running on the 9.2 server that connects to a foreign JMS server locally which in turn is linked to the 8.1's JMS server
              Does anyone have any suggestions, experience from this or a similar scenario?
              The main areas that I'd be interested in are:
              - Inter domain compatability
              - Any problems with Transactions, XA
              Many thanks,
              Eoin

    Hi,
              I think your approach is fine - inter-version compatibility is supported for both JMS and XA. You'll need to ensure that all 9.1 and 8.1 WL domain names are unique, ditto for all 8.1 WL server names, 8.1 WL store names, plus 8.1 JMS server names (even across different domains).
              "1" and "2" are essentially the same in that "Foreign JMS" is simply a mapping from the local JNDI naming service to a remote JMS service . "2" tends to be preferable as it can simplify administration once configured. For more information, see the "Integrating Remote JMS Providers" FAQ linked off of this page: "http://edocs.bea.com/wls/docs92/messaging.html".
              FYI There are advantages in using 9.x and later JMS - not only does it have a broader set of features, but it also has more sophisticated message management (use the console to pause/resume dests, view individual messages, etc), and significantly higher performance. Also, 9.x MDBs do a better job of connecting to remote 9.x distributed destinations than 8.1 MDBs - as they automatically ensure that all component destinations get serviced.
              Tom

  • Problem having a MDB connect to a remote JMS Topic

    Hi, I am having problem making an MDB listen to a remote JMS Topic. Here's the
    scenario:
    Two Weblogic servers (6.1 sp3) running on the same machine (W2K) - they arenot part of a cluster......both are independent servers
    One WLS is listening on port 7001 (Domain=WLSDomain1; Target=Server1) and thesecond one on 8001 (Domain=WLSDomain2; Target=Server1 {This is not a typo, the
    target is Server1})
    In WLSDomain1/Server1, I have a JMS Topic defined as follows (in its config.xmlfile):
    <JMSServer Name="EventServicesJMSServer"
    Store="ESJMSServerFileStore" Targets="Server1">
    <JMSTopic JNDIName="jms/EventServicesTopic7001"
    Name="jms/EventServicesTopic7001" StoreEnabled="true"/>
    </JMSServer>
    In WLSDomain2/Server1, I have a JMS Topic defined as follows (in config.xmlfile):
    <JMSServer Name="EventServicesJMSServer"
    Store="ESJMSServerFileStore" Targets="Server1">
    <JMSTopic JNDIName="jms/EventServicesTopic8001"
    Name="jms/EventServicesTopic8001" StoreEnabled="true"/>
    </JMSServer>
    An MDB is deployed on WLSDomain1/Server1 with the following elements in itsweblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
    the relevant info):
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>1</max-beans-in-free-pool>
    <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
    </pool>
    <!-- This MDB is defined to listen to a Topic in another WLS Server running
    on port 8001 -->
    <destination-jndi-name>jms/EventServicesTopic8001</destination-jndi-name>
    <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
    <provider-url>t3://localhost:8001</provider-url>
    <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    An MDB is deployed on WLSDomain2/Server1 with the following elements in itsweblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
    the relevant info):
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>1</max-beans-in-free-pool>
    <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
    </pool>
    <!-- This MDB is defined to listen to a Topic in another WLS Server running
    on port 7001 -->
    <destination-jndi-name>jms/EventServicesTopic7001</destination-jndi-name>
    <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
    <provider-url>t3://localhost:7001</provider-url>
    <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    After starting both the WLS servers, I've verified that they have made connectionsto each other; the Topics are defined in the JNDI tree of the respective servers;
    and the MDBs have been deployed in their respective servers. But the MDBs can't
    see/connect to their respective JMS destination. Here's the error message and
    stack trace from one the WLS server's trace file:
    <Apr 17, 2003 4:58:25 PM GMT> <Warning> <EJB> <The Message-Driven EJB: com.manu.
    common.server.objectServices.CSMEventListenerMDB_8001 is unable to connect to
    the JMS destination: jms/EventServicesTopic8001. The EJB container will automatically
    attempt to
    re-establish the connection with the JMS server. This warning may occur during
    WebLogic Cluster start-up if the JMS destination is located on another server.
    When the JMS server connection is re-established, the Message-Driven EJB will
    again receive JMS messages.
    The Error was:
    weblogic.jms.common.JMSException: Connection not found
    at weblogic.jms.dispatcher.InvocableManager.invocableFind(InvocableManager.java:121)
    at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:509)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:272)
    at weblogic.jms.client.JMSConnection.sessionCreate(JMSConnection.java:268)
    at weblogic.jms.client.JMSConnection.createTopicSession(JMSConnection.java:245)
    at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:522)
    at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:418)
    at weblogic.ejb20.internal.JMSConnectionPoller.trigger(JMSConnectionPoller.java:348)
    at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:238)
    at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:229)
    at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:6
    9)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Have you run into a similar problem? Any suggestion?
    Thanks,
    Farook

    Hi, I am having problem making an MDB listen to a remote JMS Topic. Here's the
    scenario:
    Two Weblogic servers (6.1 sp3) running on the same machine (W2K) - they arenot part of a cluster......both are independent servers
    One WLS is listening on port 7001 (Domain=WLSDomain1; Target=Server1) and thesecond one on 8001 (Domain=WLSDomain2; Target=Server1 {This is not a typo, the
    target is Server1})
    In WLSDomain1/Server1, I have a JMS Topic defined as follows (in its config.xmlfile):
    <JMSServer Name="EventServicesJMSServer"
    Store="ESJMSServerFileStore" Targets="Server1">
    <JMSTopic JNDIName="jms/EventServicesTopic7001"
    Name="jms/EventServicesTopic7001" StoreEnabled="true"/>
    </JMSServer>
    In WLSDomain2/Server1, I have a JMS Topic defined as follows (in config.xmlfile):
    <JMSServer Name="EventServicesJMSServer"
    Store="ESJMSServerFileStore" Targets="Server1">
    <JMSTopic JNDIName="jms/EventServicesTopic8001"
    Name="jms/EventServicesTopic8001" StoreEnabled="true"/>
    </JMSServer>
    An MDB is deployed on WLSDomain1/Server1 with the following elements in itsweblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
    the relevant info):
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>1</max-beans-in-free-pool>
    <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
    </pool>
    <!-- This MDB is defined to listen to a Topic in another WLS Server running
    on port 8001 -->
    <destination-jndi-name>jms/EventServicesTopic8001</destination-jndi-name>
    <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
    <provider-url>t3://localhost:8001</provider-url>
    <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    An MDB is deployed on WLSDomain2/Server1 with the following elements in itsweblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
    the relevant info):
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>1</max-beans-in-free-pool>
    <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
    </pool>
    <!-- This MDB is defined to listen to a Topic in another WLS Server running
    on port 7001 -->
    <destination-jndi-name>jms/EventServicesTopic7001</destination-jndi-name>
    <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
    <provider-url>t3://localhost:7001</provider-url>
    <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    After starting both the WLS servers, I've verified that they have made connectionsto each other; the Topics are defined in the JNDI tree of the respective servers;
    and the MDBs have been deployed in their respective servers. But the MDBs can't
    see/connect to their respective JMS destination. Here's the error message and
    stack trace from one the WLS server's trace file:
    <Apr 17, 2003 4:58:25 PM GMT> <Warning> <EJB> <The Message-Driven EJB: com.manu.
    common.server.objectServices.CSMEventListenerMDB_8001 is unable to connect to
    the JMS destination: jms/EventServicesTopic8001. The EJB container will automatically
    attempt to
    re-establish the connection with the JMS server. This warning may occur during
    WebLogic Cluster start-up if the JMS destination is located on another server.
    When the JMS server connection is re-established, the Message-Driven EJB will
    again receive JMS messages.
    The Error was:
    weblogic.jms.common.JMSException: Connection not found
    at weblogic.jms.dispatcher.InvocableManager.invocableFind(InvocableManager.java:121)
    at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:509)
    at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:272)
    at weblogic.jms.client.JMSConnection.sessionCreate(JMSConnection.java:268)
    at weblogic.jms.client.JMSConnection.createTopicSession(JMSConnection.java:245)
    at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:522)
    at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:418)
    at weblogic.ejb20.internal.JMSConnectionPoller.trigger(JMSConnectionPoller.java:348)
    at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:238)
    at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:229)
    at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:6
    9)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Have you run into a similar problem? Any suggestion?
    Thanks,
    Farook

  • Problem having a MDB connect to a remote JMS Topic (WLS 6.1 sp3)

              Hi, I am having problem making an MDB listen to a remote JMS Topic. Here's the
              scenario:
              > Two Weblogic servers (6.1 sp3) running on the same machine (W2K) - they are
              not part of a cluster......both are independent servers
              > One WLS is listening on port 7001 (Domain=WLSDomain1; Target=Server1) and the
              second one on 8001 (Domain=WLSDomain2; Target=Server1 {This is not a typo, the
              target is Server1})
              > In WLSDomain1/Server1, I have a JMS Topic defined as follows (in its config.xml
              file):
              <JMSServer Name="EventServicesJMSServer"
              Store="ESJMSServerFileStore" Targets="Server1">
              <JMSTopic JNDIName="jms/EventServicesTopic7001"
              Name="jms/EventServicesTopic7001" StoreEnabled="true"/>
              </JMSServer>
              > In WLSDomain2/Server1, I have a JMS Topic defined as follows (in config.xml
              file):
              <JMSServer Name="EventServicesJMSServer"
              Store="ESJMSServerFileStore" Targets="Server1">
              <JMSTopic JNDIName="jms/EventServicesTopic8001"
              Name="jms/EventServicesTopic8001" StoreEnabled="true"/>
              </JMSServer>
              > An MDB is deployed on WLSDomain1/Server1 with the following elements in its
              weblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
              the relevant info):
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>1</max-beans-in-free-pool>
              <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
              </pool>
              <!-- This MDB is defined to listen to a Topic in another WLS Server running
              on port 8001 -->
              <destination-jndi-name>jms/EventServicesTopic8001</destination-jndi-name>
              <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
              <provider-url>t3://localhost:8001</provider-url>
              <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
              </message-driven-descriptor>
              > An MDB is deployed on WLSDomain2/Server1 with the following elements in its
              weblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
              the relevant info):
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>1</max-beans-in-free-pool>
              <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
              </pool>
              <!-- This MDB is defined to listen to a Topic in another WLS Server running
              on port 7001 -->
              <destination-jndi-name>jms/EventServicesTopic7001</destination-jndi-name>
              <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
              <provider-url>t3://localhost:7001</provider-url>
              <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
              </message-driven-descriptor>
              > After starting both the WLS servers, I've verified that they have made connections
              to each other; the Topics are defined in the JNDI tree of the respective servers;
              and the MDBs have been deployed in their respective servers. But the MDBs can't
              see/connect to their respective JMS destination. Here's the error message and
              stack trace from one the WLS server's trace file:
              <Apr 17, 2003 4:58:25 PM GMT> <Warning> <EJB> <The Message-Driven EJB: com.manu.
              common.server.objectServices.CSMEventListenerMDB_8001 is unable to connect to
              the JMS destination: jms/EventServicesTopic8001. The EJB container will automatically
              attempt to
              re-establish the connection with the JMS server. This warning may occur during
              WebLogic Cluster start-up if the JMS destination is located on another server.
              When the JMS server connection is re-established, the Message-Driven EJB will
              again receive JMS messages.
              The Error was:
              weblogic.jms.common.JMSException: Connection not found
              at weblogic.jms.dispatcher.InvocableManager.invocableFind(InvocableManager.java:121)
              at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:509)
              at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:272)
              at weblogic.jms.client.JMSConnection.sessionCreate(JMSConnection.java:268)
              at weblogic.jms.client.JMSConnection.createTopicSession(JMSConnection.java:245)
              at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:522)
              at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:418)
              at weblogic.ejb20.internal.JMSConnectionPoller.trigger(JMSConnectionPoller.java:348)
              at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:238)
              at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:229)
              at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:6
              9)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Have you run into a similar problem? Any suggestion?
              Thanks,
              Farook
              

    FAQ. Naming conflict. To interop between domains make sure:
              All WL Servers are named differently.
              All JMS Servers are named differently.
              All JMS Stores are named differently.
              Tom
              Farook Wadia wrote:
              > Hi, I am having problem making an MDB listen to a remote JMS Topic. Here's the
              > scenario:
              >
              >
              >>Two Weblogic servers (6.1 sp3) running on the same machine (W2K) - they are
              >
              > not part of a cluster......both are independent servers
              >
              >
              >>One WLS is listening on port 7001 (Domain=WLSDomain1; Target=Server1) and the
              >
              > second one on 8001 (Domain=WLSDomain2; Target=Server1 {This is not a typo, the
              > target is Server1})
              >
              >
              >>In WLSDomain1/Server1, I have a JMS Topic defined as follows (in its config.xml
              >
              > file):
              >
              > <JMSServer Name="EventServicesJMSServer"
              > Store="ESJMSServerFileStore" Targets="Server1">
              > <JMSTopic JNDIName="jms/EventServicesTopic7001"
              > Name="jms/EventServicesTopic7001" StoreEnabled="true"/>
              > </JMSServer>
              >
              >>In WLSDomain2/Server1, I have a JMS Topic defined as follows (in config.xml
              >
              > file):
              >
              > <JMSServer Name="EventServicesJMSServer"
              > Store="ESJMSServerFileStore" Targets="Server1">
              > <JMSTopic JNDIName="jms/EventServicesTopic8001"
              > Name="jms/EventServicesTopic8001" StoreEnabled="true"/>
              > </JMSServer>
              >
              >>An MDB is deployed on WLSDomain1/Server1 with the following elements in its
              >
              > weblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
              > the relevant info):
              >
              > ..
              > <message-driven-descriptor>
              > <pool>
              > <max-beans-in-free-pool>1</max-beans-in-free-pool>
              > <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
              > </pool>
              > <!-- This MDB is defined to listen to a Topic in another WLS Server running
              > on port 8001 -->
              > <destination-jndi-name>jms/EventServicesTopic8001</destination-jndi-name>
              > <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
              > <provider-url>t3://localhost:8001</provider-url>
              > <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
              > </message-driven-descriptor>
              > ...
              >
              >
              >>An MDB is deployed on WLSDomain2/Server1 with the following elements in its
              >
              > weblogic-jar.xml file (I haven't included the entire weblogic-jar.xml file, only
              > the relevant info):
              >
              > ..
              > <message-driven-descriptor>
              > <pool>
              > <max-beans-in-free-pool>1</max-beans-in-free-pool>
              > <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
              > </pool>
              > <!-- This MDB is defined to listen to a Topic in another WLS Server running
              > on port 7001 -->
              > <destination-jndi-name>jms/EventServicesTopic7001</destination-jndi-name>
              > <initial-context-factory>weblogic.jndi.WLInitialContextFactory</initial-context-factory>
              > <provider-url>t3://localhost:7001</provider-url>
              > <connection-factory-jndi-name>weblogic/jms/ConnectionFactory</connection-factory-jndi-name>
              > </message-driven-descriptor>
              > ...
              >
              >
              >>After starting both the WLS servers, I've verified that they have made connections
              >
              > to each other; the Topics are defined in the JNDI tree of the respective servers;
              > and the MDBs have been deployed in their respective servers. But the MDBs can't
              > see/connect to their respective JMS destination. Here's the error message and
              > stack trace from one the WLS server's trace file:
              >
              > <Apr 17, 2003 4:58:25 PM GMT> <Warning> <EJB> <The Message-Driven EJB: com.manu.
              > common.server.objectServices.CSMEventListenerMDB_8001 is unable to connect to
              > the JMS destination: jms/EventServicesTopic8001. The EJB container will automatically
              > attempt to
              > re-establish the connection with the JMS server. This warning may occur during
              > WebLogic Cluster start-up if the JMS destination is located on another server.
              > When the JMS server connection is re-established, the Message-Driven EJB will
              > again receive JMS messages.
              > The Error was:
              > weblogic.jms.common.JMSException: Connection not found
              > at weblogic.jms.dispatcher.InvocableManager.invocableFind(InvocableManager.java:121)
              > at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:509)
              > at weblogic.jms.dispatcher.DispatcherImpl.dispatchSync(DispatcherImpl.java:272)
              > at weblogic.jms.client.JMSConnection.sessionCreate(JMSConnection.java:268)
              > at weblogic.jms.client.JMSConnection.createTopicSession(JMSConnection.java:245)
              > at weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectionPoller.java:522)
              > at weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller.java:418)
              > at weblogic.ejb20.internal.JMSConnectionPoller.trigger(JMSConnectionPoller.java:348)
              > at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:238)
              > at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:229)
              > at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:6
              > 9)
              > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              >
              > Have you run into a similar problem? Any suggestion?
              >
              > Thanks,
              >
              > Farook
              

  • Foreign JMS Connectiing to MQ Series

    Hi All,
              Our client complians that, Everytime Foreign JMS Server is deployed on Server, it open 13 connections to MQ Queue. I believe that single JMSConnection is open and connected to Message producer and that creates JMSSessions. Then what are these 13 connections ?
              Thanks,

    Foreign JMS servers do not in themselves open up connections into MQ - whether or not they are deployed. Nor do they pool connections. They can be viewed simply a convenient name mapping mechanism. EG - when an app calls "foreignFact.createConn" it is exactly the same as if they called "mqFact.createConn" directly without using any WebLogic at all.
              So if the application directly accessed MQ instead of going through the Foreign JMS server mechanism they would still see 13 connections.
              Tom

  • MDB not connecting to Foreign JMS destination

    I'm running WL 9.2 MP3 on Windows machine. I'm deploying a rudimentary MDB congured against as Foreign Service JMS provider against MQ V6.0 with local queue running on the same local machine.
              I'm using Maven2 to build all the sub-projects - including my ejb project and enterprise application project. The EAR file deploys successfully without any errors (one minor warning about lack of explicity transactionsi in onMessage() method...). I don't see any errors but my MDB Connection Status is "disconnected" - I've enabled Debug for key sections under default and weblogic sections - still not errors of any kind but it does not connect! What can I do to find the problem?!
              Here is my EJB definition:
              public class AnotherBean extends GenericMessageDrivenBean implements
                        MessageDrivenBean, MessageListener {
                   private static final long serialVersionUID = 1L;
                   /* When the bean is activated, this method will be invoked
                   * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
                   public void onMessage(Message msg) {
                        System.out.println("\n=========================================");
                        System.out.println("=> Message received!");
                        if (msg instanceof TextMessage) {
                             try {
                                  System.out.println("=> Message: "
                                            + ((TextMessage) msg).getText());
                             } catch (JMSException e) {
                                  e.printStackTrace();
                        // Place the message on to the reply queue (WLReplyQueue)
                        System.out.println("=========================================");
              Here is my ejb-jar.xml:
              <ejb-jar
              xmlns="http://java.sun.com/xml/ns/j2ee"
              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_2_1.xsd"
              version="2.1">
              <enterprise-beans>
              <message-driven>
              <ejb-name>AnotherBean</ejb-name>
              <ejb-class>com.ibm.myclient.gems.ejb.AnotherBean</ejb-class>
              <transaction-type>Container</transaction-type>
              <activation-config>
              <activation-config-property>
              <activation-config-property-name>destinationType</activation-config-property-name>
              <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
              </activation-config-property>
              </activation-config>
              </message-driven>
              </enterprise-beans>
              </ejb-jar>
              Here is my weblogic-ejb-jar.xml:
              <weblogic-ejb-jar
              xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
              <weblogic-enterprise-bean>
              <ejb-name>AnotherBean</ejb-name>
              <message-driven-descriptor>
              <destination-jndi-name>jms/WLReceiverQueue</destination-jndi-name>
              <connection-factory-jndi-name>jms/WLReceiverQCF</connection-factory-jndi-name>
              </message-driven-descriptor>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              WL JMS module is setup like this:
              <weblogic-jms xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schema
              Location="http://www.bea.com/ns/weblogic/920 http://www.bea.com/ns/weblogic/920.xsd">
              <foreign-server name="MQTestForeignServer">
              <default-targeting-enabled>true</default-targeting-enabled>
              <foreign-destination name="ReceiverDetails">
              <local-jndi-name>jms/WLReceiverQueue</local-jndi-name>
              <remote-jndi-name>MQSenderQueue</remote-jndi-name>
              </foreign-destination>
              <foreign-destination name="ReplyDetails">
              <local-jndi-name>jms/WLReplyQueue</local-jndi-name>
              <remote-jndi-name>MQReceiverQueue</remote-jndi-name>
              </foreign-destination>
              <foreign-connection-factory name="ReceiverCF">
              <local-jndi-name>jms/WLReceiverQCF</local-jndi-name>
              <remote-jndi-name>MQSenderQCF</remote-jndi-name>
              </foreign-connection-factory>
              <foreign-connection-factory name="ReplyCF">
              <local-jndi-name>jms/WLReplyQCF</local-jndi-name>
              <remote-jndi-name>MQReceiverQCF</remote-jndi-name>
              </foreign-connection-factory>
              <initial-context-factory>com.sun.jndi.fscontext.RefFSContextFactory</initial-context-factory>
              <connection-url>file:/ C:/JNDI-Directory</connection-url>
              </foreign-server>
              </weblogic-jms>

    Thanks for the tips - I solved the problem. I first recreated my .bindinds file making sure that both QCF objects are in there (it turned out that only ONE of them was there and not the other). Next, I also removed an extra space " " from the URL reference in the Foreign JMS service setup in the console:
              was like this initially:
              <connection-url>file:/ C:/JNDI-Directory</connection-url>
              and I changed it to this - removing single space after first "/":
              <connection-url>file:/C:/JNDI-Directory</connection-url>
              Restarted the whole thing and it worked! Thanks again.

  • MDB for Foreign JMS server

    I am trying to access MQ que with Message Driven bean in weblogic 8.1.
              I have defined Foreign JMS server in weblogic pointing to MQ JNDI name.
              I am not sure what to define in "weblogic-ejb-jar.xml" and "ejb-jar.xml" to refer to que connection factory and que.
              Error message that I am getting while deploying is as follows:
              <The Message-Driven EJB: MesssageHandlerBean is unable to connect to the JMS destination: jms.MediaQueue. The Error was:
              [EJB:011010]The JMS destination with the JNDI name: jms.MediaQueue could not be found. Please ensure that the JNDI name in the weblogic-ejb-jar.xml is correct, and the JMS destination has been deployed.>
              Looks like it weblogic is not able to identify JNDI name that I have defined in foreign server for remote que.
              Please let me know how i can reference foreign JMS server JNDI names.
              Thanks a bunch for help.
              Please find attached configuration files.
              weblogic-ejb-jar.xml
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>MesssageHandlerBean</ejb-name>
              <message-driven-descriptor>
              <destination-jndi-name>
              jms.MediaQueue
              </destination-jndi-name>
              <initial-context-factory>
              com.sun.jndi.fscontext.RefFSContextFactory
              </initial-context-factory>
              <provider-url>file://localhost/d:/mqm</provider-url>
              <connection-factory-jndi-name>
              jms.MediaQcf
              </connection-factory-jndi-name>
              </message-driven-descriptor>
              <jndi-name>MesssageHandlerBean</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              ejb-jar.xml
              <enterprise-beans>      
              <message-driven>
              <ejb-name>MesssageHandlerBean</ejb-name>
              <ejb-class>com.ejb.MesssageHandlerBean</ejb-class>
              <transaction-type>Container</transaction-type>
              <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
              </message-driven-destination>
              </message-driven>
              </enterprise-beans>
              weblogic "config.xml" for foeign JMS server.
              <ForeignJMSServer ConnectionURL="file://localhost/d:/mqm" InitialContextFactory="com.sun.jndi.fscontext.RefFSContextFactory"
              JNDIProperties="" Name="MQJMS Server" Targets="cgServer">
              <ForeignJMSConnectionFactory LocalJNDIName="jms.MediaQcf"
              Name="MQ JMS Connection Factory" PasswordEncrypted=""
              RemoteJNDIName="jms/lMediaQcf" Username=""/>
              <ForeignJMSDestination LocalJNDIName="jms.MediaQueue"
              Name="MQJMS Destination" RemoteJNDIName="jms/IMediaQueue"/>
              </ForeignJMSServer>
              Message was edited by:
              [email protected]
              Message was edited by:
              [email protected]

    Thanks for going over the problem it is resolved now by changing weblogic-ejb-jar.xml. To point to weblogic initial context factory. Since weblogic has a foreign server defined so MDB is able to read from MQ que.
              Thanks
              Akash
              <weblogic-enterprise-bean> <ejb-name>MesssageHandlerBean</ejb-name> <message-driven-descriptor> <destination-jndi-name>jms.MediaQueue</destination-jndi-name> <initial-context-factory> weblogic.jndi.WLInitialContextFactory</initial-context-factory> <provider-url>t3://localhost:7001</provider-url> <connection-factory-jndi-name>jms.MediaQcf</connection-factory-jndi-name> </message-driven-descriptor> <jndi-name>MesssageHandlerBean</jndi-name> </weblogic-enterprise-bean>

  • Security:090802 PKI Credential Mapper has got an LDAP exception

    Weblogic Server 10.3, Oracle Service Bus, Red Hat Enterprise, AD integration, PKI infrastructure.
    I have the small erorr message that somewhere exists LDAP error, but cant understand how to read full text of exception or another additional information.
    OSB Security:387078Failed to bind key-pair credential for service key provider Troika.Domain.IC.ClientRegistry.Signature.20090521/IC.CR.WEbServiceUser.ServiceKeyProvider and purpose Encryption: Security:090802PKI Credential Mapper has got an LDAP exception.
    This error appears when i tried to browse encryption key from my identity keystore to service key provider.

    I had the exact same problem with an Oracle 10g Enterprise 10.2.0.1.0 database used as a security store under OSB 10.3.
    Fixed it by dropping the table and recreate it with all VARCHAR256 fields set to VARCHAR2048.
    In my case the CN and RN fields where probably the problem but I'll leave all fields to 2048 for now.

  • Jdev 11g: No credential mapper entry found for password indirection user

    Hi,
    Ive been trying to deploy an application as described in http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcextservices.htm#ADFFD542
    When the application is installed into weblogic, I get the following error:
    An error occurred during activation of changes, please see the log for details.
    weblogic.application.ModuleException:
    java.security.PrivilegedActionException: weblogic.common.ResourceException: java.security.PrivilegedActionException: weblogic.common.ResourceException: No credential mapper entry found for password indirection user=psa_dev for data source psa_dev

    Check out What does this message mean? thread

  • Javax.naming.NameNotFoundException for foreign JMS Connection factory

    I have a foreign jms server configured and when I try and test it I get a Name not found exception.
              javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms]; remaining name 'SSLQueueConnectionFactory'
              The config.xml looks ok
              <ForeignJMSServer
              ConnectionURL="ssl://eaid1-jms.ges.symantec.com:7243"
              JNDIProperties="" Name="JMS Proxy Dev" Targets="TeamWorksServer">
              <ForeignJMSConnectionFactory
              LocalJNDIName="jms.SSLQueueConnectionFactory"
              Name="MyForeign JMS Connection Factory"
              PasswordEncrypted="{3DES}Es94ikW1TZzBFyDp+3/gktRtDaHWI6j/"
              RemoteJNDIName="SSLQueueConnectionFactory" Username="weblogicUser"/>
              <ForeignJMSDestination LocalJNDIName="jms.WEBLOGIC.TEST.QUEUE"
              Name="MyForeign JMS Destination" RemoteJNDIName="WEBLOGIC.TEST.QUEUE"/>
              </ForeignJMSServer>
              The code i took from the QueueSend example
              package com.symantec.utils.jms;
              import java.io.BufferedReader;
              import java.io.IOException;
              import java.io.InputStreamReader;
              import java.util.Hashtable;
              import javax.jms.*;
              import javax.naming.Context;
              import javax.naming.InitialContext;
              import javax.naming.NamingException;
              /** This example shows how to establish a connection
              * and send messages to the JMS queue. The classes in this
              * package operate on the same JMS queue. Run the classes together to
              * witness messages being sent and received, and to browse the queue
              * for messages. The class is used to send messages to the queue.
              * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
              public class QueueSend
              // Defines the JNDI context factory.
              public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
              // Defines the JMS context factory.
              public final static String JMS_FACTORY="jms.SSLQueueConnectionFactory";
              // Defines the queue.
              public final static String QUEUE="WEBLOGIC.TEST.QUEUE";
              private QueueConnectionFactory qconFactory;
              private QueueConnection qcon;
              private QueueSession qsession;
              private QueueSender qsender;
              private Queue queue;
              private TextMessage msg;
              * Creates all the necessary objects for sending
              * messages to a JMS queue.
              * @param ctx JNDI initial context
              * @param queueName name of queue
              * @exception NamingException if operation cannot be performed
              * @exception JMSException if JMS fails to initialize due to internal error
              public void init(Context ctx, String queueName)
              throws NamingException, JMSException
              qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup(queueName);
              qsender = qsession.createSender(queue);
              msg = qsession.createTextMessage();
              qcon.start();
              * Sends a message to a JMS queue.
              * @param message message to be sent
              * @exception JMSException if JMS fails to send message due to internal error
              public void send(String message) throws JMSException {
              msg.setText(message);
              qsender.send(msg);
              * Closes JMS objects.
              * @exception JMSException if JMS fails to close objects due to internal error
              public void close() throws JMSException {
              qsender.close();
              qsession.close();
              qcon.close();
              private static void readAndSend(QueueSend qs)throws IOException, JMSException
                   BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
              String line=null;
              boolean quitNow = false;
              do {
              System.out.print("Enter message (\"quit\" to quit): \n");
              line = msgStream.readLine();
              if (line != null && line.trim().length() != 0) {
              qs.send(line);
              System.out.println("JMS Message Sent: "+line+"\n");
              quitNow = line.equalsIgnoreCase("quit");
              } while (! quitNow);
              private static InitialContext getInitialContext(String url)
              throws NamingException
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
              env.put(Context.PROVIDER_URL, url);
              return new InitialContext(env);
              /** main() method.
              * @param args WebLogic Server URL
              * @exception Exception if operation fails
              public static void main(String[] args) throws Exception
              InitialContext ic = getInitialContext("t3://tus1bpmappdin01.ges.symantec.com:7501");
              QueueSend qs = new QueueSend();
              qs.init(ic, QUEUE);
              readAndSend(qs);
              qs.close();
              Any suggestions would be appreciated
              Regards

    I have a foreign jms server configured and when I try and test it I get a Name not found exception.
              javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms [Root exception is javax.naming.NameNotFoundException: Unable to resolve 'jms.SSLQueueConnectionFactory' Resolved jms]; remaining name 'SSLQueueConnectionFactory'
              The config.xml looks ok
              <ForeignJMSServer
              ConnectionURL="ssl://eaid1-jms.ges.symantec.com:7243"
              JNDIProperties="" Name="JMS Proxy Dev" Targets="TeamWorksServer">
              <ForeignJMSConnectionFactory
              LocalJNDIName="jms.SSLQueueConnectionFactory"
              Name="MyForeign JMS Connection Factory"
              PasswordEncrypted="{3DES}Es94ikW1TZzBFyDp+3/gktRtDaHWI6j/"
              RemoteJNDIName="SSLQueueConnectionFactory" Username="weblogicUser"/>
              <ForeignJMSDestination LocalJNDIName="jms.WEBLOGIC.TEST.QUEUE"
              Name="MyForeign JMS Destination" RemoteJNDIName="WEBLOGIC.TEST.QUEUE"/>
              </ForeignJMSServer>
              The code i took from the QueueSend example
              package com.symantec.utils.jms;
              import java.io.BufferedReader;
              import java.io.IOException;
              import java.io.InputStreamReader;
              import java.util.Hashtable;
              import javax.jms.*;
              import javax.naming.Context;
              import javax.naming.InitialContext;
              import javax.naming.NamingException;
              /** This example shows how to establish a connection
              * and send messages to the JMS queue. The classes in this
              * package operate on the same JMS queue. Run the classes together to
              * witness messages being sent and received, and to browse the queue
              * for messages. The class is used to send messages to the queue.
              * @author Copyright (c) 1999-2006 by BEA Systems, Inc. All Rights Reserved.
              public class QueueSend
              // Defines the JNDI context factory.
              public final static String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
              // Defines the JMS context factory.
              public final static String JMS_FACTORY="jms.SSLQueueConnectionFactory";
              // Defines the queue.
              public final static String QUEUE="WEBLOGIC.TEST.QUEUE";
              private QueueConnectionFactory qconFactory;
              private QueueConnection qcon;
              private QueueSession qsession;
              private QueueSender qsender;
              private Queue queue;
              private TextMessage msg;
              * Creates all the necessary objects for sending
              * messages to a JMS queue.
              * @param ctx JNDI initial context
              * @param queueName name of queue
              * @exception NamingException if operation cannot be performed
              * @exception JMSException if JMS fails to initialize due to internal error
              public void init(Context ctx, String queueName)
              throws NamingException, JMSException
              qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
              qcon = qconFactory.createQueueConnection();
              qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
              queue = (Queue) ctx.lookup(queueName);
              qsender = qsession.createSender(queue);
              msg = qsession.createTextMessage();
              qcon.start();
              * Sends a message to a JMS queue.
              * @param message message to be sent
              * @exception JMSException if JMS fails to send message due to internal error
              public void send(String message) throws JMSException {
              msg.setText(message);
              qsender.send(msg);
              * Closes JMS objects.
              * @exception JMSException if JMS fails to close objects due to internal error
              public void close() throws JMSException {
              qsender.close();
              qsession.close();
              qcon.close();
              private static void readAndSend(QueueSend qs)throws IOException, JMSException
                   BufferedReader msgStream = new BufferedReader(new InputStreamReader(System.in));
              String line=null;
              boolean quitNow = false;
              do {
              System.out.print("Enter message (\"quit\" to quit): \n");
              line = msgStream.readLine();
              if (line != null && line.trim().length() != 0) {
              qs.send(line);
              System.out.println("JMS Message Sent: "+line+"\n");
              quitNow = line.equalsIgnoreCase("quit");
              } while (! quitNow);
              private static InitialContext getInitialContext(String url)
              throws NamingException
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
              env.put(Context.PROVIDER_URL, url);
              return new InitialContext(env);
              /** main() method.
              * @param args WebLogic Server URL
              * @exception Exception if operation fails
              public static void main(String[] args) throws Exception
              InitialContext ic = getInitialContext("t3://tus1bpmappdin01.ges.symantec.com:7501");
              QueueSend qs = new QueueSend();
              qs.init(ic, QUEUE);
              readAndSend(qs);
              qs.close();
              Any suggestions would be appreciated
              Regards

  • Connecting my Sony BD player to my MacBook Pro wireless network.  It sees the network but it then asks for a WPA security key.  Where do I find this key?

    Connecting my Sony BD player to my MacBook Pro wireless network.  It sees the network but it then asks for a WPA security key.  Where do I find this key?

    Hi Michael,
    It sounds like your router's authentication is set to WPA and thus where the key is established. Does your MacBook Pro connect to a wireless router? If so, that's where you'd need to get the key from via a web-based control panel for the router or if it's an AEBS via AirPort Utility.

  • Configuring WL JMS as a foreign JMS provider with security scope (WLS 8.1)

    Hello, i have a problem accessing a queue from a foreign jms provider, if the queue has a security policy. I have the following scenario:
              1) Server server1 in domain1 (WLS81) has a JMS Server with one queue queue1 with a security policy "Caller is a member of the group GROUP_QUEUE". There is also a user USER_QUEUE user defined, which belongs to the this group.
              There is also a ConnectionFactory with "XA Connection Factory Enabled = true" configured.
              The queue and the connection factory are visible in the jndi tree of this server.
              2) Server server2 has a foreign jms server. Foreign JMSConnectionFactory and foreign JMSDestination refer to the jndi entries of server 1. For Foreign JMS Connection Factory username is set to USER_QUEUE. JNDI entries for foreign references are visible in jndi tree of this server.
              I wrote a standalone client to store messages in the queue accessing server1 with USER_QUEUE sucessfully.
              Now I try to deploy a MDB on server2 accessing the queue on server 1. I tried different versions of ejb-jar.xml/weblogic-ejb-jar.xml to access the queue, but with no luck.
              scenario a): no security entries in both descriptors; weblogic-descr has entries <destination-jndi-name> and <connection-factory-jndi-name> pointing to the local jndi names. REsult:
              <11.02.2005 19.16 Uhr CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
              CancelEasyMoneyBean is unable to connect to the JMS destination: prepaid.Cancel
              EasyMoneyQueue. The Error was:
              [EJB:010196]'weblogic.jms.common.JMSSecurityException: Access denied to resource
              : type=<jms>, application=, destinationType=queue, resource=CancelEasyMoneyQueue
              , action=receive' Linked exception = 'weblogic.jms.common.JMSSecurityException:
              Access denied to resource: type=<jms>, application=, destinationType=queue, reso
              urce=CancelEasyMoneyQueue, action=receive'
              So entering username and password for ForeignJMSConnectionFactory doesn't do the trick.
              scenario b:) trying to set additional security entries in both descriptors. I added a role queueUser to my mdb and to weblogic-descr a
              <security-role-assignment>
              <role-name>queueUser</role-name>
              <principal-name>USER_QUEUE<principal-name>
              </security-role-assignment>
              I added the user USER_QUEUE and the group GROUP_QUEUE to server2.
              Now server 1 throws exception after redeployment on server 2:
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE].
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE]
              at weblogic.security.service.SecurityServiceManager.seal(SecurityService
              Manager.java:680)
              Has anybody an idea or a pointer how to define access from a mdb to a foreign queue using security ?
              Thanks in advance,
              Rainer

    Hello, i have a problem accessing a queue from a foreign jms provider, if the queue has a security policy. I have the following scenario:
              1) Server server1 in domain1 (WLS81) has a JMS Server with one queue queue1 with a security policy "Caller is a member of the group GROUP_QUEUE". There is also a user USER_QUEUE user defined, which belongs to the this group.
              There is also a ConnectionFactory with "XA Connection Factory Enabled = true" configured.
              The queue and the connection factory are visible in the jndi tree of this server.
              2) Server server2 has a foreign jms server. Foreign JMSConnectionFactory and foreign JMSDestination refer to the jndi entries of server 1. For Foreign JMS Connection Factory username is set to USER_QUEUE. JNDI entries for foreign references are visible in jndi tree of this server.
              I wrote a standalone client to store messages in the queue accessing server1 with USER_QUEUE sucessfully.
              Now I try to deploy a MDB on server2 accessing the queue on server 1. I tried different versions of ejb-jar.xml/weblogic-ejb-jar.xml to access the queue, but with no luck.
              scenario a): no security entries in both descriptors; weblogic-descr has entries <destination-jndi-name> and <connection-factory-jndi-name> pointing to the local jndi names. REsult:
              <11.02.2005 19.16 Uhr CET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB:
              CancelEasyMoneyBean is unable to connect to the JMS destination: prepaid.Cancel
              EasyMoneyQueue. The Error was:
              [EJB:010196]'weblogic.jms.common.JMSSecurityException: Access denied to resource
              : type=<jms>, application=, destinationType=queue, resource=CancelEasyMoneyQueue
              , action=receive' Linked exception = 'weblogic.jms.common.JMSSecurityException:
              Access denied to resource: type=<jms>, application=, destinationType=queue, reso
              urce=CancelEasyMoneyQueue, action=receive'
              So entering username and password for ForeignJMSConnectionFactory doesn't do the trick.
              scenario b:) trying to set additional security entries in both descriptors. I added a role queueUser to my mdb and to weblogic-descr a
              <security-role-assignment>
              <role-name>queueUser</role-name>
              <principal-name>USER_QUEUE<principal-name>
              </security-role-assignment>
              I added the user USER_QUEUE and the group GROUP_QUEUE to server2.
              Now server 1 throws exception after redeployment on server 2:
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE].
              java.lang.SecurityException: [Security:090398]Invalid Subject: principals=[USER_QUEUE, GROUP_QUEUE]
              at weblogic.security.service.SecurityServiceManager.seal(SecurityService
              Manager.java:680)
              Has anybody an idea or a pointer how to define access from a mdb to a foreign queue using security ?
              Thanks in advance,
              Rainer

  • Credential mapper not working

    "Please tell where I am wrong in configuring and calling credential mapper?????
    I wanted to achieve single sign on using Credential mapping feature of weblogic server.It means using weblogic inner capability.
    I thought of getting connected to pointbase server which can act as Enterprise Information System.
    I did following steps to achieve single sign on using Weblogic Server Credential mapping feature.
    Confuration Phase:
    Step 1) I configured Examples as username and Examples as password in pointbase server which will act as my Enterprise information system.
    Step 2) I wrote one connector class for connecting to pointbase server.
    Step 3) I deploy that connector class.
    Step 4) I configured Admin as username and Admin as password in my configured security realm which will act as Weblogic User.
    Step 5) I did credential mapping in the connector class for mapping my Weblogic (Admin)
         user to EIS(Examples) user.
    Calling Phase:
    Step 1) I deploy one application to call pointbase server using the connector class.
    Step 2) I try to get the connection to pointbase server using the follwing code
         getConnection("Admin","Admin");
         Where Admin username is my weblogic user mapped to Examples user of point base server whose mapping is already done in the connector class.
         I hope it to work for getting the connection.

    "Please tell where I am wrong in configuring and calling credential mapper?????
    I wanted to achieve single sign on using Credential mapping feature of weblogic server.It means using weblogic inner capability.
    I thought of getting connected to pointbase server which can act as Enterprise Information System.
    I did following steps to achieve single sign on using Weblogic Server Credential mapping feature.
    Confuration Phase:
    Step 1) I configured Examples as username and Examples as password in pointbase server which will act as my Enterprise information system.
    Step 2) I wrote one connector class for connecting to pointbase server.
    Step 3) I deploy that connector class.
    Step 4) I configured Admin as username and Admin as password in my configured security realm which will act as Weblogic User.
    Step 5) I did credential mapping in the connector class for mapping my Weblogic (Admin)
         user to EIS(Examples) user.
    Calling Phase:
    Step 1) I deploy one application to call pointbase server using the connector class.
    Step 2) I try to get the connection to pointbase server using the follwing code
         getConnection("Admin","Admin");
         Where Admin username is my weblogic user mapped to Examples user of point base server whose mapping is already done in the connector class.
         I hope it to work for getting the connection.

  • 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:16

    Hi,
    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

Maybe you are looking for

  • How do I change the name associated with my email account on my PC?

    My mothers name is what appears when I send emails instead of mine.  I have found directions on how to change the name on a Mac but I have a PC. It is rather frustrating because I send out business emails and often times the receiver does not look at

  • I can't p,uh my Apple TV to a computer

    Hello, I just updated my Apple TV and is asking me to plug to iTunes but I don't have a computer where to plug it, I just have my mini iPad. What can I do to use the Apple TV, restarting it by unplug it of power or even with the remote doesn't works,

  • Problem with refund ( chat doesn't work )

    Hi, I tried to requst a refund. I followed to instruction https://support.skype.com/en/faq/FA297/how-do-i-request-a-refund  . But on step 3 I didn't find option "Email support", only  "Text chat support"  or link to this forum. And chat does't work,

  • Browser alignment issues

    Please look at this page in IE and in FF http://www.breastcanswers.com/donate.html I want the "donate" button to be to the right of the text like it shows in IE.  FF & chrome put the button below the text..... Thanks for your help!!

  • Ending an Endless Loop

              while (! source.nextTokenIs('}'))                dec = new ClassMemberDeclaration();                         dec.compile(source);           }basically this question is regarding the above loop. This is a while loop that is looking for curly