httptunneling/callback problem once again

"Laszlo Schaffer personal" <laszlo.schaffer-HYXu6/[email protected]>
Newsgroups gmane.comp.java.openjms.user
Message-ID <000501c5517f$3f254230$7201a8c0@safhome>
This is root of the stacktrace 

 

java.io.IOException: HTTPS hostname wrong:  should be <soap.handicaddy.dk>

            at sun.net.www.protocol.https.HttpsClient.b(DashoA12275)

            at
sun.net.www.protocol.https.HttpsClient.afterConnect(DashoA12275)

            at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA
12275)

            at
com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl.connec
t(DashoA12275)

            at
org.exolab.jms.net.http.TunnelHelper.connect(TunnelHelper.java:114)

            at
org.exolab.jms.net.http.HTTPEndpoint.getConnection(HTTPEndpoint.java:242)

            at
org.exolab.jms.net.http.HTTPEndpoint.<init>(HTTPEndpoint.java:168)

            at
org.exolab.jms.net.http.AbstractHTTPManagedConnection.<init>(AbstractHTTPMan
agedConnection.java:108)

            at
org.exolab.jms.net.http.HTTPSManagedConnection.<init>(HTTPSManagedConnection
.java:76)

            at
org.exolab.jms.net.http.HTTPSManagedConnectionFactory.createManagedConnectio
n(HTTPSManagedConnectionFactory.java:124)

            at
org.exolab.jms.net.connector.DefaultConnectionPool.createManagedConnection(D
efaultConnectionPool.java:166)

            at
org.exolab.jms.net.connector.AbstractConnectionManager.allocateConnection(Ab
stractConnectionManager.java:132)

            at
org.exolab.jms.net.connector.AbstractConnectionFactory.getConnection(Abstrac
tConnectionFactory.java:167)

            at
org.exolab.jms.net.connector.AbstractConnectionManager.getConnection(Abstrac
tConnectionManager.java:200)

            at org.exolab.jms.net.orb.Locator.getProxy(Locator.java:129)

            at org.exolab.jms.net.orb.Locator.getRegistry(Locator.java:101)

            at
org.exolab.jms.net.orb.DefaultORB.getRegistry(DefaultORB.java:228)

            at
org.exolab.jms.client.net.SharedORB.getRegistry(SharedORB.java:183)

            at
org.exolab.jms.jndi.InitialContextFactory.getInitialContext(InitialContextFa
ctory.java:107)

            at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)

            at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)

            at javax.naming.InitialContext.init(InitialContext.java:219)

            at javax.naming.InitialContext.<init>(InitialContext.java:195)

            at
com.actiwise.jmstest.MessageController.connect(MessageController.java:62)

            at
com.actiwise.jmstest.ui.TestViewController.connect(TestViewController.java:1
01)

            at
com.actiwise.jmstest.ui.TestViewController$1.actionPerformed(TestViewControl
ler.java:66)

            at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)

            at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButto
n.java:1839)

            at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4
20)

            at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)

            at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener
.java:245)

            at java.awt.Component.processMouseEvent(Component.java:5100)

            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:3198)

            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.ja
va: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)

 

attached the configuration  (web.xml from /openjms-tunnel/)

 

 

 

 

-----Original Message-----
From: openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Tim Anderson
Sent: 2005. május 3. 15:17
To: [email protected]
Subject: RE: [openjms-user] httptunneling/callback

 

The stacktrace isn't much help, as it doesn't show the root cause -

which is probably an IOException. Did you truncate the stack trace?

Also make sure the webserver's public key is in your keystore.

 

If you're still having problems, try interrogating the nested exceptions to
get 

the root, and print it.

E.g:

import javax.naming.NamingException;

import java.rmi.RemoteException;

import org.exolab.jms.net.connector.ResourceException;

 

//....

try {

    Context initial = new InitialContext(....);

} catch (NamingException exception) {

    Throwable root =  getNested(exception);

    root.printStackTrace();

}

 

//....

 

Throwable getNested(Throwable throwable) {

    Throwable result = throwable;

    if (throwable instanceof NamingException) {

        NamingException naming = (NamingException) throwable;

        if (naming,getRootCause() != null) {

            result = getNested(naming.getRootCause());

        }

    } else if (throwable instanceof RemoteException) {

        RemoteException remote = (RemoteException) throwable;

        if (remote.detail != null) {

            result = getNested(remote.detail);

        }

    } else if (throwable instanceof ResourceException) {

        ResourceException resource = (ResourceException) throwable;

        if (resource.getTargetException() != null) {

            result = getNested(resource.getTargetException());

        }

    }

    return result;

}

 

-Tim
web.xml (text/xml, 800 B)
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
  "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <display-name>OpenJMS HTTP tunnel</display-name>

  <servlet>
    <servlet-name>TunnelServlet</servlet-name>
    <servlet-class>org.exolab.jms.net.tunnel.TunnelServlet</servlet-class>
    <init-param>
      <param-name>host</param-name>
      <param-value>soap.handicaddy.dk</param-value>
    </init-param>
    <init-param>
      <param-name>port</param-name>
      <param-value>3030</param-value>
    </init-param>  
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>TunnelServlet</servlet-name>
    <url-pattern>/tunnel</url-pattern>
  </servlet-mapping>

</web-app>
openjms.xml (text/xml, 1.9 KB)
<?xml version="1.0"?>
<Configuration>
  <!-- Optional. This represents the default configuration  -->
  <ServerConfiguration host="soap.handicaddy.dk" embeddedJNDI="true"/>
  <Connectors>

    <Connector scheme="https">
      <ConnectionFactories>
      <ConnectionFactory name="ConnectionFactory"/>
      </ConnectionFactories>
    </Connector>

   <!--
    <Connector scheme="tcp">
      <ConnectionFactories>
        <ConnectionFactory name="TcpConnectionFactory"/>
      </ConnectionFactories>
    </Connector>
    <Connector scheme="rmi">
      <ConnectionFactories>
        <QueueConnectionFactory name="JmsQueueConnectionFactory"/>
        <TopicConnectionFactory name="JmsTopicConnectionFactory"/>
      </ConnectionFactories>
    </Connector>
   -->
  </Connectors>
  <HttpsConfiguration webServerHost="soap.handicaddy.dk" webServerPort="8443"  port="3030" servlet="/openjms-tunnel/tunnel"/>   
  <!-- <HttpConfiguration webServerHost="soap.handicaddy.dk"  port="3030" servlet="/openjms-tunnel/tunnel"/>  -->

  <!-- Required  -->
  <DatabaseConfiguration>
    <RdbmsDatabaseConfiguration driver="org.gjt.mm.mysql.Driver" url="jdbc:mysql://194.230.33.43/test?autoReconnect=true" user="handicad_sas" password="Amager"/> 
  </DatabaseConfiguration>
  <!-- Required -->
  <AdminConfiguration script="${openjms.home}/bin/startup.sh"/>
  <!-- Optional. If not specified, no destinations will be created -->
  <AdministeredDestinations>
    <AdministeredTopic name="topic1">
      <Subscriber name="sub1"/>
      <Subscriber name="sub2"/>
    </AdministeredTopic>
    <AdministeredQueue name="testin"/>
    <AdministeredQueue name="FOLFCHATSMSQUEUE"/>
    <AdministeredQueue name="FOLFCHATCLIENTQUEUE"/>
    <AdministeredQueue name="FOLFCHATSERVERQUEUE"/>
  </AdministeredDestinations>
  <!-- Optional. If not specified, no users will be created -->
  <Users>
    <User name="admin" password="openjms"/>
    <User name="folfchat" password="folfchat"/>
  </Users>
</Configuration>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.