11 Replies Latest reply on Jan 9, 2002 11:04 PM by Timothy Washington

    JBoss appearing to hang???

    Hemal Newbie

      Hi I am running JBoss along with Tomcat. I am trying to deploy EJB's. I am using a mysql database.

      When I attempt to run JBoss it seems to hang for a few minutes. The last lines are as follows:

      [Mail Service] Mail Service 'Mail' bound to java:/Mail
      [Mail Service] Started
      [MySql] Starting
      [MySql] XA Connection pool MySql bound to java:/MySql

      After a few minutes I get the following trace:

      [EmbeddedTomcatSX] java.io.InterruptedIOException: Read timed out
      [EmbeddedTomcatSX] at java.net.SocketInputStream.socketRead(Native Method)
      [EmbeddedTomcatSX] at java.net.SocketInputStream.read(SocketInputStream.jav
      a:86)
      [EmbeddedTomcatSX] at java.io.BufferedInputStream.fill(BufferedInputStream.
      java:186)
      [EmbeddedTomcatSX] at java.io.BufferedInputStream.read(BufferedInputStream.
      java:204)
      [EmbeddedTomcatSX] at org.apache.tomcat.service.http.HttpRequestAdapter.doR
      ead(HttpRequestAdapter.java:115)
      [EmbeddedTomcatSX] at org.apache.tomcat.core.BufferedServletInputStream.doR
      ead(BufferedServletInputStream.java:106)
      [EmbeddedTomcatSX] at org.apache.tomcat.core.BufferedServletInputStream.rea
      d(BufferedServletInputStream.java:128)
      [EmbeddedTomcatSX] at javax.servlet.ServletInputStream.readLine(ServletInpu
      tStream.java:138)
      [EmbeddedTomcatSX] at org.apache.tomcat.service.http.HttpRequestAdapter.rea
      dNextRequest(HttpRequestAdapter.java:129)
      [EmbeddedTomcatSX] at org.apache.tomcat.service.http.HttpConnectionHandler.
      processConnection(HttpConnectionHandler.java:198)
      [EmbeddedTomcatSX] at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolT
      cpEndpoint.java:416)
      [EmbeddedTomcatSX] at org.apache.tomcat.util.ThreadPool$ControlRunnable.run
      (ThreadPool.java:501)
      [EmbeddedTomcatSX] at java.lang.Thread.run(Thread.java:484)
      2001-12-20 06:07:11 - ContextManager: Timeout while reading request, aborting -
      java.io.InterruptedIOException: Read timed out
      at java.net.SocketInputStream.socketRead(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:86)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
      at org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestA
      dapter.java:115)
      at org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServ
      letInputStream.java:106)
      at org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServle
      tInputStream.java:128)
      at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138
      )
      at org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(Htt
      pRequestAdapter.java:129)
      at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio
      n(HttpConnectionHandler.java:198)
      at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:
      416)
      at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java
      :501)
      at java.lang.Thread.run(Thread.java:484)

      [MySql] Stopped
      [MySql] java.lang.NullPointerException
      [MySql] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(
      XAPoolDataSource.java:165)
      [MySql] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLo
      ader.java:330)
      [MySql] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
      java:93)
      [MySql] at java.lang.reflect.Method.invoke(Native Method)
      [MySql] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [MySql] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [MySql] at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
      [MySql] at java.lang.reflect.Method.invoke(Native Method)
      [MySql] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [MySql] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [MySql] at org.jboss.Main.(Main.java:217)
      [MySql] at org.jboss.Main$1.run(Main.java:121)
      [MySql] at java.security.AccessController.doPrivileged(Native Method)
      [MySql] at org.jboss.Main.main(Main.java:117)
      [Service Control] Could not start DefaultDomain:service=XADataSource,name=Myql
      [Service Control] java.lang.NullPointerException
      [Service Control] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getCon
      nection(XAPoolDataSource.java:165)
      [Service Control] at org.jboss.jdbc.XADataSourceLoader.startService(XAData
      SourceLoader.java:330)
      [Service Control] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBean
      Support.java:93)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.util.ServiceControl.start(ServiceControl.ja
      va:97)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.Main.(Main.java:217)
      [Service Control] at org.jboss.Main$1.run(Main.java:121)
      [Service Control] at java.security.AccessController.doPrivileged(Native Me
      thod)
      [Service Control] at org.jboss.Main.main(Main.java:117)
      [mysqlPool] Starting
      [mysqlPool] XA Connection pool mysqlPool bound to java:/mysqlPool
      [mysqlPool] Stopped
      [mysqlPool] java.lang.NullPointerException
      [mysqlPool] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(
      XAPoolDataSource.java:165)
      [mysqlPool] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLo
      ader.java:330)
      [mysqlPool] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
      java:93)
      [mysqlPool] at java.lang.reflect.Method.invoke(Native Method)
      [mysqlPool] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [mysqlPool] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [mysqlPool] at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
      [mysqlPool] at java.lang.reflect.Method.invoke(Native Method)
      [mysqlPool] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [mysqlPool] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [mysqlPool] at org.jboss.Main.(Main.java:217)
      [mysqlPool] at org.jboss.Main$1.run(Main.java:121)
      [mysqlPool] at java.security.AccessController.doPrivileged(Native Method)
      [mysqlPool] at org.jboss.Main.main(Main.java:117)
      [Service Control] Could not start DefaultDomain:service=XADataSource,name=mysqlD
      B
      [Service Control] java.lang.NullPointerException
      [Service Control] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getCon
      nection(XAPoolDataSource.java:165)
      [Service Control] at org.jboss.jdbc.XADataSourceLoader.startService(XAData
      SourceLoader.java:330)
      [Service Control] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBean
      Support.java:93)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.util.ServiceControl.start(ServiceControl.ja
      va:97)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.Main.(Main.java:217)
      [Service Control] at org.jboss.Main$1.run(Main.java:121)
      [Service Control] at java.security.AccessController.doPrivileged(Native Me
      thod)
      [Service Control] at org.jboss.Main.main(Main.java:117)
      [MYSQL] Starting
      [MYSQL] Stopped
      [MYSQL] java.lang.ClassNotFoundException: org.jboss.pool.jdbc.xa.wrapper.XADataS
      ourceImpl
      [MYSQL] at javax.management.loading.MLet.findClass(MLet.java:800)
      [MYSQL] at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      [MYSQL] at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      [MYSQL] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)

      [MYSQL] at java.lang.Class.forName0(Native Method)
      [MYSQL] at java.lang.Class.forName(Class.java:120)
      [MYSQL] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLo
      ader.java:270)
      [MYSQL] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
      java:93)
      [MYSQL] at java.lang.reflect.Method.invoke(Native Method)
      [MYSQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [MYSQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [MYSQL] at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
      [MYSQL] at java.lang.reflect.Method.invoke(Native Method)
      [MYSQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [MYSQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [MYSQL] at org.jboss.Main.(Main.java:217)
      [MYSQL] at org.jboss.Main$1.run(Main.java:121)
      [MYSQL] at java.security.AccessController.doPrivileged(Native Method)
      [MYSQL] at org.jboss.Main.main(Main.java:117)
      [Service Control] Could not start DefaultDomain:service=XADataSource,name=MYSQL
      [Service Control] java.lang.ClassNotFoundException: org.jboss.pool.jdbc.xa.wrapp
      er.XADataSourceImpl
      [Service Control] at javax.management.loading.MLet.findClass(MLet.java:800
      )
      [Service Control] at java.lang.ClassLoader.loadClass(ClassLoader.java:297)

      [Service Control] at java.lang.ClassLoader.loadClass(ClassLoader.java:253)

      [Service Control] at java.lang.ClassLoader.loadClassInternal(ClassLoader.j
      ava:313)
      [Service Control] at java.lang.Class.forName0(Native Method)
      [Service Control] at java.lang.Class.forName(Class.java:120)
      [Service Control] at org.jboss.jdbc.XADataSourceLoader.startService(XAData
      SourceLoader.java:270)
      [Service Control] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBean
      Support.java:93)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.util.ServiceControl.start(ServiceControl.ja
      va:97)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.Main.(Main.java:217)
      [Service Control] at org.jboss.Main$1.run(Main.java:121)
      [Service Control] at java.security.AccessController.doPrivileged(Native Me
      thod)
      [Service Control] at org.jboss.Main.main(Main.java:117)
      [DefaultDS] Starting
      [DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS
      [DefaultDS] Started
      [MySQL] Starting
      [MySQL] XA Connection pool MySQL bound to java:/MySQL
      [MySQL] Stopped
      [MySQL] java.lang.NullPointerException
      [MySQL] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getConnection(
      XAPoolDataSource.java:165)
      [MySQL] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLo
      ader.java:330)
      [MySQL] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
      java:93)
      [MySQL] at java.lang.reflect.Method.invoke(Native Method)
      [MySQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [MySQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [MySQL] at org.jboss.util.ServiceControl.start(ServiceControl.java:97)
      [MySQL] at java.lang.reflect.Method.invoke(Native Method)
      [MySQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [MySQL] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [MySQL] at org.jboss.Main.(Main.java:217)
      [MySQL] at org.jboss.Main$1.run(Main.java:121)
      [MySQL] at java.security.AccessController.doPrivileged(Native Method)
      [MySQL] at org.jboss.Main.main(Main.java:117)
      [Service Control] Could not start DefaultDomain:service=XADataSource,name=MySQL
      [Service Control] java.lang.NullPointerException
      [Service Control] at org.opentools.minerva.jdbc.xa.XAPoolDataSource.getCon
      nection(XAPoolDataSource.java:165)
      [Service Control] at org.jboss.jdbc.XADataSourceLoader.startService(XAData
      SourceLoader.java:330)
      [Service Control] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBean
      Support.java:93)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.util.ServiceControl.start(ServiceControl.ja
      va:97)
      [Service Control] at java.lang.reflect.Method.invoke(Native Method)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1628)
      [Service Control] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanSe
      rverImpl.java:1523)
      [Service Control] at org.jboss.Main.(Main.java:217)
      [Service Control] at org.jboss.Main$1.run(Main.java:121)
      [Service Control] at java.security.AccessController.doPrivileged(Native Me
      thod)
      [Service Control] at org.jboss.Main.main(Main.java:117)
      [MySqlPool] Starting

      Does anyone know why I am having this problem?

      Thanks in advance.

        • 1. Re: JBoss appearing to hang???
          Sven Welte Newbie

          As I've said before please provide the section of your jboss config where you setup mysql and the version of jboss you have.
          Can you connect to mySql with "normal" jdbc ?
          Is there a firewall that my block the request ?

          regards
          Sven

          btw: I also had touble getting the jdbc stuff working because jboss sometimes has a "strange" view how the configfile should look like

          • 2. Re: JBoss appearing to hang???
            Hemal Newbie

            This is what I have in my JBoss.jcml file:


            org.gjt.mm.mysql.Driver,org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver



            org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
            mySQL
            jdbc:mysql://localhost:1099/test
            user
            password
            10
            1


            Thanks,

            • 3. Re: JBoss appearing to hang???
              Sven Welte Newbie

              Please use the latest JBoss 2.4.4. This may solve your issue.
              This line is wrong if you are using 2.4.x:
              org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl

              It should be:
              org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

              HTH
              Sven

              • 4. Re: JBoss appearing to hang???
                Sven Welte Newbie

                Afer looking at your last post I noticed that you specified port 1099 for mysql.
                Are you really really sure that mysql is running on this port ?
                Port 1099 normally is used by jboss/rmiregistry.

                bye
                Sven

                • 5. Re: JBoss appearing to hang???
                  Hemal Newbie

                  sorry roadrunner, that was my mistake! In the JBoss.jcml file I do not specify the port. It simply reads:


                  org.gjt.mm.mysql.Driver,org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver



                  org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl
                  mySQL
                  jdbc:mysql://localhost/test
                  user
                  password
                  10
                  1

                  • 6. Re: JBoss appearing to hang???
                    Timothy Washington Newbie

                    I have a similar problem where JBoss seems to hang when starting up. I'm using JBoss2.4.3 and mysql 11.13 on Redhat. I want to use mysql as the transactional datasource in JBoss and I think I've gotten close. However, running $JBOSS_DIST/bin/run.sh, I do not get any messages that any beans have been deployed (there are ejb-jars in the /deploy dir). Also, when trying to go to "http://localhost:8083/" a blank scrren returns instead of a page listing JBoss' MBeans. Any hints?

                    I changed the JBossCX(Minerva) and JDBC sections in the jboss.jcml file(tailored server.log file was too big to post):

                    1. ==>JDBC Section

                    org.gjt.mm.mysql.Driver



                    DefaultDS
                    org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl

                    jdbc:mysql://localhost:3306
                    1200000

                    10



                    2.==>Minerva Section

                    MinervaXADS

                    org.gjt.mm.mysql.Driver



                    • 7. Re: JBoss appearing to hang???
                      Adrian Brock Master

                      Without delving too deeply into your configurations.
                      I have seen this before.

                      There is a known problem here. An error in
                      configuration can lead to a hang rather than an
                      exception. This is probably a JDK bug????

                      I had this problem myself this hsqldb. I could start
                      JBoss as root but not under a normal profile. This
                      was an authority problem.

                      Somebody else reported it with postgres. It turned out
                      they didn't have the driver in their classpath
                      i.e. lib/ext.

                      I think you meant 8082 for the JMX adapter:-)

                      Regards,
                      Adrian

                      • 8. Re: JBoss appearing to hang???
                        Sven Welte Newbie

                        @all
                        Here is a tip that may solve some issues:
                        Do not omit the default values in the datasource config because sometimes jboss simply refuses to work if you're too minimalistic.

                        @Hemal:
                        Did you try to change the DataSourceClass ?

                        @Twashing:
                        I think you must not specify the RawXADataSourceLoader because MySQL does not support real XA-Transactions (hey, even transaction support is quite new).

                        bye
                        Sven

                        • 9. Re: JBoss appearing to hang???
                          Timothy Washington Newbie

                          I've tried my configuration a couple of ways now. Does anyone have a working JBoss2.4.3/MySQL setup. And if so, what needs to be set?

                          I've started MySQL, then start JBoss. From what I understand, the file that MUST be edited is the jboss.jcml file. Is there something else to be done? How are other people doing this?

                          tim

                          • 10. Re: JBoss appearing to hang???
                            Hemal Newbie

                            I have finally been able to configure mySQL to work with JBoss. It turned out that after I made the permission changes in the database and also changed the username + password settings in the jboss.jcml file, JBoss did not recognise these changes. So I decided to do a clean install and that worked!

                            Thanks for your help everyone.

                            Tim, what errors do you get?

                            Hemal

                            • 11. Re: JBoss appearing to hang???
                              Timothy Washington Newbie

                              My main error is that no beans seem to get deployed when JBoss starts. There is no stack trace, but with JBoss' default database. I'm used to seeing messages of ejbs being deployed and thier associated tables that get created. The part of the jboss.jcml file that I changed is in my last post (about 3 posts up)

                              I'll try to reinstall the database, like you did, and running a dead simple ejb client.

                              tim