2 Replies Latest reply on Jul 12, 2003 6:32 PM by drej

    Hypersonic won't start!

    drej Newbie


      I really hope someone is knowledgable in this area. Basically Hypersonic was working fine with a mini-app of mine. My app was adding a series of small images (30KB each) to the db (via client calls to a session bean, then to an entity bean) , when it crashed. Now when I start JBOSS (ver.3.2.0) , I get the following errors:

      21:55:24,616 INFO [ClientUserTransactionService] Starting
      21:55:24,716 INFO [ClientUserTransactionService] Started
      21:55:24,718 INFO [CachedConnectionManager] Starting
      21:55:24,734 INFO [CachedConnectionManager] Started
      21:55:24,736 INFO [TxConnectionManager] Starting
      21:55:24,821 INFO [DefaultDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=DefaultDS to JNDI name 'java:/DefaultDS'
      21:55:24,822 INFO [TxConnectionManager] Started
      21:55:24,823 INFO [PersistenceManager] Starting
      21:55:31,457 ERROR [PersistenceManager] Starting failed
      org.jboss.mq.SpyJMSException: Could not resolve uncommited transactions. Message recovery may not be accurate; - nested throwable: (org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection is broken: Connection refused); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Connection is broken: Connection refused)))
      at org.jboss.mq.pm.jdbc2.PersistenceManager.resolveAllUncommitedTXs(PersistenceManager.java:276)
      at org.jboss.mq.pm.jdbc2.PersistenceManager.startService(PersistenceManager.java:1299)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
      at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966)
      at $Proxy11.start(Unknown Source)

      <<skipped a bunch of stuff>>

      21:55:31,687 INFO [MainDeployer] Starting deployment of package: file:/project/course/490/quizat/jboss-3.2.0/server/default/deploy/ejb-management.jar
      21:55:32,183 INFO [EJBDeployer] looking for nested deployments in : file:/project/course/490/quizat/jboss-3.2.0/server/default/deploy/ejb-management.jar
      21:55:33,870 INFO [EjbModule] Creating
      21:55:33,902 INFO [EjbModule] Deploying MEJB
      21:55:34,401 INFO [StatelessSessionContainer] Creating
      21:55:34,438 INFO [StatelessSessionInstancePool] Creating
      21:55:34,439 INFO [StatelessSessionInstancePool] Created
      21:55:34,487 INFO [StatelessSessionContainer] Created
      21:55:34,489 INFO [EjbModule] Created
      21:55:34,496 INFO [EjbModule] Starting
      21:55:34,497 INFO [StatelessSessionContainer] Starting
      21:55:35,164 INFO [StatelessSessionInstancePool] Starting
      21:55:35,165 INFO [StatelessSessionInstancePool] Started
      21:55:35,168 INFO [StatelessSessionContainer] Started
      21:55:35,169 INFO [EjbModule] Started
      21:55:35,301 INFO [MainDeployer] Deployed package: file:/project/course/490/quizat/jboss-3.2.0/server/default/deploy/ejb-management.jar
      21:55:35,381 INFO [MainDeployer] Starting deployment of package: file:/project/course/490/quizat/jboss-3.2.0/server/default/deploy/jmx-ejb-adaptor.jar
      21:55:35,881 INFO [EJBDeployer] looking for nested deployments in : file:/project/course/490/quizat/jboss-3.2.0/server/default/deploy/jmx-ejb-adaptor.jar
      21:55:37,562 INFO [STDOUT] Server.run/init: java.sql.SQLException: Unexpected end of command: Unexpected end of command in statement [INSERT INTO IMAGE_DATA VALUES(26,'aced0005737200246f72672e6a64

      And there are many more lines of hex values. It seems it cannot connect because there was a commit problem. I would just like to wipe the slate clean so I can connect to Hypersonic again.

      Thanks for your time.


        • 1. Re: Hypersonic won't start!
          null null Newbie

          try to start it from the minimal configuraton with Hypersonic service

          (I gues you are now using default)
          JBOSS_HOME/bin/run.sh -c minimal

          have no other clues



          • 2. Re: Hypersonic won't start!
            drej Newbie

            Well, I've found the answer to my question after much searching. Basically, when you're adding data to your Hypersonic database, even though it stores all the data in memory, any changes are saved in a text script file, such that the database can be recreated when Hypersonic restarts. Unfortunately, this is a simple text file and can get very large, very soon, especially if you're saving any binary data to the db. Anyway, for various reasons (I ran out of disk quota, so the script was incomplete), the script may get corrupt and you'll get messges similar to what I had in the original post. To get rid of those messages and have Hyperonic work again you have to delete the corrupt script file that Hypersonic generated, as follows:

            1. Shutdown the JBOSS server if it's running.
            2. Go to the directory: jboss-3.2.0/server/default/data/hypersonic
            This is the folder that holds the script file for the database and a properties file. If you delete these files, the default ones will be recreated when you restart JBOSS. Note that deleting these files will essentially delete the data in your database.
            3. Restart JBOSS and you should be okay with a clean database.