1 Reply Latest reply on Oct 24, 2003 3:04 PM by supterlobster

    HTTPConnectionFactory and https

    supterlobster

      Hi all,

      I am trying to secure the JMS connection through https. In jboss I use a self-signed certificate and add it to the client trusted store and set org.jboss.security.ignoreHttpsHost=true.
      My os is window2000 and jboss is jboss-3.2.2RC4_jetty-4.2.11.

      It works fine with https, client authentication and HttpNamingContextFactory(this means it is ok to use
      https to get JBoss JNDI access after being authenticated). However, when I try https and HTTPConnectionFactory, I got following exceptions:

      ....
      Caused by: java.io.IOException: HTTPS hostname wrong: should be <10.218.193.131> at sun.net.www.protocol.https.HttpsClient.b(DashoA6275)
      at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:558)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(DashoA6275)
      at org.jboss.mq.il.http.HTTPClient.post(HTTPClient.java:119)
      at org.jboss.mq.il.http.HTTPServerIL.postRequest(HTTPServerIL.java:371)
      TreePath = [JMS Network, 10.218.192.85:1099, queue, testQueue]
      TreePath = [JMS Network, 10.218.192.85:1099, queue, testQueue]
      at org.jboss.mq.il.http.HTTPServerIL.authenticate(HTTPServerIL.java:108)
      at org.jboss.mq.Connection.authenticate(Connection.java:876)
      ....
      I attached two log files, swing-client.txt(complete log including ssl debugging), client.log (tracing log for detailed https interaction).

      I am positive my self-signed cert is good, since it works with HttpNamingContextFactory. I guess trusted keystore should solve this type of problem. Can somebody shed some light my case?

      Thanks a lot,

      Justin


      swing-client.txt

      Using auth.conf: file:/E:/usr/local/jboss-3.2.2RC4_jetty-4.2.11/client/auth.conf
      keyStore is :
      keyStore type is : jks
      init keystore
      init keymanager of type SunX509
      trustStore is: e:\usr\local\jboss-3.2.2RC4_jetty-4.2.11\server\default\conf\keystore\keystore
      trustStore type is : jks
      init truststore
      adding as trusted cert:
      Subject: EMAILADDRESS=justin.zhou@rrd.com, CN=10.218.193.131, OU=ImageMerchantTM Group, O=RR Donnelley & Sons Company/Premedia Technology, L=Downers Grove, ST=IL, C=US
      Issuer: EMAILADDRESS=ellen.lafountain@rrd.com, CN=ImageMerchantTM CA, OU=ImageMerchantTM Group, O=RR Donnelley & Sons Company/Premedia Technology, L=Downers Grove, ST=IL, C=US
      Algorithm: RSA; Serial number: 0x33
      Valid from Fri Oct 17 11:23:21 CDT 2003 until Tue Jul 04 11:23:21 CDT 2023
      init context
      trigger seeding of SecureRandom
      done seeding SecureRandom
      %% No cached client session
      *** ClientHello, TLSv1
      RandomCookie: GMT: 1050246771 bytes = { 200, 110, 91, 78, 49, 200, 149, 87, 99, 30, 8, 199, 28, 228, 82, 172, 83, 26, 18, 232, 50, 218, 33, 246, 90, 74, 85, 136 }
      Session ID: {}
      Cipher Suites: [SSL_RSA_WITH_RC4_128_MD5, SSL_RSA_WITH_RC4_128_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_DES_CBC_SHA, SSL_DHE_RSA_WITH_DES_CBC_SHA, SSL_DHE_DSS_WITH_DES_CBC_SHA, SSL_RSA_EXPORT_WITH_RC4_40_MD5, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA]
      Compression Methods: { 0 }
      ***
      AWT-EventQueue-0, WRITE: TLSv1 Handshake, length = 73
      AWT-EventQueue-0, WRITE: SSLv2 client hello message, length = 98
      AWT-EventQueue-0, READ: TLSv1 Handshake, length = 872
      *** ServerHello, TLSv1
      RandomCookie: GMT: 1050246771 bytes = { 6, 126, 247, 57, 123, 171, 89, 15, 128, 91, 243, 162, 226, 61, 159, 98, 200, 5, 222, 150, 219, 212, 186, 95, 210, 180, 145, 128 }
      Session ID: {63, 153, 126, 115, 22, 240, 7, 237, 100, 68, 109, 15, 77, 87, 129, 8, 231, 204, 244, 23, 209, 68, 4, 113, 231, 18, 134, 150, 203, 141, 43, 59}
      Cipher Suite: SSL_RSA_WITH_RC4_128_MD5
      Compression Method: 0
      ***
      %% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      ** SSL_RSA_WITH_RC4_128_MD5
      *** Certificate chain
      chain [0] = [
      [
      Version: V1
      Subject: EMAILADDRESS=justin.zhou@rrd.com, CN=10.218.193.131, OU=ImageMerchantTM Group, O=RR Donnelley & Sons Company/Premedia Technology, L=Downers Grove, ST=IL, C=US
      Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
      Key: SunJSSE RSA public key:
      public exponent:
      010001
      modulus:
      d317d43a 687b58dc b947f209 8cd33261 2bd2c9ca 3c7ebdeb 9d9b9ca9 254eba28
      b116f9a8 1b28b751 f15e0113 18f385da 02d1ea97 5e78658e 63d71f34 210275af
      4f61818b 8df698c7 1a430a9d e5c3e47f 6a99f822 60a723e5 21e605d8 81c1e2a5
      978997b0 0cff9755 99bd7664 eae9b2a8 f5528d3a 3876142c 692beb23 bf33ae25
      Validity: [From: Fri Oct 17 11:23:21 CDT 2003,
      To: Tue Jul 04 11:23:21 CDT 2023]
      Issuer: EMAILADDRESS=ellen.lafountain@rrd.com, CN=ImageMerchantTM CA, OU=ImageMerchantTM Group, O=RR Donnelley & Sons Company/Premedia Technology, L=Downers Grove, ST=IL, C=US
      SerialNumber: [ 33]
      ]
      Algorithm: [MD5withRSA]
      Signature:
      0000: 67 52 D6 99 4A AA 43 49 0B 57 51 E4 93 0F 40 8F gR..J.CI.WQ...@.
      0010: C5 AE 69 8C 00 8D D5 74 76 08 C8 88 F5 C4 3B 7A ..i....tv.....;z
      0020: B2 38 CF F7 0C 98 61 02 77 8A 19 E6 06 9A AF 05 .8....a.w.......
      0030: C1 2E 77 EA 88 BC BE 8B 13 CE 5B B8 67 C5 85 1D ..w.......[.g...
      0040: 2E A4 67 5B A5 B6 68 3D 60 63 D4 53 E6 5F CD 66 ..g[..h=`c.S._.f
      0050: 60 04 DB B2 55 8D 4C B8 1B 72 10 93 8D A1 09 67 `...U.L..r.....g
      0060: EB 06 BF 6A 02 15 C6 DE 94 2D F6 04 7D 14 6A 5A ...j.....-....jZ
      0070: 78 C3 58 13 CD EA 61 BF F7 5F E7 6D BE A0 59 E0 x.X...a.._.m..Y.
      ]
      ***
      Found trusted certificate:
      [
      [
      Version: V1
      Subject: EMAILADDRESS=justin.zhou@rrd.com, CN=10.218.193.131, OU=ImageMerchantTM Group, O=RR Donnelley & Sons Company/Premedia Technology, L=Downers Grove, ST=IL, C=US
      Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
      Key: SunJSSE RSA public key:
      public exponent:
      010001
      modulus:
      d317d43a 687b58dc b947f209 8cd33261 2bd2c9ca 3c7ebdeb 9d9b9ca9 254eba28
      b116f9a8 1b28b751 f15e0113 18f385da 02d1ea97 5e78658e 63d71f34 210275af
      4f61818b 8df698c7 1a430a9d e5c3e47f 6a99f822 60a723e5 21e605d8 81c1e2a5
      978997b0 0cff9755 99bd7664 eae9b2a8 f5528d3a 3876142c 692beb23 bf33ae25
      Validity: [From: Fri Oct 17 11:23:21 CDT 2003,
      To: Tue Jul 04 11:23:21 CDT 2023]
      Issuer: EMAILADDRESS=ellen.lafountain@rrd.com, CN=ImageMerchantTM CA, OU=ImageMerchantTM Group, O=RR Donnelley & Sons Company/Premedia Technology, L=Downers Grove, ST=IL, C=US
      SerialNumber: [ 33]
      ]
      Algorithm: [MD5withRSA]
      Signature:
      0000: 67 52 D6 99 4A AA 43 49 0B 57 51 E4 93 0F 40 8F gR..J.CI.WQ...@.
      0010: C5 AE 69 8C 00 8D D5 74 76 08 C8 88 F5 C4 3B 7A ..i....tv.....;z
      0020: B2 38 CF F7 0C 98 61 02 77 8A 19 E6 06 9A AF 05 .8....a.w.......
      0030: C1 2E 77 EA 88 BC BE 8B 13 CE 5B B8 67 C5 85 1D ..w.......[.g...
      0040: 2E A4 67 5B A5 B6 68 3D 60 63 D4 53 E6 5F CD 66 ..g[..h=`c.S._.f
      0050: 60 04 DB B2 55 8D 4C B8 1B 72 10 93 8D A1 09 67 `...U.L..r.....g
      0060: EB 06 BF 6A 02 15 C6 DE 94 2D F6 04 7D 14 6A 5A ...j.....-....jZ
      0070: 78 C3 58 13 CD EA 61 BF F7 5F E7 6D BE A0 59 E0 x.X...a.._.m..Y.
      ]
      *** ServerHelloDone
      JsseJCE: Using JSSE internal implementation for cipher RSA/ECB/PKCS1Padding
      *** ClientKeyExchange, RSA PreMasterSecret, TLSv1
      Random Secret: { 3, 1, 229, 41, 177, 80, 132, 90, 68, 218, 28, 118, 178, 142, 66, 2, 140, 85, 65, 123, 90, 254, 55, 231, 138, 237, 87, 166, 169, 79, 83, 140, 180, 204, 57, 7, 16, 212, 57, 51, 40, 42, 240, 100, 110, 175, 144, 202 }
      AWT-EventQueue-0, WRITE: TLSv1 Handshake, length = 134
      SESSION KEYGEN:
      PreMaster Secret:
      0000: 03 01 E5 29 B1 50 84 5A 44 DA 1C 76 B2 8E 42 02 ...).P.ZD..v..B.
      0010: 8C 55 41 7B 5A FE 37 E7 8A ED 57 A6 A9 4F 53 8C .UA.Z.7...W..OS.
      0020: B4 CC 39 07 10 D4 39 33 28 2A F0 64 6E AF 90 CA ..9...93(*.dn...
      CONNECTION KEYGEN:
      Client Nonce:
      0000: 3F 99 7E 73 C8 6E 5B 4E 31 C8 95 57 63 1E 08 C7 ?..s.n[N1..Wc...
      0010: 1C E4 52 AC 53 1A 12 E8 32 DA 21 F6 5A 4A 55 88 ..R.S...2.!.ZJU.
      Server Nonce:
      0000: 3F 99 7E 73 06 7E F7 39 7B AB 59 0F 80 5B F3 A2 ?..s...9..Y..[..
      0010: E2 3D 9F 62 C8 05 DE 96 DB D4 BA 5F D2 B4 91 80 .=.b......._....
      Master Secret:
      0000: 30 B6 B5 17 A7 A6 74 5D ED 83 F8 66 4C C8 61 0F 0.....t]...fL.a.
      0010: 8F 33 35 AB 9F 07 A7 36 FE D5 75 39 03 CB 29 0F .35....6..u9..).
      0020: 2B 38 E9 A8 E8 2A D3 9A 5D D8 35 C8 AC 18 E5 DC +8...*..].5.....
      Client MAC write Secret:
      0000: 85 C8 50 C2 5C 0E FC ED 5B 86 7A 97 79 F8 3E 0E ..P.\...[.z.y.>.
      Server MAC write Secret:
      0000: 7F 89 A8 87 3B F5 10 A6 A9 3D CE 92 A4 90 A4 C8 ....;....=......
      Client write key:
      0000: 44 2B 65 C9 94 2F 31 19 65 FC D6 76 7A 6D 2A B4 D+e../1.e..vzm*.
      Server write key:
      0000: 21 3C 5F A9 B9 C0 BC B1 70 45 86 0D FD 94 DC 10 !<_.....pE......
      ... no IV for cipher
      AWT-EventQueue-0, WRITE: TLSv1 Change Cipher Spec, length = 1
      JsseJCE: Using JSSE internal implementation for cipher RC4
      *** Finished
      verify_data: { 77, 27, 50, 127, 221, 173, 199, 253, 96, 200, 87, 127 }
      ***
      AWT-EventQueue-0, WRITE: TLSv1 Handshake, length = 32
      AWT-EventQueue-0, READ: TLSv1 Change Cipher Spec, length = 1
      JsseJCE: Using JSSE internal implementation for cipher RC4
      AWT-EventQueue-0, READ: TLSv1 Handshake, length = 32
      *** Finished
      verify_data: { 98, 115, 180, 43, 202, 232, 246, 115, 58, 71, 143, 35 }
      ***
      %% Cached client session: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      AWT-EventQueue-0, called close()
      AWT-EventQueue-0, called closeInternal(true)
      AWT-EventQueue-0, SEND TLSv1 ALERT: warning, description = close_notify
      org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.io.IOException: HTTPS hostname wrong: should be <10.218.193.131>)
      at org.jboss.mq.Connection.authenticate(Connection.java:883)
      AWT-EventQueue-0, WRITE: TLSv1 Alert, length = 18
      at org.jboss.mq.Connection.(Connection.java:238)
      %% Invalidated: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
      AWT-EventQueue-0, called close()
      at org.jboss.mq.Connection.(Connection.java:315)
      AWT-EventQueue-0, called closeInternal(true)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:60)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:116)
      at dams.jms.admin.util.JbossUtilities.getQueueMessages(JbossUtilities.java:249)
      at dams.jms.admin.DynamicTree.refreshQueue(DynamicTree.java:444)
      at dams.jms.admin.DynamicTree.access$100(DynamicTree.java:16)
      at dams.jms.admin.DynamicTree$1.valueChanged(DynamicTree.java:104)
      at javax.swing.JTree.fireValueChanged(JTree.java:2392)
      at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:2763)
      at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
      at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1076)
      at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
      at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170)
      at javax.swing.JTree.setSelectionPath(JTree.java:1168)
      at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2192)
      at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(BasicTreeUI.java:2840)
      at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTreeUI.java:2801)
      at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
      at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
      at java.awt.Component.processMouseEvent(Component.java:5097)
      at java.awt.Component.processEvent(Component.java:4897)
      at java.awt.Container.processEvent(Container.java:1569)
      at java.awt.Component.dispatchEventImpl(Component.java:3615)
      at java.awt.Container.dispatchEventImpl(Container.java:1627)
      at java.awt.Component.dispatchEvent(Component.java:3477)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
      at java.awt.Container.dispatchEventImpl(Container.java:1613)
      at java.awt.Window.dispatchEventImpl(Window.java:1606)
      at java.awt.Component.dispatchEvent(Component.java:3477)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
      Caused by: java.io.IOException: HTTPS hostname wrong: should be <10.218.193.131>
      at sun.net.www.protocol.https.HttpsClient.b(DashoA6275)
      at sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA6275)
      at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
      at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:558)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(DashoA6275)
      at org.jboss.mq.il.http.HTTPClient.post(HTTPClient.java:119)
      at org.jboss.mq.il.http.HTTPServerIL.postRequest(HTTPServerIL.java:371)
      TreePath = [JMS Network, 10.218.192.85:1099, queue, testQueue]
      TreePath = [JMS Network, 10.218.192.85:1099, queue, testQueue]
      at org.jboss.mq.il.http.HTTPServerIL.authenticate(HTTPServerIL.java:108)
      at org.jboss.mq.Connection.authenticate(Connection.java:876)
      ... 38 more
      Finalizer, called close()
      Finalizer, called closeInternal(true)

      client.log

      2003-10-24 14:32:30,696 0 INFO [dams.jms.admin.MainWindow] (main:) JMS Admintool starting...
      2003-10-24 14:32:30,706 10 INFO [dams.jms.admin.MainWindow] (main:) Using the AnyhostVerifier
      2003-10-24 14:33:06,438 35742 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] (AWT-EventQueue-0:) initialize
      2003-10-24 14:33:06,438 35742 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] (AWT-EventQueue-0:) Properties file=file:/E:/usr/local/jboss-3.2.2RC4_jetty-4.2.11/client/users.properties
      2003-10-24 14:33:06,448 35752 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] (AWT-EventQueue-0:) Properties file=file:/E:/usr/local/jboss-3.2.2RC4_jetty-4.2.11/client/roles.properties
      2003-10-24 14:33:06,448 35752 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] (AWT-EventQueue-0:) login
      2003-10-24 14:33:06,448 35752 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] (AWT-EventQueue-0:) User 'lite' authenticated, loginOk=true
      2003-10-24 14:33:06,458 35762 TRACE [org.jboss.security.auth.spi.UsersRolesLoginModule] (AWT-EventQueue-0:) commit, loginOk=true
      2003-10-24 14:33:06,568 35872 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] (AWT-EventQueue-0:) Extracting SpyConnectionFactory from reference
      2003-10-24 14:33:06,648 35952 DEBUG [org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory] (AWT-EventQueue-0:) The GenericConnectionFactory is: GenericConnectionFactory:[server=org.jboss.mq.il.http.HTTPServerIL@fb6c5f,connectionProperties={org.jboss.mq.il.http.restinterval=0, org.jboss.mq.il.http.url=https://10.218.193.131/jbossmq-httpil/restricted/HTTPServerILServlet, PingPeriod=0, org.jboss.mq.il.http.timeout=60000, ClientILService=org.jboss.mq.il.http.HTTPClientILService}]
      2003-10-24 14:33:06,698 36002 DEBUG [org.jboss.mq.Connection] (AWT-EventQueue-0:) Setting the clockDaemon's thread factory
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.Connection] (AWT-EventQueue-0:) Connection Initializing
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.Connection] (AWT-EventQueue-0:) Getting the serverIL
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.il.http.HTTPClient] (AWT-EventQueue-0:) cloneServerIL()
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.Connection] (AWT-EventQueue-0:) serverIL=org.jboss.mq.il.http.HTTPServerIL@fb6c5f
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.Connection] (AWT-EventQueue-0:) Authenticating
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.Connection] (AWT-EventQueue-0:) Authenticating user null
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.il.http.HTTPClient] (AWT-EventQueue-0:) authenticate(String null, String null)
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.il.http.HTTPClient] (AWT-EventQueue-0:) postRequest(HTTPILRequest authenticate(class java.lang.String null, class java.lang.String null))
      2003-10-24 14:33:06,708 36012 TRACE [org.jboss.mq.il.http.HTTPClient] (AWT-EventQueue-0:) post(URL https://10.218.193.131/jbossmq-httpil/restricted/HTTPServerILServlet, HTTPILRequest authenticate(class java.lang.String null, class java.lang.String null))
      2003-10-24 14:33:08,040 37344 DEBUG [org.jboss.mq.Connection] (AWT-EventQueue-0:) Error closing the connection
      java.lang.NullPointerException
      at org.jboss.mq.il.http.HTTPServerIL.connectionClosing(HTTPServerIL.java:166)
      at org.jboss.mq.Connection.(Connection.java:256)
      at org.jboss.mq.Connection.(Connection.java:315)
      at org.jboss.mq.SpyConnection.(SpyConnection.java:60)
      at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:116)
      at dams.jms.admin.util.JbossUtilities.getQueueMessages(JbossUtilities.java:249)
      at dams.jms.admin.DynamicTree.refreshQueue(DynamicTree.java:444)
      at dams.jms.admin.DynamicTree.access$100(DynamicTree.java:16)
      at dams.jms.admin.DynamicTree$1.valueChanged(DynamicTree.java:104)
      at javax.swing.JTree.fireValueChanged(JTree.java:2392)
      at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:2763)
      at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629)
      at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1076)
      at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287)
      at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170)
      at javax.swing.JTree.setSelectionPath(JTree.java:1168)
      at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2192)
      at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(BasicTreeUI.java:2840)
      at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTreeUI.java:2801)
      at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
      at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
      at java.awt.Component.processMouseEvent(Component.java:5097)
      at java.awt.Component.processEvent(Component.java:4897)
      at java.awt.Container.processEvent(Container.java:1569)
      at java.awt.Component.dispatchEventImpl(Component.java:3615)
      at java.awt.Container.dispatchEventImpl(Container.java:1627)
      at java.awt.Component.dispatchEvent(Component.java:3477)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
      at java.awt.Container.dispatchEventImpl(Container.java:1613)
      at java.awt.Window.dispatchEventImpl(Window.java:1606)
      at java.awt.Component.dispatchEvent(Component.java:3477)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

        • 1. Re: HTTPConnectionFactory and https
          supterlobster

          To make it clear. I am using jbossmq-httpil.sar to do the job. The HTTPConnectionFactory is configured like:

          <?xml version="1.0" encoding="UTF-8"?>
          <!DOCTYPE server>


          <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker
          jboss.web:service=WebServer
          HTTPConnectionFactory
          HTTPXAConnectionFactory
          0
          60
          0
          https://10.218.193.131/jbossmq-httpil/restricted/HTTPServerILServlet



          If just type in https://10.218.193.131/jbossmq-httpil/restricted/HTTPServerILServlet on the browser,
          it will give you a Basic dialog asking for user/passwd.
          It works fine this way, after authenticated, I can see the output from HTTPServerILServlet. This means, everything is set ok for https and Basic authentication.

          My problem is when use it from a remote swing app, I get a QueueConnectionFactory by:

          QueueConnectionFactory queueFactory =
          (QueueConnectionFactory)ctx.lookup("HTTPConnectionFactory");

          // Create the connection
          QueueConnection
          queueConnection = queueFactory.createQueueConnection();

          Then got:
          org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: (java.io.IOException: HTTPS hostname wrong: should be <10.218.193.131>)
          at org.jboss.mq.Connection.authenticate(Connection.java:883)

          So the problem can be caused by my self-signed cert. However, this cert works fine with servlets in jbossmq-httpil.sar. And for the log you can see I am already authenticated. So can be some bugs in the code?

          Justin