Sunday, 15 May 2016

Read Payload from AQ Table

Use the following Query to get the USER_DATA

SELECT  USER_DATA.TEXT_LOB
FROM  QUEUE_TABLE ;

SELECT USER_DATA.TEXT_VC
FROM QUEUE_TABLE;

Sunday, 3 April 2016

Weblogic JMS Message Bridge

Weblogic JMS bridge can be used to consume and forward the message from remote queues.

In this example I will provide the details  to create a message bridge and foreign servers to connect with TIBCO queue and transfer the messages to internal AQ.

1. Create a User to connect with  TIBCO application. Use security realm to create the user and password.

2. Create a JMS module - tibco_jmsmodule

3.  Create a Subdeployment

Create a Foreign Server to Connect with TIBCO Application

4. Create a Foreign JMS server - tibco_foreignserver  

  • Create a file store. 
  • Update ContextFactory as com.tibco.tibjms.naming.TibjmsInitialContextFactory
  • Update URL as :  tibjmsnaming://hostname:port
  • Provide user name and password
  • Update the following properties  
                    java.naming.factory.url.pkgs:com.tibco.tibjms.naming,
                    com.tibco.tibjms.naming.security_protocol:ssl
                    com.tibco.tibjms.naming.ssl_enable_verify_host:false,
                    com.tibco.tibjms.naming.ssl_enable_verify_hostname:false

  •  Target the Foreign server to appropriate cluster
  • Create a Connection Factory  - Provide Connection Factory Name
    • Provide local Connection Factory JNDI Name   - Tibco_Local_CF
    • Provide the remove Connection Factory JNDI Name  - Tibco_Remote_CF
  • Create Queue  - Provide Queue Name
    • Provide local Queue JNDI Name  - Tibco_Local_Queue
    • Provide Remove Queue JNDI Name - Tibco_Remote_Queue
5. Follow step 4 to connect with Destination


Create an Configure Bridge:

1. Create Source Destination
  • Create a Destination and provide valid Name
  • Select 
  • Provide  TIBCO User Name and Password
  • Provide Connection Property Name  - Tibco_Local_CF
  • Provide Queue Name   - Tibco_Local_Queue

2. Create Target Destination 
  • Create a Destination and provide valid name
  • Provide Connection Property Name  - Target_Local_CF
  • Provide Queue Name   - Target_Local_Queue


3. Create a Bridge

  • Provide a Valid Name
  • Select Source Destination
  • Select Target Destination
  • Target it to Valid Cluster (Same as your Foreign Server Destination)



Known Issues and Solutions

<Mar 23, 2016 2:03:43 PM AEDT> <Info> <MessagingBridge> <BEA-200021> <Bridge "ActiveMeterNotificationInBridge" failed to get one of the adapters from JNDI (javax.naming.NameNotFoundException: Unable to resolve 'eis.jms.WLSConnectionFactoryJNDIXA'. Resolved 'eis.jms'; remaining name 'WLSConnectionFactoryJNDIXA').
javax.naming.NameNotFoundException: Unable to resolve 'eis.jms.WLSConnectionFactoryJNDIXA'. Resolved 'eis.jms'; remaining name 'WLSConnectionFactoryJNDIXA'
        at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1180)
        at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:270)
        at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:187)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:210)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:224)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:224)
        at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:253)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
        at weblogic.jms.bridge.internal.MessagingBridge.startInternal(MessagingBridge.java:585)
        at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1055)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:548)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)

        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)


Solution: Deploy jms-xa-adp resource and target it to all the servers.  



<Apr 1, 2016 2:22:29 PM AEDT> <Debug> <MessagingBridgeRuntimeVerbose> <BEA-000000> <Exception:
javax.naming.AuthenticationException: Not permitted: invalid name or password [Root exception is javax.jms.JMSSecurityException: invalid name or password]
        at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:670)
        at com.tibco.tibjms.naming.TibjmsContext.lookup(TibjmsContext.java:491)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:247)
        at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:92)
        at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:388)
        at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:886)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:219)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:224)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:224)
        at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:253)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at weblogic.jms.adapter.JMSBaseConnection$2.run(JMSBaseConnection.java:301)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.jms.adapter.JMSBaseConnection.startInternal(JMSBaseConnection.java:299)

        at weblogic.jms.adapter.JMSBaseConnection.start(JMSBaseConnection.java:256)


Solution:  Make sure proper Login details are provided in the Foreign server configuration



<Mar 30, 2016 2:54:40 PM AEDT> <Debug> <MessagingBridgeRuntimeVerbose> <BEA-000000> <Exception:
javax.naming.NoInitialContextException: Cannot instantiate class: com.tibco.tibjms.naming.TibjmsInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.tibco.tibjms.naming.TibjmsInitialContextFactory]
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
        at javax.naming.InitialContext.init(InitialContext.java:242)
        at javax.naming.InitialContext.<init>(InitialContext.java:216)
        at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:190)
        at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:92)
        at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:388)
        at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:886)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:219)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:224)
        at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:224)
        at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:253)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
        at javax.naming.InitialContext.lookup(InitialContext.java:411)
        at weblogic.jms.adapter.JMSBaseConnection$2.run(JMSBaseConnection.java:301)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.jms.adapter.JMSBaseConnection.startInternal(JMSBaseConnection.java:299)
        at weblogic.jms.adapter.JMSBaseConnection.start(JMSBaseConnection.java:256)
        at weblogic.jms.adapter.JMSManagedConnectionFactory.createManagedConnection(JMSManagedConnectionFactory.java:192)
        at weblogic.connector.security.layer.AdapterLayer.createManagedConnection(AdapterLayer.java:843)
        at weblogic.connector.outbound.ConnectionFactory.createResource(ConnectionFactory.java:91)
        at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1331)
        at weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:425)
        at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:344)
        at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:324)
        at weblogic.connector.outbound.ConnectionPool.reserveResource(ConnectionPool.java:705)
        at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:318)
        at weblogic.connector.outbound.ConnectionManagerImpl.getConnectionInfo(ConnectionManagerImpl.java:409)
        at weblogic.connector.outbound.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:343)
        at weblogic.connector.outbound.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:134)
        at weblogic.jms.adapter.JMSBaseConnectionFactory.getSourceConnection(JMSBaseConnectionFactory.java:92)
        at weblogic.jms.bridge.internal.MessagingBridge.getConnections(MessagingBridge.java:834)
        at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1079)
        at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused By: java.lang.ClassNotFoundException: com.tibco.tibjms.naming.TibjmsInitialContextFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)



Solution: Download the Jars and provide the JAR details in the class path (setDomain.sh)




<Mar 30, 2016 2:18:05 PM AEDT> <Debug> <MessagingBridgeRuntimeVerbose> <BEA-000000> <Exception:
javax.naming.AuthenticationException: [Security:090304]Authentication Failed: User LOGIN_ID javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User LOGIN_ID denied [Root exception is javax.security.auth.login.FailedLoginException: [Security:090304]Authentication Failed: User LOGIN_ID javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User LOGIN_ID denied]
        at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:44)
        at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:808)
        at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:690)
        at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:485)
        at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:373)
        at weblogic.jndi.Environment.getContext(Environment.java:319)
        at weblogic.jndi.Environment.getContext(Environment.java:288)
        at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)


Solution:  Make sure you have created the Logins in security realm to connect with destination. 

ERP - GL - Chart Of Accounts

Segments in General Ledger   Segments  are dimensions used to represent an account in a financial system. A company can have anywhere from...