2 Replies Latest reply on May 11, 2009 6:30 AM by kconner

    Routing to an Oracle AQ produces AQjmsException during deplo

    dr.shizuma

      Hi,

      i'm trying to setup an environment where I use JBossESB Server 4.5GA only to dequeue from a JBossMQ queue & route the message to a Oracle AQ JMS Queue, but i'm always getting this error during deployment:

      Caused by: oracle.jms.AQjmsException: Invalid Oracle URL specified: OracleDataSource.makeURL
       at oracle.jms.AQjmsDBConnMgr.checkForSecurityException(AQjmsDBConnMgr.java:926)
       at oracle.jms.AQjmsDBConnMgr.getConnection(AQjmsDBConnMgr.java:605)
       at oracle.jms.AQjmsDBConnMgr.<init>(AQjmsDBConnMgr.java:387)
       at oracle.jms.AQjmsConnection.<init>(AQjmsConnection.java:247)
       at oracle.jms.AQjmsQueueConnectionFactory.createQueueConnection(AQjmsQueueConnectionFactory.java:224)
       at org.jboss.soa.esb.oracle.aq.AQInitialContextFactory.addAQDestinationContext(AQInitialContextFactory.java:146)
      


      This is the setup for the route:

      <action name="routeToAQ"
      class="org.jboss.soa.esb.actions.routing.JMSRouter">
       <property name="jndiName" value="BEIN_TRANSFORMED"/>
       <property name="java.naming.oracle.aq.user" value="myuser"/>
       <property name="java.naming.oracle.aq.password" value="mypass"/>
       <property name="java.naming.oracle.aq.server" value="server1"/>
       <property name="java.naming.oracle.aq.instance" value="in1"/>
       <property name="java.naming.oracle.aq.schema" value="myuser"/>
       <property name="java.naming.oracle.aq.port" value="1530"/>
       <property name="java.naming.oracle.aq.driver" value="thin"/>
       <property name="jndi-context-factory" value="org.jboss.soa.esb.oracle.aq.AQInitialContextFactory"/>
       <property name="connectionfactory" value="QueueConnectionFactory"/>
       <property name="unwrap" value="true"/>
      </action>
      


      I'm pretty sure the settings are correct, because dequeuing from an Oracle AQ JMS Queue works just fine...

      Any suggestions what's wrong here?

      Thanks! :)

        • 1. Re: Routing to an Oracle AQ produces AQjmsException during d
          dr.shizuma

          I had a look at the code and I think that's the problem here:

          org.jboss.soa.esb.actions.routing.JMSRouter:

           private Properties getEnvironment()
           {
           final Properties environment = new Properties();
           environment.setProperty(Context.PROVIDER_URL, jndiUrl);
           environment.setProperty(Context.INITIAL_CONTEXT_FACTORY, jndiContextFactory);
           environment.setProperty(Context.URL_PKG_PREFIXES, jndiPkgPrefix);
           return environment ;
           }
          


          This environment is used to create the initial factory, but org.jboss.soa.esb.oracle.aq.AQInitialContextFactory already connects when someone calls "getInitialContext()" & the connection details are not passed in the environment....

          • 2. Re: Routing to an Oracle AQ produces AQjmsException during d
            kconner

            There are two issues with this, one is definitely a bug

            The JMSRouter has no knowledge of extending the JNDI configuration, unlike the JMSEpr, which means that this action is only useful with providers that require no configuration other than potential security details.

            The other issue is that the integration with Oracle AQ should really be binding into the real JNDI hierarchy rather than creating a mock JNDI and populating that independently.

            I'll create a bug for the first and have the second investigated.