Hello - attempting to use the examples to get a feel for web4j.
Each example I try, I follow the instructions, setting all the configurations. However, I dont seem to be able to get a connection to my db.
My log file shows
Oct 25, 2015 12:35:18 AM hirondelle.web4j.Controller init
CONFIG: Calling ConnectionSource.init(ServletConfig).
Oct 25, 2015 12:35:18 AM hirondelle.web4j.config.ConnectionSrc init
CONFIG: Connection strings : (3) {
'ACCESS_CONTROL' = 'java:comp/env/jdbc/fish_access'
'DEFAULT' = 'java:comp/env/jdbc/fish'
'TRANSLATION' = 'java:comp/env/jdbc/fish_translation'
}
Oct 25, 2015 12:35:18 AM hirondelle.web4j.Controller init
FINE: Init of internal classes, ConnectionSource completed 174.297 ms after start.
Oct 25, 2015 12:35:18 AM hirondelle.web4j.Controller tryDatabaseInitAndStartupTasks
CONFIG: Trying database init and startup tasks.
Oct 25, 2015 12:35:18 AM hirondelle.web4j.Controller tryDatabaseInitAndStartupTasks
CONFIG: Attempting data layer startup tasks.
Oct 25, 2015 12:36:34 AM hirondelle.web4j.database.DbConfig checkHealthOf
SEVERE: Cannot connect to database named 'DEFAULT'. Is database running?
It looks like it is not reading the fish.xml db connection strings:
<!-- Example of a Tomcat configuration file for this application. -->
<!-- The 'YOUR_MYSQL_...' items refer to a MySQL account. The given values are phony. Please change them. -->
<!-- Assumes MySQL is running on the default port 3306. Please change if necessary. -->
<!-- Maps a URL context under Tomcat to a location on your file system. Please change 'docBase': -->
<Context docBase="/Users/Forrest/Documents/fish" reloadable="true">
<!-- How Tomcat should make Datasources, for the exclusive use of the application: -->
<Resource
name="jdbc/fish"
auth="Container"
type="javax.sql.DataSource"
username="root"
password="root"
driverClassName="com.mysql.jdbc.Driver"
maxActive="10"
maxIdle="5"
/>
<Resource
name="jdbc/fish_translation"
auth="Container"
type="javax.sql.DataSource"
username="root"
password="root"
driverClassName="com.mysql.jdbc.Driver"
maxActive="10"
maxIdle="5"
/>
<Resource
name="jdbc/fish_access"
auth="Container"
type="javax.sql.DataSource"
username="root"
password="root"
driverClassName="com.mysql.jdbc.Driver"
maxActive="10"
maxIdle="5"
/>
<!-- How Tomcat should look for user names and passwords, when confirming end user credentials during login: -->
<Realm
className="org.apache.catalina.realm.JDBCRealm"
digest="SHA-1"
driverName="com.mysql.jdbc.Driver"
roleNameCol="Role"
userCredCol="Password"
userNameCol="Name"
userRoleTable="UserRole"
userTable="Users"
connectionName="root"
connectionPassword="root"
debug="99"
/>
</Context>
I'm running a mac osx with a virtual machine running ubuntu server with mysql running. I normally run tomcat on the vm too, but for ease, I'm running that locally.
I've read through the other forum posts, but no one seems to have had this issue .Any ideas?
Cheers
Grant