Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema not properly created on first start #442

Closed
jbrtrnd opened this issue Jul 23, 2013 · 14 comments
Closed

Schema not properly created on first start #442

jbrtrnd opened this issue Jul 23, 2013 · 14 comments
Assignees
Milestone

Comments

@jbrtrnd
Copy link

jbrtrnd commented Jul 23, 2013

System overview :

  • Ubuntu Server 13.04
  • Tomcat 7
  • MySQL 5.5

I've started from a clean and fresh installation of my server. With only OpenSSH, Apache2 and Tomcat installed by the ubuntu server setup.

1. JDBC Driver class :

Error log :

WARNING: Failed to register in JMX: javax.naming.NamingException: com.mysql.jdbc.Driver

Solved by copying "path/to/tomcat_webapps_folder/ROOT/WEB-INF/lib/gems-gems-jdbc-mysql-5.1.24-lib-mysql-connector-java-5.1.24.jar" to "/usr/share/java/gems-gems-jdbc-mysql-5.1.24-lib-mysql-connector-java-5.1.24.jar"

2. DB Schema
I didn't fix it, so I can't setup jobsworth.

Error log :

ActiveRecord::JDBCError: Table 'jobsworth.tasks' doesn't exist: ALTER TABLE `tasks` ADD `milestone_id` int(11)

In my DB, the only tables created are "milestones" and "schema_migration".
Maybe a review of table creation order is necessary ?

@ghost ghost assigned nasa42 Jul 24, 2013
@ari
Copy link
Owner

ari commented Jul 24, 2013

Thanks for your feedback on (1). I'll add some notes to the documentation about installing db drivers. As for (2)... looks like the automatic script which should install the schema isn't working right. I've asked my colleague to look at it.

@nelinnemann
Copy link

I have the exact same problems using a CentOS 6.4 x86_64 install.

Only the bare minimal.

tomcat6 and mysql

edited the context.xml to reflect my DB setup

did the same step 1 as jbrtrnd

Upload ROOT.war to /usr/share/tomcat6/webapps

go to 10.0.80.60:8080/ROOT

get this error

org.jruby.rack.RackInitializationException: An error has occurred, all later migrations canceled:

ActiveRecord::JDBCError: Table 'jwdb.tasks' doesn't exist: ALTER TABLE `tasks` ADD `milestone_id` int(11)

After restarting tomcat and reloading the page a new error occurs.

org.jruby.rack.RackInitializationException: An error has occurred, all later migrations canceled:

ActiveRecord::JDBCError: Table 'milestones' already exists: CREATE TABLE `milestones` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `company_id` int(11), `project_id` int(11), `user_id` int(11), `name` varchar(255), `description` text, `due_at` datetime, `position` int(11)) ENGINE=InnoDB DEFAULT CHARSET=utf8

@nelinnemann
Copy link

Hi
Well I would not let this stop me so I downloaded the tar.gz file of jobsworth v4.b1 and went through the install of ruby.

Adjusted the entries in config/database.yml and ran the bin/jobsworth setup.

After the creation of the database I can now sucessfully use jobsworth.

Its not an ideal approach but it works :-)

@ari
Copy link
Owner

ari commented Jul 30, 2013

Nicely done! Vikrant and I have just been talking about how to automate this, but that's one way to sort it out....

@nelinnemann
Copy link

Hi I can use a mysqldump of the jwdb on a new host but the encrypted password does not work on the new host.

I get to the login screen with no errors but I just cant login.

Is there any way to reset the password when email is not running?

For reference here is the mysqldump sql

https://docs.google.com/file/d/0BxalvZxv-zSEOWJ0WnoxN25Iek0/edit?usp=sharing

@ari
Copy link
Owner

ari commented Aug 1, 2013

Unfortunately email is the only way since the passwords are salted and hashed. This is actually a feature...

@blakkheimgw
Copy link

Hello,

I encounter the same issue when installing the app from the .war package. The error message is :

ActiveRecord::JDBCError: Table 'jobsworth.tasks' doesn't exist: ALTER TABLE tasks ADD milestone_id int(11)

Is there any fix for this one ?

Regards.

@nasa42
Copy link
Collaborator

nasa42 commented Aug 28, 2013

We have acknowledged this issue and a fix is coming in beta2.

Cheers.

  • Vikrant

On 28 August 2013 19:59, blakkheimgw notifications@github.com wrote:

Hello,

I encounter the same issue when installing the app from the .war package.
The error message is :

ActiveRecord::JDBCError: Table 'jobsworth.tasks' doesn't exist: ALTER
TABLE tasks ADD milestone_id int(11)

Is there any fix for this one ?

Regards.


Reply to this email directly or view it on GitHubhttps://github.com//issues/442#issuecomment-23418772
.

@blakkheimgw
Copy link

Ok, thanks ;)

Is there a way to test the app anyway ? And what is the approximative release date of the beta 2 ?

Regards.

@ari
Copy link
Owner

ari commented Aug 29, 2013

If you know Rails you can use rake to run the schema load task.

@sasselin
Copy link

.... how to install this with ruby? Not ROOT.war... have the same error

@eresonance
Copy link

Thanks for fixing this, I just ran into this issue today!

Is there a way we could get a new .war file or is the beta2 still a ways-away yet?

@Slind14
Copy link

Slind14 commented Nov 14, 2013

@nelinnemann How did you fix this, I don´t get it working ?

@ari Is it possible to update the beta (alpha ?), that it is useable ?

@balojs
Copy link

balojs commented Dec 12, 2013

nelinnemann
How did you fix this, I don´t get it working ?

nasa42 added a commit to webstream-io/jobsworth that referenced this issue Dec 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants