To confirm... this is a line from the log file when I hit the nukes web interface:
20:25:45,967 FATAL [DatabasePollerFilter] Cannot obtain a database connection
Did you deploy and configure the nukes-ds.xml + the nukes user in your database ? (mysql or hsqldb ?)
in case of mysql, you should be able to do :
mysql -u nukes -p
then you type "nukes" as password. if it works that means your db is ok.
you should have a nukes-ds.xml with mysql deployed in server/default/deploy also
[root@trumpdeck deploy]# pwd
[root@trumpdeck deploy]# ls -l
-rw-r--r-- 1 root root 2066 Jul 23 15:32 cache-invalidation-service.xml
-rw-r--r-- 1 root root 2441 Oct 7 20:10 hsqldb-ds.xml
drwxr-xr-x 4 root root 4096 Jul 23 15:32 http-invoker.sar
-rw-r--r-- 1 root root 99366 Jul 23 15:32 jboss-jca.sar
-rw-r--r-- 1 root root 6291 Jul 23 15:32 jboss-local-jdbc.rar
drwxr-xr-x 3 root root 4096 Jul 23 15:32 jbossweb-tomcat41.sar
-rw-r--r-- 1 root root 11804 Jul 23 15:32 jboss-xa-jdbc.rar
drwxr-xr-x 3 root root 4096 Jul 23 15:32 jms
drwxr-xr-x 6 root root 4096 Jul 23 15:32 jmx-console.war
-rw-r--r-- 1 root root 730 Jul 23 15:32 jmx-ejb-connector-server.sar
drwxr-xr-x 3 root root 4096 Jul 23 15:32 jmx-invoker-adaptor-server.sar
drwxr-xr-x 3 root root 4096 Jul 23 15:32 jmx-rmi-adaptor.sar
-rw-r--r-- 1 root root 1598 Jul 23 15:32 mail-service.xml
drwxr-xr-x 2 root root 4096 Jul 23 15:32 management
-rw-r--r-- 1 root root 490 Oct 7 20:08 nukes-ds.xml
-rw-r--r-- 1 root root 581890 Oct 7 20:40 nukes.ear
-rw-r--r-- 1 root root 1848 Jul 23 15:32 properties-service.xml
-rw-r--r-- 1 root root 3924 Jul 23 15:32 schedule-manager-service.xml
-rw-r--r-- 1 root root 1802 Jul 23 15:32 scheduler-service.xml
-rw-r--r-- 1 root root 199 Jul 23 15:32 sqlexception-service.xml
-rw-r--r-- 1 root root 1145 Jul 23 15:32 transaction-service.xml
-rw-r--r-- 1 root root 1116 Jul 23 15:32 user-service.xml
-rw-r--r-- 1 root root 5286 Jul 23 15:32 uuid-key-generator.sar
Yeah, I've had that file in place all along. Makes sense to check the obvious stuff first, and I did. I also installed it into server/all/ just in case (saw it was missing when I did run.sh -c all as demonstrated in the redhat jboss script). I understand (basically) the difference between the 'default' jboss configuration and the 'all' jboss configuration, and I put it in both just in case, after I noticed problems.
I'm running the 'default' config generally though.
I don't know if it is relevant, but the rmi name being used is in one place "java:/NukesDS" and in another "java:NukesDS" (no slash). My debugging hasn't gotten any farther than that yet though.
Any idea what I should look into next? (I'm an experienced java programmer, but not familiar with ejbs and rmi very much.) Thanks.
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 apparently, based on my reading of the source, says "cannot create database connection" when /any/ sql exception occurs. This strikes me as misreporting the error and might be better changed in the source.)
yes, this is to prevent to go to nukes if no db is valid. this is in a servlet filter that checks periodically the database.
great to see, you found it, it will help other if we see such a problem again.