My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 783: Migration issue when creating new attribute on Project entity.
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by monica.d...@sonyericsson.com, Nov 25, 2010
Affected Version: 2.1.5

What steps will reproduce the problem?

1. Create a new attribute on Project entity class, like: 
@Column(id = 9, notNull = false)
protected char stuff;
2. In migration Schema call db.projects().all() 

What is the expected output? What do you see instead?

It is expected that the migration is executed succesfully but instead I see the error bellow :

Upgrading database schema from version 47 to 48 ...
Exception in thread "main" java.lang.NullPointerException
	at com.google.gerrit.reviewdb.Project_Access_projects_GwtOrm$$2.bindOneFetch(Unknown Source)
	at com.google.gwtorm.jdbc.JdbcAccess.queryList(JdbcAccess.java:141)
	at com.google.gerrit.reviewdb.Project_Access_projects_GwtOrm$$2.all(Unknown Source)
	at com.google.gerrit.server.schema.Schema_51.migrateData(Schema_51.java:21)
	at com.google.gerrit.server.schema.SchemaVersion.upgradeFrom(SchemaVersion.java:95)
	at com.google.gerrit.server.schema.SchemaVersion.check(SchemaVersion.java:77)
	at com.google.gerrit.server.schema.SchemaUpdater.update(SchemaUpdater.java:56)
	at com.google.gerrit.pgm.Init$SiteRun.upgradeSchema(Init.java:190)
	at com.google.gerrit.pgm.Init.run(Init.java:85)
	at com.google.gerrit.pgm.util.AbstractProgram.main(AbstractProgram.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.google.gerrit.launcher.GerritLauncher.invokeProgram(GerritLauncher.java:155)
	at com.google.gerrit.launcher.GerritLauncher.mainImpl(GerritLauncher.java:89)
	at com.google.gerrit.launcher.GerritLauncher.main(GerritLauncher.java:47)
	at Main.main(Main.java:25)

Please provide any additional information below.

When I do the same for Change entity it works properly both for Postgres and H2.
The error above occurs only for H2, Postgres works as expected.
I did not test MySQl.
I tried but I could not figure out what is going on. 
It is a simple modification. Could anyone help?
Sign in to add a comment

Powered by Google Project Hosting