raby / play2-maven-plugin

Automatically exported from code.google.com/p/play2-maven-plugin
0 stars 0 forks source link

Ebean evolution are not getting applied #46

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
 I have just added one more column  i am expecting some evolution get applied on database But it doesn't. Also i have used 
<serverJvmArgs>-DapplyEvolutions.default=true</serverJvmArgs>

in properties as well as in plugin configurations with no luck. 
Can you pleas look into this. Right now i am doing changes to database manually 
then it runs 

Original issue reported on code.google.com by coolbhus...@gmail.com on 28 Aug 2014 at 9:36

GoogleCodeExporter commented 9 years ago
Your <serverJvmArgs> configuration parameter value is proper.

What "properties" you mean? "application.conf" file? Is it possible to 
configure it there?

Are your evolutions in "conf/evolutions/default" directory?

Can you attach (or send me directly) your "pom.xml" or at least plugin 
configuration and log file from "mvn process-classes play:start -X" command?

Original comment by gslowiko...@gmail.com on 29 Aug 2014 at 7:01

GoogleCodeExporter commented 9 years ago
I have attached my pom.xml.I have tried with  play 2.3 test project  of 
computer database and it didn't work with me. Also in application.conf 

# Evolutions
# ~~~~~
# You can disable evolutions if needed
# evolutionplugin=disable

These lines mean that it is enable by default. To disable it i just have to 
remove comment of last line. 
      For me it was previously working with me when  i was developing though activator. Now i am completely using maven and so its not working now. If anything is required please tell me.

Thanks 

Original comment by coolbhus...@gmail.com on 29 Aug 2014 at 12:28

Attachments:

GoogleCodeExporter commented 9 years ago
Your pom.xml looks good.

Send me a log from "mvn process-classes play:start -X" execution.

Check this project:
https://play2-maven-plugin.googlecode.com/svn/tags/test-projects-1.0.0-alpha8/pl
ay23/java/computer-database

Does it work for you (it works for me)?

Original comment by gslowiko...@gmail.com on 29 Aug 2014 at 1:27

GoogleCodeExporter commented 9 years ago
I created ebean test project with your pom.xml and everything works.

You didn't send me your log file. Should I close this issue?

Original comment by gslowiko...@gmail.com on 2 Sep 2014 at 8:03

GoogleCodeExporter commented 9 years ago
Also play server started but failed since database schema is not updated.
It suppose to be get applied by evolutions

On Wed, Sep 3, 2014 at 5:25 PM, Bhushan Sonawane <coolbhushans@gmail.com>
wrote:

Original comment by coolbhus...@gmail.com on 3 Sep 2014 at 11:57

GoogleCodeExporter commented 9 years ago
Give me the log, please.

Original comment by gslowiko...@gmail.com on 3 Sep 2014 at 11:58

GoogleCodeExporter commented 9 years ago
Here it is

Original comment by coolbhus...@gmail.com on 3 Sep 2014 at 2:09

Attachments:

GoogleCodeExporter commented 9 years ago
You have "java.lang.OutOfMemoryError: PermGen space" error.

Increase memory amount for Maven. Read comments about it in "mvn" or "mvn.bat"
scripts in "bin" directory of Maven installation.

For example in Windows I defined system variable:
MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=256m

Original comment by gslowiko...@gmail.com on 3 Sep 2014 at 2:16

GoogleCodeExporter commented 9 years ago
There is a link on the end of the log:
https://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError

Original comment by gslowiko...@gmail.com on 3 Sep 2014 at 3:51

GoogleCodeExporter commented 9 years ago
I am already having -Xms1024m -Xmx3048m -XX:MaxPermSize=1024m and still
some times i get error and some times it compiles . Anyway though if it
compiles successfully still it does not applies evolutions.

Original comment by coolbhus...@gmail.com on 3 Sep 2014 at 5:11

GoogleCodeExporter commented 9 years ago
I found, you have "MAVAN_OPTS" system variable. Change it to "MAVEN_OPTS".

If it will compile without problems, give me a log showing problem with 
evolutions, please.

Original comment by gslowiko...@gmail.com on 3 Sep 2014 at 8:37

GoogleCodeExporter commented 9 years ago
Ok i have change mavan to maven . And here is the new log 

Original comment by coolbhus...@gmail.com on 4 Sep 2014 at 9:53

Attachments:

GoogleCodeExporter commented 9 years ago
In this log I see:
- play2:ebean-enhance mojo works
- avaje-ebeanorm-mavenenhancer:enhance mojo throws some exceptions, why you 
need two ebean enhancers?
- play2:start mojo with "-DapplyEvolutions.default=true" probably works, I 
don't see any evolutions related errors, if they are in "logs/application.log" 
file, attach it as well.

Original comment by gslowiko...@gmail.com on 4 Sep 2014 at 10:03

GoogleCodeExporter commented 9 years ago
Application log file 

Original comment by coolbhus...@gmail.com on 4 Sep 2014 at 10:14

GoogleCodeExporter commented 9 years ago

Original comment by coolbhus...@gmail.com on 4 Sep 2014 at 10:14

Attachments:

GoogleCodeExporter commented 9 years ago
I see you have two databases: "default" and "secondary". Probably (I didn't 
test it) you should set <serverJvmArgs> value to 
"-DapplyEvolutions.default=true -DapplyEvolutions.secondary=true".
Anyway, "-DapplyEvolutions.default=true" is passed to Play! server properly. If 
it wouldn't, you would see a line like this:

2014-09-04 12:53:43,171 - [WARN] - from play in main 
Your production database [default] needs evolutions! 

Anyway, I tried to modify my test project to work with two databases, but 
without success. Could you contact me directly and send me instructions, how to 
configure Play! application to work with two databases?

Original comment by gslowiko...@gmail.com on 4 Sep 2014 at 11:16

GoogleCodeExporter commented 9 years ago
I found something. Add:

db.default.logStatements=true
db.secondary.logStatements=true
logger.com.jolbox=DEBUG

to your application.conf, rebuild project (or manually copy "application.conf" 
file to "target/classes"), run "mvn play2:start" once again and send me 
"application.log".

Original comment by gslowiko...@gmail.com on 4 Sep 2014 at 11:41

GoogleCodeExporter commented 9 years ago
Latest application log file

Original comment by coolbhus...@gmail.com on 4 Sep 2014 at 4:19

Attachments:

GoogleCodeExporter commented 9 years ago
Can you create test project showing this problem? I just cannot reproduce it.

Did this work in Play! SBT build before?

Original comment by gslowiko...@gmail.com on 4 Sep 2014 at 4:50

GoogleCodeExporter commented 9 years ago
With sbt it was working fine for me. also  previously   i have tried with 
sample project of 2.3 computer database but it didnt work for me. Anyway will 
try one more time and let you know

Original comment by coolbhus...@gmail.com on 4 Sep 2014 at 5:02

GoogleCodeExporter commented 9 years ago
I cannot reproduce it without test project showing this issue.

Original comment by gslowiko...@gmail.com on 5 Nov 2014 at 2:36