Closed arinban closed 14 years ago
@glassfishrobot Commented Reported by nigeldeakin
@glassfishrobot Commented nigeldeakin said: To reproduce this bug it is necessary to not define a fallback username and password on the resource adapter config. Otherwise those credentials will be used.
@glassfishrobot Commented nigeldeakin said: This exception occurs because a call to createConnection() with no arguments on a managed connection is converted internally to a call to createConnection(username,password) on the underlying JMS client, where username and password are both an empty string.
Neither Glassfish MQ nor WebLogic JMS recognise this as a valid username/password and so throws a login exception.
The fix is to modify com.sun.genericra.outbound.ManagedQueueConnection (and other sibling classes) to detect this special case and call createConnection() with no arguments.
@glassfishrobot Commented nigeldeakin said: Now fixed as described above.
@glassfishrobot Commented nigeldeakin said: Fixed in 2.1a
@glassfishrobot Commented Was assigned to nigeldeakin
@glassfishrobot Commented This issue was imported from java.net JIRA GENERICJMSRA-44
@glassfishrobot Commented Marked as fixed on Wednesday, September 15th 2010, 2:15:06 am
If I call conectionFactory.createConnection() with no arguments, to create an anonymous connection to the JMS provider, then this causes an authentication failure with WebLogic JMS, even when creating anonymous connections works fine when using the WebLogic JMS client directly.
Here is the stack trace:
[exec] WARNING: RAR5038:Unexpected exception while creating resource for pool qcpool. Exception : Authentication fa ilure due to LoginException [exec] 10-Sep-2010 14:00:39 com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection [exec] WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ qcpool ]. Reason : Authenticati on failure due to LoginException [exec] 10-Sep-2010 14:00:39 com.sun.genericra.outbound.ConnectionFactory createConnection [exec] INFO: Error in allocating a connection. Cause: Authentication failure due to LoginException [exec] javax.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: Authentication fail ure due to LoginException [exec] at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java: 353) [exec] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235 ) [exec] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165 ) [exec] at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158 ) [exec] at com.sun.genericra.outbound.ConnectionFactory.createConnection(ConnectionFactory.java:75) [exec] at com.sun.genericra.outbound.ConnectionFactory.createQueueConnection(ConnectionFactory.java:115) [exec] at test.common.client.GenericClient.drainQueue(GenericClient.java:32) [exec] at test.simple.queue.client.SimpleMessageClient.main(SimpleMessageClient.java:43) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [exec] at java.lang.reflect.Method.invoke(Method.java:597) [exec] at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266) [exec] at com.sun.enterprise.appclient.MainWithModuleSupport.(MainWithModuleSupport.java:450)
[exec] at
com.sun.enterprise.appclient.MainWithModuleSupport.(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Caused by: com.sun.enterprise.resource.PoolingException:
Authentication failure due to LoginException
[exec] at
com.sun.enterprise.resource.AbstractResourcePool.createSingleResource(AbstractResourcePool.java:925)
[exec] at
com.sun.enterprise.resource.AbstractResourcePool.createResourceAndAddToPool(AbstractResourcePool.java
:1887)
[exec] at
com.sun.enterprise.resource.AbstractResourcePool.createResources(AbstractResourcePool.java:983)
[exec] at
com.sun.enterprise.resource.AbstractResourcePool.initPool(AbstractResourcePool.java:228)
[exec] at
com.sun.enterprise.resource.AbstractResourcePool.internalGetResource(AbstractResourcePool.java:535)
[exec] at
com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:458)
[exec] at
com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248)
[exec] at
com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176)
[exec] at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:
327)
[exec] ... 15 more
[exec] 10-Sep-2010 14:00:39
com.sun.enterprise.appclient.MainWithModuleSupport
[exec] WARNING: ACC003: Application threw an exception.
[exec] javax.jms.JMSException: Error in allocating a connection. Cause:
Authentication failure due to LoginExceptio
n
[exec] at
com.sun.genericra.util.ExceptionUtils.newJMSException(ExceptionUtils.java:67)
[exec] at
com.sun.genericra.outbound.ConnectionFactory.createConnection(ConnectionFactory.java:80)
[exec] at
com.sun.genericra.outbound.ConnectionFactory.createQueueConnection(ConnectionFactory.java:115)
[exec] at
test.common.client.GenericClient.drainQueue(GenericClient.java:32)
[exec] at
test.simple.queue.client.SimpleMessageClient.main(SimpleMessageClient.java:43)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at
com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:266)
[exec] at
com.sun.enterprise.appclient.MainWithModuleSupport.(MainWithModuleSupport.java:450)
[exec] at
com.sun.enterprise.appclient.MainWithModuleSupport.(MainWithModuleSupport.java:260)
[exec] at com.sun.enterprise.appclient.Main.main(Main.java:200)
[exec] Caused by: javax.resource.spi.ResourceAllocationException: Error in
allocating a connection. Cause: Authenti
cation failure due to LoginException
[exec] at
com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:
353)
[exec] at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235
)
[exec] at
com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165
Environment
Operating System: All Platform: All
Affected Versions
[current]