6 Replies Latest reply on Dec 11, 2006 3:33 AM by Kobye

    + Problem with the Helloworld Quickstart +

    Serge Emmanuel Pagop Newbie

      Hello Kurt,

      I try to use my new brand jbossesb installation with the Hello World QuickStart but this doesn't work fine. This is the trace after the start of the "ant run" task. I see that this is a connection problem.
      can you tell me what I can do to solve this problem.

      [echo] Basic JMS Gateway and Listener
       [java] 21:20:30,984 INFO [main][Launcher] args passed into Launcher: 3
       [java] 21:20:31,000 INFO [main][Launcher] arg[0]=0
       [java] 21:20:31,000 INFO [main][Launcher] arg[1]=C:\dev\workspace-2\jboss-esb\product\samples\quickstarts\helloworld_embedded_reg/../helloworld/esb-config.xml
       [java] 21:20:31,000 INFO [main][Launcher] arg[2]=C:\dev\workspace-2\jboss-esb\product\samples\quickstarts\helloworld_embedded_reg/../helloworld/esb- config-gateway.xml
       [java] 21:20:31,125 INFO [main][HsqldbUtil] creating db from this script: build/hsqldb
       [java] [Server@a97b0b]: [Thread[main,5,main]]: checkRunning(false) entered
       [java] [Server@a97b0b]: [Thread[main,5,main]]: checkRunning(false) exited
       [java] [Server@a97b0b]: Startup sequence initiated from main() method
       [java] [Server@a97b0b]: Loaded properties from [C:\dev\workspace-2\jboss-esb\product\samples\quickstarts\helloworld_embedded_reg\server.properties]
       [java] [Server@a97b0b]: Initiating startup sequence...
       [java] [Server@a97b0b]: [Thread[HSQLDB Server @a97b0b,5,main]]: run()/openServerSocket():
       [java] java.net.BindException: Address already in use: JVM_Bind
       [java] [Server@a97b0b]: Initiating shutdown sequence...
       [java] at java.net.PlainSocketImpl.socketBind(Native Method)
       [java] [Server@a97b0b]: Shutdown sequence completed in 0 ms.
       [java] at java.net.PlainSocketImpl.bind (PlainSocketImpl.java:359)
       [java] at java.net.ServerSocket.bind(ServerSocket.java:319)
       [java] at java.net.ServerSocket.<init>(ServerSocket.java:185)
       [java] [Server@a97b0b]: 2006-12-05 21:20:31.312 SHUTDOWN : System.exit() is called next
       [java] at java.net.ServerSocket.<init>(ServerSocket.java:97)
       [java] at org.hsqldb.HsqlSocketFactory.createServerSocket(Unknown Source)
       [java] at org.hsqldb.Server.openServerSocket (Unknown Source)
       [java] at org.hsqldb.Server.run(Unknown Source)
       [java] at org.hsqldb.Server.access$000(Unknown Source)
       [java] at org.hsqldb.Server$ServerThread.run(Unknown Source)


      Thanks.

      ###############
      #-------------- reply of Kurt

      Hi Serge,

      Can you post on the forum next time? In the meantime I think you may have your 'wires crossed'. 'ant run' runs the esb is standalone mode (not deployed to the appserver). However you can use the appserver, by pasting in the configuration in the jbossesb-*.xml files.

      It looks like you already have an instance of hsqldb running (Sockets already in use). If you do not shutdown the standalone esb propertly you end up with stray java processes. So they to kill them manually, before starting the standalone esb again.

      Hope this helps.
      --Kurt



        • 1. Re: + Problem with the Helloworld Quickstart +
          Daniel Brum Novice

          Serge, looks from the trace, that you have HSQLDB already running, see:

          java] [Server@a97b0b]: [Thread[HSQLDB Server @a97b0b,5,main]]: run()/openServerSocket():
          [java] java.net.BindException: Address already in use: JVM_Bind
          [java] [Server@a97b0b]: Initiating shutdown sequence...

          You can only ever have one instance of hsqldb running at any given time. Not sure what else on your system would be running with hsqldb.

          • 2. Re: + Problem with the Helloworld Quickstart +
            Serge Emmanuel Pagop Newbie

            Hi Kurt

            thank you for the faster reply. I had tried by following the instructions in the quickstart doc, but without success.

            [java] [Server@a97b0b]: Initiating startup sequence...
             [java] [Server@a97b0b]: [Thread[HSQLDB Server @a97b0b,5,main]]: run()/openServerSocket():
             [java] java.net.BindException: Address already in use: JVM_Bind
             [java] [Server@a97b0b]: Initiating shutdown sequence...


            Could you tell me how can I manually kill or disable the second instance of hsqldb? and I do not know if this hsqldb instance is the instance running in JBoss App Sever or instance outside the App Server. because in the jboss-ebs*-.xml there is also a configuration properties with the name dbstore.

            thanks.

            • 3. Re: + Problem with the Helloworld Quickstart +
              Kurt Stam Master

              1. When you deploy the jbossesb.sar, you intend to run the esb on JBossAS. With it you get a hsqldb, I configured it to be running on port 9001 (which I will change going forward). You should do a ant deploy-jars, to deploy some tb code, and do an 'ant deploy.war' to deploy the tb-WS along with the little jsp page. Now you can run submit a request from that jsp page. Note that oy will have to make sure the settings in the jbossesb-properties.xml are correct. Look at the settings for the mail server (org.jboss.soa.esb.mail.smtp.*), and you should make the path to the template an absolute one (org.jboss.soa.esb.trailblazer.email.template.path).

              2. When you do an ant runESB, this runs the esb standalone. So it as part of the startup script it beings up hsqldb for the registry. So if you want to use this option, just start with a fresh jboss, and only run ant deploy-war.

              Sorry for the confusion. Like I said before, on the trunk I will make hsqdb run embedded on the appserver to prevent the contention for port 9001.

              Hope this helps.

              --Kurt

              • 4. Re: + Problem with the Helloworld Quickstart +
                Kurt Stam Master

                To run in memory you can try this for your hsqldb-ds.xml:

                <?xml version="1.0" encoding="UTF-8"?>
                
                <!-- The Hypersonic embedded database JCA connection factory config -->
                
                <!-- $Id: hsqldb-ds.xml,v 1.15.2.1 2006/01/10 18:11:03 dimitris Exp $ -->
                
                <datasources>
                 <local-tx-datasource>
                 <jndi-name>DefaultDS</jndi-name>
                 <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
                 <driver-class>org.hsqldb.jdbcDriver</driver-class>
                 <user-name>sa</user-name>
                 <password></password>
                 <min-pool-size>5</min-pool-size>
                 <max-pool-size>20</max-pool-size>
                 <idle-timeout-minutes>0</idle-timeout-minutes>
                 <security-domain>HsqlDbRealm</security-domain>
                 <prepared-statement-cache-size>32</prepared-statement-cache-size>
                 <metadata>
                 <type-mapping>Hypersonic SQL</type-mapping>
                 </metadata>
                 <depends>jboss:service=Hypersonic,database=default</depends>
                 </local-tx-datasource>
                
                 <local-tx-datasource>
                 <jndi-name>juddiDB</jndi-name>
                 <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
                 <driver-class>org.hsqldb.jdbcDriver</driver-class>
                 <user-name>sa</user-name>
                 <password></password>
                 <min-pool-size>5</min-pool-size>
                 <max-pool-size>20</max-pool-size>
                 <idle-timeout-minutes>0</idle-timeout-minutes>
                 <security-domain>HsqlDbRealm</security-domain>
                 <prepared-statement-cache-size>32</prepared-statement-cache-size>
                 <metadata>
                 <type-mapping>Hypersonic SQL</type-mapping>
                 </metadata>
                 <depends>jboss:service=Hypersonic,database=default</depends>
                 </local-tx-datasource>
                
                 <local-tx-datasource>
                 <jndi-name>JBossESBDS</jndi-name>
                 <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}default</connection-url>
                 <driver-class>org.hsqldb.jdbcDriver</driver-class>
                 <user-name>sa</user-name>
                 <password></password>
                 <min-pool-size>5</min-pool-size>
                 <max-pool-size>20</max-pool-size>
                 <idle-timeout-minutes>0</idle-timeout-minutes>
                 <security-domain>HsqlDbRealm</security-domain>
                 <prepared-statement-cache-size>32</prepared-statement-cache-size>
                 <metadata>
                 <type-mapping>Hypersonic SQL</type-mapping>
                 </metadata>
                 <depends>jboss:service=Hypersonic,database=default</depends>
                 </local-tx-datasource>
                
                 <mbean code="org.jboss.jdbc.HypersonicDatabase"
                 name="jboss:service=Hypersonic,database=default">
                 <attribute name="Database">default</attribute>
                 <attribute name="InProcessMode">true</attribute>
                 </mbean>
                
                </datasources>
                



                • 6. Re: + Problem with the Helloworld Quickstart +
                  Kobye Novice

                  Maybe runing the examples with Mysql DB is better and esasier.