glassfish
  1. glassfish
  2. GLASSFISH-19458

The JMS RI throws wrong exception for ConnectionFactory.createConnection(String, String)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 4.0_b67_ms7
    • Fix Version/s: 4.0_b68_EE7MS3
    • Component/s: jms
    • Labels:
      None
    • Environment:

      N/A

      Description

      The following CTS JMS test fails because it throws the wrong exception.

      The JMS RI throws a JMSException with a nested JMSSecurityException.
      The test expects JMSSecurityException. Below is exception.

      FAILED........com/sun/ts/tests/jms/core20/connectionfactorytests/Client.java#createConnectionExceptionTests

      [javatest.batch] SEVERE: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4060]: Login failed: user=invalid,
      broker=localhost:7676(44081), error code: C4060
      [javatest.batch] com.sun.messaging.jms.JMSSecurityException: [C4060]: Login failed: user=invalid, broker=localhost:7676(44081)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:1137)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:1044)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:935)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:588)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2498)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1154)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:466)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:66)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:64)
      [javatest.batch] at com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:100)
      [javatest.batch] at com.sun.messaging.jms.ra.ManagedConnection.<init>(ManagedConnection.java:197)
      [javatest.batch] at com.sun.messaging.jms.ra.ManagedConnectionFactory.createManagedConnection(ManagedConnectionFactory.java:2
      26)
      [javatest.batch] at com.sun.enterprise.resource.allocator.ConnectorAllocator.createResource(ConnectorAllocator.java:160)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
      [javatest.batch] at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:9
      8)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
      [javatest.batch] at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
      [javatest.batch] at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:337)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:306)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:207)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:170)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
      [javatest.batch] at com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateQueueConnection(ConnectionFactoryAdapter.java:
      267)
      [javatest.batch] at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createQueueConnection(ConnectionFactoryAdapter.java:254
      )
      [javatest.batch] at com.sun.ts.tests.jms.core20.connectionfactorytests.Client.createConnectionExceptionTests(Client.java:750)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [javatest.batch] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] at java.lang.reflect.Method.invoke(Method.java:601)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.run(EETest.java:550)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:113)
      [javatest.batch] at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:30)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:102)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:446)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:210)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.run(EETest.java:257)
      [javatest.batch] at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:27)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [javatest.batch] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] at java.lang.reflect.Method.invoke(Method.java:601)
      [javatest.batch] at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:439)
      [javatest.batch] at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:183)
      [javatest.batch] at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:65)
      [javatest.batch] Dec 14, 2012 8:13:49 AM com.sun.enterprise.resource.allocator.ConnectorAllocator createResource
      [javatest.batch] WARNING: RAR5038:Unexpected exception while creating resource for pool jms/QueueConnectionFactory-Connection-Pool.
      Exception : javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnecti
      on=[C4060]: Login failed: user=invalid, broker=localhost:7676(44081), error code: C4060
      [javatest.batch] Dec 14, 2012 8:13:49 AM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
      [javatest.batch] WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ jms/QueueConnectionFactory-Connection-
      Pool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: MQJMSRA_MC4001: constructor:Aborting:JMSException on crea
      teConnection=[C4060]: Login failed: user=invalid, broker=localhost:7676(44081), error code: C4060
      [javatest.batch] 12-14-2012 08:13:49: ERROR: Expected JMSSecurityException, received com.sun.messaging.jms.JMSException: MQRA:CFA:a
      llocation failure:createQueueConnection:Error in allocating a connection. Cause: MQJMSRA_MC4001: constructor:Aborting:JMSException o
      n createConnection=[C4060]: Login failed: user=invalid, broker=localhost:7676(44081), error code: C4060
      [javatest.batch] 12-14-2012 08:13:49: Setup JmsTool for TOPIC_FACTORY
      [javatest.batch] 12-14-2012 08:13:49: TRACE: Getting initial context
      [javatest.batch] 12-14-2012 08:13:49: TRACE: Getting TopicConnectionFactory java:comp/env/jms/MyTopicConnectionFactory
      [javatest.batch] 12-14-2012 08:13:49: Test TopicConnectionFactory.createTopicConnection(String, String) with invalid credentials
      [javatest.batch] 12-14-2012 08:13:49: Verify JMSSecurityException is thrown
      [javatest.batch] Dec 14, 2012 8:13:49 AM com.sun.messaging.jms.ra.ManagedConnection <init>
      [javatest.batch] SEVERE: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4060]: Login failed: user=invalid,
      broker=localhost:7676(44081), error code: C4060
      [javatest.batch] com.sun.messaging.jms.JMSSecurityException: [C4060]: Login failed: user=invalid, broker=localhost:7676(44081)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:1137)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:1044)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:935)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:588)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2498)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1154)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:466)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:66)
      [javatest.batch] at com.sun.messaging.jmq.jmsclient.XAConnectionImpl.<init>(XAConnectionImpl.java:64)
      [javatest.batch] at com.sun.messaging.XAConnectionFactory.createXAConnection(XAConnectionFactory.java:100)
      [javatest.batch] at com.sun.messaging.jms.ra.ManagedConnection.<init>(ManagedConnection.java:197)
      [javatest.batch] at com.sun.messaging.jms.ra.ManagedConnectionFactory.createManagedConnection(ManagedConnectionFactory.java:2
      26)
      [javatest.batch] at com.sun.enterprise.resource.allocator.ConnectorAllocator.createResource(ConnectorAllocator.java:160)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:907)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1189)
      [javatest.batch] at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:9
      8)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:282)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1512)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:944)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:230)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:511)
      [javatest.batch] at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:381)
      [javatest.batch] at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:245)
      [javatest.batch] at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:337)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:306)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:207)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:170)
      [javatest.batch] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165)
      [javatest.batch] at com.sun.messaging.jms.ra.ConnectionFactoryAdapter._allocateTopicConnection(ConnectionFactoryAdapter.java:
      325)
      [javatest.batch] at com.sun.messaging.jms.ra.ConnectionFactoryAdapter.createTopicConnection(ConnectionFactoryAdapter.java:312
      )
      [javatest.batch] at com.sun.ts.tests.jms.core20.connectionfactorytests.Client.createConnectionExceptionTests(Client.java:770)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [javatest.batch] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] at java.lang.reflect.Method.invoke(Method.java:601)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.run(EETest.java:550)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:113)
      [javatest.batch] at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:30)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:102)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:446)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:210)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.run(EETest.java:257)
      [javatest.batch] at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:27)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [javatest.batch] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] at java.lang.reflect.Method.invoke(Method.java:601)
      [javatest.batch] at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:439)
      [javatest.batch] at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:183)
      [javatest.batch] at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:65)
      [javatest.batch] Dec 14, 2012 8:13:49 AM com.sun.enterprise.resource.allocator.ConnectorAllocator createResource
      [javatest.batch] WARNING: RAR5038:Unexpected exception while creating resource for pool jms/TopicConnectionFactory-Connection-Pool.
      Exception : javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnecti
      on=[C4060]: Login failed: user=invalid, broker=localhost:7676(44081), error code: C4060
      [javatest.batch] Dec 14, 2012 8:13:49 AM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection
      [javatest.batch] WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ jms/TopicConnectionFactory-Connection-
      Pool ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: MQJMSRA_MC4001: constructor:Aborting:JMSException on crea
      teConnection=[C4060]: Login failed: user=invalid, broker=localhost:7676(44081), error code: C4060
      [javatest.batch] 12-14-2012 08:13:49: ERROR: Caught exception: com.sun.messaging.jms.JMSException: MQRA:CFA:allocation failure:crea
      teTopicConnection:Error in allocating a connection. Cause: MQJMSRA_MC4001: constructor:Aborting:JMSException on createConnection=[C4
      060]: Login failed: user=invalid, broker=localhost:7676(44081), error code: C4060
      [javatest.batch] 12-14-2012 08:13:49: ERROR: createConnectionExceptionTests failed
      [javatest.batch] 12-14-2012 08:13:49: ERROR: Test case throws exception: createConnectionExceptionTests failed
      [javatest.batch] 12-14-2012 08:13:49: ERROR: Exception at:
      [javatest.batch] 12-14-2012 08:13:49: ERROR: com.sun.ts.lib.harness.EETest$Fault: createConnectionExceptionTests failed
      [javatest.batch] at com.sun.ts.tests.jms.core20.connectionfactorytests.Client.createConnectionExceptionTests(Client.java:782)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [javatest.batch] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] at java.lang.reflect.Method.invoke(Method.java:601)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.run(EETest.java:550)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:113)
      [javatest.batch] at com.sun.ts.tests.common.vehicle.EmptyVehicleRunner.run(EmptyVehicleRunner.java:30)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:102)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.getPropsReady(EETest.java:446)
      [javatest.batch] at com.sun.ts.lib.harness.ServiceEETest.run(ServiceEETest.java:210)
      [javatest.batch] at com.sun.ts.lib.harness.EETest.run(EETest.java:257)
      [javatest.batch] at com.sun.ts.tests.common.vehicle.VehicleClient.main(VehicleClient.java:27)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javatest.batch] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [javatest.batch] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [javatest.batch] at java.lang.reflect.Method.invoke(Method.java:601)
      [javatest.batch] at org.glassfish.appclient.client.acc.AppClientContainer.launch(AppClientContainer.java:439)
      [javatest.batch] at org.glassfish.appclient.client.AppClientFacade.launch(AppClientFacade.java:183)
      [javatest.batch] at org.glassfish.appclient.client.AppClientGroupFacade.main(AppClientGroupFacade.java:65)
      [javatest.batch]
      [javatest.batch] 12-14-2012 08:13:50: TRACE: SLEPT FOR: 1000
      [javatest.batch] STATUS:Failed.Test case throws exception: createConnectionExceptionTests failed

      The test throws a JMSException with a nested JMSSecurityException.
      The test expects JMSSecurityException. Below is exception.
      [javatest.batch] ********************************************************************************
      [javatest.batch] Finished Test: FAILED........com/sun/ts/tests/jms/core20/connectionfactorytests/Client.java#createConnectionExcept

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            David Zhao
            Reporter:
            alanf760
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: