9 Replies Latest reply on Oct 9, 2003 10:20 PM by skywind8

    Table Not Found Error on nuke_services_attributes

    skywind8

      I deployed nukes from cvs last night onto a fresh jboss installation (rc4), and I'm having trouble with these errors, seen in the jboss logs during startup. The tables listed DO exist, and squirrel sql complains at me that they already exist if I try to recreate them.

      03:23:06,359 ERROR [JDBCPersistenceManager] Cannot sync attribute
      java.sql.SQLException: Table not found: NUKE_SERVICES_ATTRIBUTES in statement [SELECT pn_value FROM nuke_services_attributes WHERE pn_sid='org.jbo
      ss.nukes.system.JDBCDeploymentScanner$TestModule/test' AND pn_aid='Root']
      at org.hsqldb.Trace.getError(Unknown Source)
      at org.hsqldb.Result.(Unknown Source)
      at org.hsqldb.jdbcConnection.executeHSQL(Unknown Source)
      at org.hsqldb.jdbcConnection.execute(Unknown Source)
      at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
      at org.hsqldb.jdbcStatement.executeQuery(Unknown Source)
      at org.hsqldb.jdbcPreparedStatement.executeQuery(Unknown Source)
      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:289)
      at org.jboss.nukes.system.JDBCPersistenceManager.syncAttribute(JDBCPersistenceManager.java:90)


      03:23:48,782 ERROR [JDBCDeploymentScanner] An error occured during the JDBC scan
      java.sql.SQLException: Table not found: NUKE_SERVICES in statement [SELECT pn_sid, pn_last_modified, pn_class_name FROM nuke_services]
      at org.hsqldb.Trace.getError(Unknown Source)
      at org.hsqldb.Result.(Unknown Source)
      at org.hsqldb.jdbcConnection.executeHSQL(Unknown Source)
      at org.hsqldb.jdbcConnection.execute(Unknown Source)
      at org.hsqldb.jdbcStatement.fetchResult(Unknown Source)
      at org.hsqldb.jdbcStatement.executeQuery(Unknown Source)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:213)
      at org.jboss.nukes.system.JDBCDeploymentScanner.job(JDBCDeploymentScanner.java:324)
      at org.jboss.nukes.system.JDBCDeploymentScanner.scan(JDBCDeploymentScanner.java:220)
      at org.jboss.nukes.system.JDBCDeploymentScanner$1.run(JDBCDeploymentScanner.java:89)
      at java.util.TimerThread.mainLoop(Timer.java:432)
      at java.util.TimerThread.run(Timer.java:382)
      03:23:49,644 ERROR [AbstractDeploymentScanner$ScannerThread] Scanning failed; continuing
      java.io.FileNotFoundException: /usr/local/jboss/server/default/nukes
      at org.jboss.net.protocol.file.FileURLLister.listMembers(FileURLLister.java:38)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:374)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

      03:23:53,212 INFO [EARDeployer] Started J2EE application: file:/usr/local/jboss/server/default/deploy/nukes.ear

        • 1. Re: Table Not Found Error on nuke_services_attributes
          skywind8

          Further details...

          From nukes (once the app loads), I see "Cannot connect to database."

          From squirrel sql, I can tell that hsqldb is operating just fine.

          All of the "table not found" errors in the log appear to actually mean "cannot obtain a database connection".

          I am guessing that this means Nukes or Jboss is having trouble finding the JDBC url properties necessary to know where to find the database.

          What I haven't figured out is where that configuration occurs and why it isn't working. I'll continue looking around but if anyone knows what I'm missing, please help. Thanks.

          • 2. Re: Table Not Found Error on nuke_services_attributes
            netlive

            mybe you miss one file ( like me )
            copy the datsource discription nukes\src\resources\hsqldb\nukes-ds.xml file to your jboss deploy dir jboss/server/default/deploy/

            • 3. Re: Table Not Found Error on nuke_services_attributes
              skywind8

              I had already copied in the nukes-ds.xml file. I have also tried this with JBOSS rc2 and rc4 - both show the same results.

              Some tidbits from the startup log...

              08:37:44,077 INFO [MainDeployer] Starting deployment of package: file:/usr/local/jboss-3.2.2RC2/server/default/deploy/nukes-ds.xml
              08:37:44,277 INFO [STDOUT] server.properties not found, using command line or default properties
              08:37:44,283 INFO [STDOUT] Opening database: /usr/local/jboss-3.2.2RC2/server/default/data/hypersonic/default
              08:37:44,286 INFO [STDOUT] HSQLDB server 1.7.1 is running
              08:37:44,288 INFO [STDOUT] Use SHUTDOWN to close normally. Use [Ctrl]+[C] to abort abruptly


              08:38:06,083 INFO [DLQ] Starting
              08:38:06,110 INFO [DLQ] Bound to JNDI name: queue/DLQ
              08:38:06,113 INFO [DLQ] Started
              08:38:06,118 INFO [TxConnectionManager] Starting
              08:38:06,153 INFO [NukesDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=N
              ukesDS to JNDI name 'java:/NukesDS'
              08:38:06,155 INFO [TxConnectionManager] Started


              08:38:41,746 INFO [MainDeployer] Starting deployment of package: file:/usr/local/jboss-3.2.2RC2/server/default/deploy/nukes.ear
              08:38:41,964 INFO [EARDeployer] Init J2EE application: file:/usr/local/jboss-3.2.2RC2/server/default/deploy/nukes.ear
              08:38:54,396 ERROR [JDBCPersistenceManager] Cannot sync attribute
              java.sql.SQLException: Table not found: NUKE_SERVICES_ATTRIBUTES in statement [SELECT pn_value FROM nuke_services_attributes WHERE p
              n_sid='org.jboss.nukes.core.modules.core.CoreModule/core' AND pn_aid='DisplayName']

              As best I can tell, I've followed the actual instructions exactly (and I redid it a few times to make sure), and still something is broken.

              I'm running under RedHat, "Linux 2.4.20-8smp #1 SMP". I used "run.sh" to start JBoss.

              • 4. Re: Table Not Found Error on nuke_services_attributes

                it seems you simply did not go through the create table process, so the EJB container suppose a table is created for EJBs and does not find it.

                you should go in the module sources in src/resources/hsqldb there should be a setup.ddl file that contains sql statements to execute (create tables)

                julien

                • 5. Re: Table Not Found Error on nuke_services_attributes
                  lixom

                  I gave this help to 'bedathur', with password problem, which kicked in for his installation. Maybe that's what you are struggling with as well.... See message below..


                  When I used SQuirreL to create database tables I found out that I could not include the INSERT statements at the same time.

                  Run only the INSERT statements again and probably you should be fine.

                  /Jesper

                  • 6. Re: Table Not Found Error on nuke_services_attributes
                    skywind8

                    Actually, if you read my post more carefully, I did create the tables, and I verified they were present, and I looked at their contents using squirrel sql, with no problems.

                    The real issue is "cannot create a database connection", even though the error message makes things look like it's a missing table. I can recreate the sql exception with hsqldb by not having the database up at all. The exception reporting is just poor.

                    The real issue is, why can't nukes talk to the database, when squirrel sql can?

                    • 7. Re: Table Not Found Error on nuke_services_attributes
                      skywind8

                      Attached is a squirrel screenshot showing the tables, which exist, and have data in them. I'm still wrestling with this error.

                      I added some debug statements to the source, ran build and deploy, and I can confirm that it's getting a connection object and a statement object that are non-null, and this error triggers when it tries to run execute query. I'm going to experiment some more to see what else I can figure out, especially connection properties and whatnot. But I'd like help if anyone has ideas.

                      • 8. Re: Table Not Found Error on nuke_services_attributes

                        did you deploy nukes-ds.xml with HSQLDB ? is it located in nukes/src/resources/hsqldb/nukes-ds.xml

                        julien

                        • 9. Re: Table Not Found Error on nuke_services_attributes
                          skywind8

                          Problem solved (even if I don't fully understand the solution)...

                          The URL I was using to connect to the database via squirrel did not actually connect me to the same database place that nukes itself was trying to use. Thus, the "table not found" was valid, although I could see tables in a place that I thought was right.

                          I'm still not certain what the proper squirrel url is to use.

                          I created a SqlServlet using a standard JDBC connection, and did a copy and paste of the URL from nukes-ds.xml for use in the SqlServlet. Then I used the SqlServlet to run my create commands, which then actually created the tables in the right place.

                          (Nukes was misreporting the "could not create a database connection" - it really meant "a sql exception occurred".)