1 2 Previous Next 15 Replies Latest reply on Apr 4, 2014 10:28 AM by jbertram

    HornetQ exception JBoss 7.1.1

    sergiu_pienar

      When I publish messages I get the following :

       

      2012-06-29 10:15:32,921] [ERROR] [com.JMSBean1]-[http-0.0.0.0-0.0.0.0-8888-5] [publishMessageQ:64] Error sending JMS message: from:me@me.com; to: USER(2,sergiu) (cc: null); subject=New Registration; content=null; mime-type=null; to destination: publishQueue

      javax.jms.JMSException: Could not create a session: IJ000456: Unchecked throwable in ManagedConnection.getConnection() cl=org.jboss.jca.core.connectionmanager.listener.TxConnectionListener@8ccefc[state=NORMAL managed connection=org.hornetq.ra.HornetQRAManagedConnection@11ea378 connection handles=0 lastUse=1340964703443 trackByTx=true pool=org.jboss.jca.core.connectionmanager.pool.strategy.OnePool@7e5239 pool internal context=SemaphoreArrayListManagedConnectionPool@134011c[pool=HornetQConnectionDefinition] xaResource=XAResourceWrapperImpl@691f65[xaResource=org.hornetq.ra.HornetQRAXAResource@14830f3 pad=false overrideRmValue=false productName=HornetQ productVersion=2.0 jndiName=java:/JmsXA] txSync=TxSync8774087{tx=TransactionImple < ac, BasicAction: 0:ffffc0a8e005:-40d00a8b:4fed7ee2:614 status: ActionStatus.RUNNING > wasTrackByTx=true enlisted=true}]

                at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:784)

                at org.hornetq.ra.HornetQRASessionFactoryImpl.createXASession(HornetQRASessionFactoryImpl.java:486)

                at com.Util.publishMessageQ(Util.java:344)

                at com.JMSBean.publishMessageQ(JMSBean.java:62)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:306)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)

                at com.JMSLocal$$$view54.publishMessageQ(Unknown Source)

                at com.Util.publishMessageToQueue(Util.java:731)

                at com.BeanUtil.publishMessageToQueue(Util.java:269)

                at com.EmailPublisherBean.publish(EmailPublisherBean.java:202)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:306)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)

                at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)

                at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropagatingInterceptor.processInvocation(EJBRemoteTransactionPropagatingInterceptor.java:80)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)

                at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

                at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

                at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

                at org.jboss.as.ejb3.remote.LocalEjbReceiver.processInvocation(LocalEjbReceiver.java:179)

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:179)

                at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:43)

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:128)

                at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)

                at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)

                at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)

                at $Proxy69.registerCompany(Unknown Source)

                at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)

                at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)

                at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)

                at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

                at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)

                at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

                at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)

                at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

                at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)

                at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489)

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

                at java.lang.Thread.run(Thread.java:662)

      Caused by: javax.resource.spi.SecurityException: Password credentials not the same, reauthentication not allowed

              at org.hornetq.ra.HornetQRAManagedConnection.getConnection(HornetQRAManagedConnection.java:176)

              at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:473) [ironjacamar-core-impl-1.0.9.Final.jar:1.0.9.Final]

              ... 162 more

       

       

      Any ideas on what might be wrong here :

       

      the code is something like this :

       

      Session qs = null;

                                    Destination dest = null;

                                    MessageProducer qproduzer = null;

       

       

                                    javax.jms.XAConnection con = null;

                                    try {

                                              con = JMSConnectionGenericKeyedObjectPool.borrow(destinationName);

                                    } catch (Exception e) {

        Util.LOGGER.error("Error obtaining JMS Connection for destination: " + destinationName, e);

                                              throw new JMSException("Error obtaining JMS Connection for destination: " + destinationName);

                                    }

       

                                    try {

       

                                              // 2. create Session and Producer

                                              qs = con.createXASession();

                                              dest = qs.createQueue(ref.dest);

                                              qproduzer = qs.createProducer(dest);

       

                                              // 3. create ObjectMessage

                                              ObjectMessage om = qs.createObjectMessage();

                                              om.setObject(messageObject);

       

                                              if (diagnose != Constants.DIAGNOSE_OFF) {

                                                        om.setIntProperty(Constants.DIAGNOSE_MESSAGE_KEY, diagnose);

       

                                                        if (Util.LOGGER.isDebugEnabled()) {

      Util.LOGGER.debug("Set diagnose level to '" + diagnose + "'");

                                                        }

                                              }

       

                                              Properties properties = messageObject.getProperties();

                                              if (properties != null) {

                                                        for (Entry<Object, Object> entry : properties.entrySet()) {

                                                                  String key = (String)entry.getKey();

                                                                  Object value = entry.getValue();

                                                                  if (value != null) {

                                                                            om.setStringProperty(key, value.toString());

                                                                  }

                                                        }

                                              }

       

                                              om.setJMSPriority(priority);

                                              // 4. send the message

                                              qproduzer.send(om);

       

      The datasource subsystem :

       

      <subsystem xmlns="urn:jboss:domain:datasources:1.0">

                  <datasources>

                      <datasource jta="false" jndi-name="java:jboss/datasources/myDS" pool-name="myDS" enabled="true" use-java-context="true">

                          <connection-url>jdbc:mysql://localhost:3306/J7</connection-url>

                          <driver>com.mysql</driver>

                          <pool>

                              <min-pool-size>50</min-pool-size>

                              <max-pool-size>250</max-pool-size>

                              <prefill>true</prefill>

                              <use-strict-min>true</use-strict-min>

                              <flush-strategy>EntirePool</flush-strategy>

                          </pool>

                          <security>

                              <user-name>root</user-name>

                              <password>root</password>

                          </security>

                          <validation>

                              <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>

                              <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>

                          </validation>

                      </datasource>

       

       

      Any ideas ?

       

      The exceptions doesn't always occurs (sometimes I can send messages using this code).

       

      I think it may be similar to :

       

      https://community.jboss.org/thread/197870?start=0&tstart=0

       

      Message was edited by: Sergiu Pienar

        • 1. Re: HornetQ exception JBoss 7.1.1
          jbertram

          Can you enable trace logging for org.hornetq.ra, reproduce the error, and attach the log here?

           

          Also, please attach your whole standalone*.xml.

          • 2. Re: HornetQ exception JBoss 7.1.1
            sergiu_pienar

            Attached you'll find my standalone-full.xml .

             

            How can I enable trace logging for that module ?


            Thank you.

            • 3. Re: HornetQ exception JBoss 7.1.1
              jbertram

              How can I enable trace logging for that module ?

              Add this to your <subsystem xmlns="urn:jboss:domain:logging:1.1">:

               

                          <logger category="org.hornetq.ra">

                              <level name="TRACE"/>

                          </logger>

              • 4. Re: HornetQ exception JBoss 7.1.1
                sergiu_pienar

                I did add the trace level for hornetQ and below it's the stacktrace. I did some debugging and the exception occurs at qs = con.createXASession();

                on the 3'rd pass (I'm using that method for publishing messages).

                • 5. Re: HornetQ exception JBoss 7.1.1
                  jbertram

                  Can you explain why you are using javax.jms.XAConnection and javax.jms.XASession?  Does the error continue if you switch to the javax.jms.Connection and javax.jms.Session respectively?

                   

                  Also, the log you attached does not contain the TRACE logging, and it looks like many of the lines are truncated.  Can you attach the full server.log which contains both the TRACE logging and the error without any truncated lines?

                  • 6. Re: HornetQ exception JBoss 7.1.1
                    sergiu_pienar

                    Hi Justin,

                     

                    Thank you for the replies. I've attached the log-file for hornetq and the full server.log .

                     

                    I have the same problem if I use javax.jms.Connection and javax.jms.Session.

                     

                    Thank you for the help.

                     

                    Sergiu

                    • 7. Re: HornetQ exception JBoss 7.1.1
                      sergiu_pienar

                      Any update on this ? I'm still facing the problem using JBoss 7.1.1 Final and hornetQ 2.2.13 Final.

                       

                      I did a bit of debugging on the hornetq-ra.2.2.13 Final project in the HornetQRAManagedConnection class ...

                       

                      The problem is below code :

                       

                            // Check user first

                            HornetQRACredential credential = HornetQRACredential.getCredential(mcf, subject, cxRequestInfo);

                            // Null users are allowed!

                            if (userName != null && !userName.equals(credential.getUserName()))

                            {

                               throw new SecurityException("Password credentials not the same, reauthentication not allowed");

                            }

                       

                      I'm sending my messages to different queues. On first pass I send a message to Q1 which has auth1, pwd1 credentials. This first pass succeeds since the session is newly created and the username is correctly set here:

                      org.hornetq.ra.HornetQRAManagedConnectionFactory.createManagedConnection(Subject, ConnectionRequestInfo) with

                      HornetQRAManagedConnection mc = new HornetQRAManagedConnection(this, cri, ra.getTM(),credential.getUserName(),credential.getPassword());

                       

                      I suspect that when I'm returning the connection back to the pool the username is not erased thus "polluting" the pool.

                       

                      Any opinions ?

                      • 8. Re: HornetQ exception JBoss 7.1.1
                        jbertram

                        The username and password are definitely not "erased" when the connection is returned to the pool because the username and password are essential parts of the connection.  You can't simply switch the username and password used by a connection.  You'd have to destroy the connection and re-create it, and that kind of behavior (i.e. reauthentication) is not supported.  I recommend you create a different <pooled-connection-factory> for each set of credentials you need.

                        • 9. Re: Re: HornetQ exception JBoss 7.1.1
                          sergiu_pienar

                          Justin, I'm creating each connection with different username/password but I`m still getting the error.

                          I've attached a fresh set of logging with TRACE enabled. Could you please have a look ? Maybe you can figure out what's wrong there.

                           

                          Thanks

                          • 10. Re: Re: HornetQ exception JBoss 7.1.1
                            jbertram

                            If you're using a pooled-connection-factory (e.g. JmsXA) then creating the connection with a different username/password is exactly the problem.

                            • 11. Re: Re: HornetQ exception JBoss 7.1.1
                              sergiu_pienar

                              My standalone-full.xml has this part :

                               

                                             <jms-connection-factories>

                                                  <connection-factory name="InVmConnectionFactory">

                                                      <connectors>

                                                          <connector-ref connector-name="in-vm"/>

                                                      </connectors>

                                                      <entries>

                                                          <entry name="java:/ConnectionFactory"/>

                                                      </entries>

                                                  </connection-factory>

                                                  <connection-factory name="RemoteConnectionFactory">

                                                      <connectors>

                                                          <connector-ref connector-name="netty"/>

                                                      </connectors>

                                                      <entries>

                                                          <entry name="RemoteConnectionFactory"/>

                                                          <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                                                      </entries>

                                                  </connection-factory>

                                                  <pooled-connection-factory name="hornetq-ra">

                                                      <transaction mode="xa"/>

                                                      <connectors>

                                                          <connector-ref connector-name="in-vm"/>

                                                      </connectors>

                                                      <entries>

                                                          <entry name="java:/JmsXA"/>

                                                      </entries>

                                                  </pooled-connection-factory>

                                              </jms-connection-factories>

                               

                              As per your previous suggestions should I create a set of

                               

                                                  <pooled-connection-factory name="hornetq-ra">   

                                                      <transaction mode="xa"/>

                                                      <connectors>

                                                          <connector-ref connector-name="in-vm"/>

                                                      </connectors>

                                                      <entries>

                                                          <entry name="java:/JmsXA"/>

                                                      </entries>

                                                  </pooled-connection-factory>

                               

                              for every username/password combination ?

                               

                              I added something like this:

                               

                              <pooled-connection-factory name="hornetq-ra">

                                <user>testUser1</user>    

                                <password>4testUser1</password>

                                <transaction mode="xa"/>

                                                      <connectors>

                                                          <connector-ref connector-name="in-vm"/>

                                                      </connectors>

                                                      <entries>

                                                          <entry name="java:/JmsXA"/>

                                                      </entries>

                                                  </pooled-connection-factory>

                                <pooled-connection-factory name="hornetq-ra1">

                                <user>testUser2</user>    

                                <password>4testUser2</password>

                                <transaction mode="xa"/>

                                                      <connectors>

                                                          <connector-ref connector-name="in-vm"/>

                                                      </connectors>

                                                      <entries>

                                                          <entry name="java:/JmsXA"/>

                                                      </entries>

                                                  </pooled-connection-factory>

                               

                              but now upon startup it complains that the java:JmsXA is already bound

                              • 12. Re: HornetQ exception JBoss 7.1.1
                                jbertram

                                but now upon startup it complains that the java:JmsXA is already bound

                                Yes, I would expect that since you've defined 2 different <pooled-connection-factory> elements with the same <entries>, i.e.:

                                 

                                  <entry name="java:/JmsXA"/>

                                 

                                If you make these unique then you shouldn't have a problem.

                                • 13. Re: HornetQ exception JBoss 7.1.1
                                  sergiu_pienar

                                  Thank you for the reply. Will try.

                                  • 14. Re: HornetQ exception JBoss 7.1.1
                                    sergiu_pienar

                                    Justin,

                                     

                                    Is it possible that for each set of user/password combination defined there is a separate pool (but bound under the same jndiName:) ... something like sub-pools under the JmsXA JNDI name... similar to this : Re: IJ000612: Destroying connection that could not be successfully matched: but for HornetQ.

                                     

                                    Thanks !

                                    1 2 Previous Next