I have installed XPlanner 0.5.3 sometime ago and upgraded to a development version from CVS later. My DB backbone is postgres. So long so fine.
Now I tried the latest version from CVS and I cannot see any project any longer: "No projects defined yet."
I know, the latest version is not recommended for production use, but I fear that the problem will persist for me in the final version because nobody else complained about this.
Interestingly I can see all tasks using the team time sheet. But when I click on a certain task link I get "You are not authorized to perform the attempted action." written on an empty page.
I have upgraded my DB scheme from o.5.3 to 0.6preX and then 0.6preY by hand, after transforming the provided MySQL update commands to PostGres (BTW: is anybody else using PostGres and could provide me a correct translation, I'm not so familar with SQL dialects)
Now I don't know what's wrong. Might it be related to the empty "lft" and "rgt" columns of my "role" table?
Many thank in advance for any help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It sounds like XPlanner thinks you don't have permissions to view the projects (the fact that the timesheet shows tasks is probably an authorization bug). Did you run the upgrade-related target in Ant to convert roles, etc.?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> [java] Hibernate: select role.id as id, role.role as role, role.lft as
lft, role.rgt as rgt from role role where (r ole.role=? )
> [java] net.sf.hibernate.PropertyAccessException: Null value was assigned
to a property of primitive type setter of
com.technoetic.xplanner.domain.Role.left
> [java] at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicProperty
Accessor.java:42)
> [java]
at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(Abstract
EntityPersister.java:222 )
> [java]
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2174)
> [java] at net.sf.hibernate.loader.Loader.doQuery(Loader.java:240)
It appears that there is a NULL value in the left (lft) column of the row table. The rgt and lft columns should not be null.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[java] - Could not execute JDBC batch update
[java] Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:107)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:122)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
[java] at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
[java] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
[java] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
[java] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.run(BootstrapSystemUser.java:56)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.main(BootstrapSystemUser.java:97)
[java] - Could not synchronize database state with session
[java] net.sf.hibernate.JDBCException: Could not execute JDBC batch update
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:129)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
[java] at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
[java] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
[java] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
[java] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.run(BootstrapSystemUser.java:56)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.main(BootstrapSystemUser.java:97)
[java] Caused by: Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:107)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:122)
[java] ... 11 more
[java] net.sf.hibernate.JDBCException: Could not execute JDBC batch update
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:129)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
[java] at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
[java] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
[java] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
[java] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.run(BootstrapSystemUser.java:56)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.main(BootstrapSystemUser.java:97)
[java] Caused by: Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:107)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:122)
[java] ... 11 more
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The columns should have "not null" constraints. The roles are initialized in the BootstrapSystemUser class which is invoked (indirectly) by the upgrade-0.5.3-0.6.0 Ant target. That's why I was asking if you had run this target. I'm not sure why you are manually trying to insert rgt,lft column values in the table. It will definitely not work correctly with zeros placed in those columns.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did the upgrade manually because I'm not upgrading from 0.5.3, as I already said, but from another 0.6pre version to the current one. So I have first translate sql/mysql/xplanner_0-5-3_to_0-6-0.sql tp porstgres dialect and the I picked out the necessary sql statements to synchronize the schemes.
But the good news is that after setting lft and rgt to zero and then running the upgrade-0.5.3-0.6.0 Ant task everything works fine.
Thank you for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Create the empty table using your modified SQL script. Run the upgrade Ant target. The Ant target will create the roles with the correct rgt,lft values.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have installed XPlanner 0.5.3 sometime ago and upgraded to a development version from CVS later. My DB backbone is postgres. So long so fine.
Now I tried the latest version from CVS and I cannot see any project any longer: "No projects defined yet."
I know, the latest version is not recommended for production use, but I fear that the problem will persist for me in the final version because nobody else complained about this.
Interestingly I can see all tasks using the team time sheet. But when I click on a certain task link I get "You are not authorized to perform the attempted action." written on an empty page.
I have upgraded my DB scheme from o.5.3 to 0.6preX and then 0.6preY by hand, after transforming the provided MySQL update commands to PostGres (BTW: is anybody else using PostGres and could provide me a correct translation, I'm not so familar with SQL dialects)
Now I don't know what's wrong. Might it be related to the empty "lft" and "rgt" columns of my "role" table?
Many thank in advance for any help.
It sounds like XPlanner thinks you don't have permissions to view the projects (the fact that the timesheet shows tasks is probably an authorization bug). Did you run the upgrade-related target in Ant to convert roles, etc.?
Yes, I did, but produced some exceptions and did not help:
$ build upgrade-0.5.3-0.6.0
Buildfile: build.xml
_init:
build.product:
bootstrap.systemuser:
[echo] xplanner.overrides=xplanner-custom.properties
[java] - Hibernate 2.1.2
[java] - hibernate.properties not found
[java] - using CGLIB reflection optimizer
[java] - Mapping class: com.technoetic.xplanner.security.auth.Permission -> permission
[java] - Mapping class: com.technoetic.xplanner.domain.RoleAssociation -> person_role
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.RoleAssociation, IllegalArgumentExceptio n: Cannot find matching method/constructor
[java] - Mapping class: com.technoetic.xplanner.statistics.DataSample -> datasample
[java] - reflection optimizer disabled for: com.technoetic.xplanner.statistics.DataSample, IllegalArgumentException : Cannot find matching method/constructor
[java] - Mapping class: com.technoetic.xplanner.domain.Project -> project
[java] - Mapping class: com.technoetic.xplanner.domain.Iteration -> iteration
[java] - Mapping class: com.technoetic.xplanner.domain.UserStory -> story
[java] - Mapping class: com.technoetic.xplanner.domain.Task -> task
[java] - Mapping class: com.technoetic.xplanner.domain.TimeEntry -> time_entry
[java] - Mapping class: com.technoetic.xplanner.domain.Integration -> integration
[java] - Mapping class: com.technoetic.xplanner.domain.Note -> note
[java] - Mapping class: com.technoetic.xplanner.domain.Role -> role
[java] - Mapping class: com.technoetic.xplanner.domain.Person -> person
[java] - Mapping class: com.technoetic.xplanner.history.HistoricalEvent -> history
[java] - Mapping class: com.technoetic.xplanner.file.File -> xfile
[java] - Mapping class: com.technoetic.xplanner.file.Directory -> xdir
[java] - processing one-to-many association mappings
[java] - Mapping collection: com.technoetic.xplanner.domain.Project.iterations -> iteration
[java] - Mapping collection: com.technoetic.xplanner.domain.Iteration.userStories -> story
[java] - Mapping collection: com.technoetic.xplanner.domain.UserStory.tasks -> task
[java] - Mapping collection: com.technoetic.xplanner.domain.Task.timeEntries -> time_entry
[java] - Mapping collection: com.technoetic.xplanner.file.Directory.subdirectories -> xdir
[java] - Mapping collection: com.technoetic.xplanner.file.Directory.files -> xfile
[java] - processing one-to-one association property references
[java] - processing foreign key constraints
[java] - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] - Use outer join fetching: true
[java] - DBCP using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/xplanner
[java] - Connection properties: {user=cvsadmin, password=}
[java] - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not r ecommended)
[java] - Use scrollable result sets: true
[java] - Use JDBC3 getGeneratedKeys(): false
[java] - Optimize cache for minimal puts: false
[java] - echoing all SQL to stdout
[java] - Query language substitutions: {true='Y', false='N'}
[java] - cache provider: net.sf.ehcache.hibernate.Provider
[java] - instantiating and configuring caches
[java] - building session factory
[java] - reflection optimizer disabled for: com.technoetic.xplanner.history.HistoricalEvent, IllegalArgumentExcepti on: Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.Role, IllegalArgumentException: Cannot f ind matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.RoleAssociation, IllegalArgumentExceptio n: Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.statistics.DataSample, IllegalArgumentException : Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.UserStory, BulkBeanException: Property i s private (property setEstimatedHoursField)
[java] - no JNDI name configured
[java] - starting update timestamps cache at region: net.sf.hibernate.cache.UpdateTimestampsCache
[java] - starting query cache at region: net.sf.hibernate.cache.QueryCache
[java] Hibernate: select person.id as id, person.last_update as last_upd2_, person.name as name, person.email as em ail, person.phone as phone, person.initials as initials, person.userId as userId, person.password as password, person.is _hidden as is_hidden from person person where (person.userId=? )
[java] - using sysadmin user
[java] Hibernate: select role.id as id, role.role as role, role.lft as lft, role.rgt as rgt from role role where (r ole.role=? )
[java] net.sf.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.technoetic.xplanner.domain.Role.left
[java] at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
[java] at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:222 )
[java] at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2174)
[java] at net.sf.hibernate.loader.Loader.doQuery(Loader.java:240)
[java] at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
[java] at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
[java] at net.sf.hibernate.loader.Loader.list(Loader.java:941)
[java] at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
[java] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
[java] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1491)
[java] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1487)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.initializeRole(BootstrapSystemUser.java: 76)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.run(BootstrapSystemUser.java:44)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.main(BootstrapSystemUser.java:97)
[java] Caused by: java.lang.NullPointerException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:324)
[java] at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:38)
[java] ... 13 more
bootstrap:
upgrade-0.5.3-0.6.0:
[java] - Hibernate 2.1.2
[java] - hibernate.properties not found
[java] - using CGLIB reflection optimizer
[java] - Mapping class: com.technoetic.xplanner.security.auth.Permission -> permission
[java] - Mapping class: com.technoetic.xplanner.domain.RoleAssociation -> person_role
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.RoleAssociation, IllegalArgumentExceptio n: Cannot find matching method/constructor
[java] - Mapping class: com.technoetic.xplanner.statistics.DataSample -> datasample
[java] - reflection optimizer disabled for: com.technoetic.xplanner.statistics.DataSample, IllegalArgumentException : Cannot find matching method/constructor
[java] - Mapping class: com.technoetic.xplanner.domain.Project -> project
[java] - Mapping class: com.technoetic.xplanner.domain.Iteration -> iteration
[java] - Mapping class: com.technoetic.xplanner.domain.UserStory -> story
[java] - Mapping class: com.technoetic.xplanner.domain.Task -> task
[java] - Mapping class: com.technoetic.xplanner.domain.TimeEntry -> time_entry
[java] - Mapping class: com.technoetic.xplanner.domain.Integration -> integration
[java] - Mapping class: com.technoetic.xplanner.domain.Note -> note
[java] - Mapping class: com.technoetic.xplanner.domain.Role -> role
[java] - Mapping class: com.technoetic.xplanner.domain.Person -> person
[java] - Mapping class: com.technoetic.xplanner.history.HistoricalEvent -> history
[java] - Mapping class: com.technoetic.xplanner.file.File -> xfile
[java] - Mapping class: com.technoetic.xplanner.file.Directory -> xdir
[java] - processing one-to-many association mappings
[java] - Mapping collection: com.technoetic.xplanner.domain.Project.iterations -> iteration
[java] - Mapping collection: com.technoetic.xplanner.domain.Iteration.userStories -> story
[java] - Mapping collection: com.technoetic.xplanner.domain.UserStory.tasks -> task
[java] - Mapping collection: com.technoetic.xplanner.domain.Task.timeEntries -> time_entry
[java] - Mapping collection: com.technoetic.xplanner.file.Directory.subdirectories -> xdir
[java] - Mapping collection: com.technoetic.xplanner.file.Directory.files -> xfile
[java] - processing one-to-one association property references
[java] - processing foreign key constraints
[java] - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] - Use outer join fetching: true
[java] - DBCP using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/xplanner
[java] - Connection properties: {user=cvsadmin, password=}
[java] - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not r ecommended)
[java] - Use scrollable result sets: true
[java] - Use JDBC3 getGeneratedKeys(): false
[java] - Optimize cache for minimal puts: false
[java] - echoing all SQL to stdout
[java] - Query language substitutions: {true='Y', false='N'}
[java] - cache provider: net.sf.ehcache.hibernate.Provider
[java] - instantiating and configuring caches
[java] - building session factory
[java] - reflection optimizer disabled for: com.technoetic.xplanner.history.HistoricalEvent, IllegalArgumentExcepti on: Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.Role, IllegalArgumentException: Cannot f ind matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.RoleAssociation, IllegalArgumentExceptio n: Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.statistics.DataSample, IllegalArgumentException : Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.UserStory, BulkBeanException: Property i s private (property setEstimatedHoursField)
[java] - no JNDI name configured
[java] - starting update timestamps cache at region: net.sf.hibernate.cache.UpdateTimestampsCache
[java] - starting query cache at region: net.sf.hibernate.cache.QueryCache
[java] Hibernate: select project.id as id, project.last_update as last_upd2_, project.name as name, project.descrip tion as descript4_, project.is_hidden as is_hidden from project project where (project.is_hidden='N' )
[java] - Hibernate 2.1.2
[java] - hibernate.properties not found
[java] - using CGLIB reflection optimizer
[java] - Mapping class: com.technoetic.xplanner.security.auth.Permission -> permission
[java] - Mapping class: com.technoetic.xplanner.domain.RoleAssociation -> person_role
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.RoleAssociation, IllegalArgumentExceptio n: Cannot find matching method/constructor
[java] - Mapping class: com.technoetic.xplanner.statistics.DataSample -> datasample
[java] - reflection optimizer disabled for: com.technoetic.xplanner.statistics.DataSample, IllegalArgumentException : Cannot find matching method/constructor
[java] - Mapping class: com.technoetic.xplanner.domain.Project -> project
[java] - Mapping class: com.technoetic.xplanner.domain.Iteration -> iteration
[java] - Mapping class: com.technoetic.xplanner.domain.UserStory -> story
[java] - Mapping class: com.technoetic.xplanner.domain.Task -> task
[java] - Mapping class: com.technoetic.xplanner.domain.TimeEntry -> time_entry
[java] - Mapping class: com.technoetic.xplanner.domain.Integration -> integration
[java] - Mapping class: com.technoetic.xplanner.domain.Note -> note
[java] - Mapping class: com.technoetic.xplanner.domain.Role -> role
[java] - Mapping class: com.technoetic.xplanner.domain.Person -> person
[java] - Mapping class: com.technoetic.xplanner.history.HistoricalEvent -> history
[java] - Mapping class: com.technoetic.xplanner.file.File -> xfile
[java] - Mapping class: com.technoetic.xplanner.file.Directory -> xdir
[java] - processing one-to-many association mappings
[java] - Mapping collection: com.technoetic.xplanner.domain.Project.iterations -> iteration
[java] - Mapping collection: com.technoetic.xplanner.domain.Iteration.userStories -> story
[java] - Mapping collection: com.technoetic.xplanner.domain.UserStory.tasks -> task
[java] - Mapping collection: com.technoetic.xplanner.domain.Task.timeEntries -> time_entry
[java] - Mapping collection: com.technoetic.xplanner.file.Directory.subdirectories -> xdir
[java] - Mapping collection: com.technoetic.xplanner.file.Directory.files -> xfile
[java] - processing one-to-one association property references
[java] - processing foreign key constraints
[java] - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
[java] - Use outer join fetching: true
[java] - DBCP using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/xplanner
[java] - Connection properties: {user=cvsadmin, password=}
[java] - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not r ecommended)
[java] - Use scrollable result sets: true
[java] - Use JDBC3 getGeneratedKeys(): false
[java] - Optimize cache for minimal puts: false
[java] - echoing all SQL to stdout
[java] - Query language substitutions: {true='Y', false='N'}
[java] - cache provider: net.sf.ehcache.hibernate.Provider
[java] - instantiating and configuring caches
[java] - building session factory
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.UserStory, BulkBeanException: Property i s private (property setEstimatedHoursField)
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.RoleAssociation, IllegalArgumentExceptio n: Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.history.HistoricalEvent, IllegalArgumentExcepti on: Cannot find matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.domain.Role, IllegalArgumentException: Cannot f ind matching method/constructor
[java] - reflection optimizer disabled for: com.technoetic.xplanner.statistics.DataSample, IllegalArgumentException : Cannot find matching method/constructor
[java] - no JNDI name configured
[java] - starting update timestamps cache at region: net.sf.hibernate.cache.UpdateTimestampsCache
[java] - starting query cache at region: net.sf.hibernate.cache.QueryCache
BUILD SUCCESSFUL
Total time: 18 seconds
> [java] Hibernate: select role.id as id, role.role as role, role.lft as
lft, role.rgt as rgt from role role where (r ole.role=? )
> [java] net.sf.hibernate.PropertyAccessException: Null value was assigned
to a property of primitive type setter of
com.technoetic.xplanner.domain.Role.left
> [java] at net.sf.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicProperty
Accessor.java:42)
> [java]
at net.sf.hibernate.persister.AbstractEntityPersister.setPropertyValues(Abstract
EntityPersister.java:222 )
> [java]
at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2174)
> [java] at net.sf.hibernate.loader.Loader.doQuery(Loader.java:240)
It appears that there is a NULL value in the left (lft) column of the row table. The rgt and lft columns should not be null.
Thanks, for the quick response.
So what are then meaningful default values for rgt/lft columns of role table? The update-script for MySSQL did not contain any constraints for these:
create table role (
id INTEGER not null,
role VARCHAR(255) unique,
parent_id INTEGER,
lft INTEGER,
rgt INTEGER,
primary key (id));
And is there a description of the DB scheme with notes on what are the semantics of columns like those.
Frank-Michael
Providing 0 (zero) as defaults for lft and rgt I get the following exception:
[java] Hibernate: insert into person_role (role_id, person_id, project_id) values (?, ?, ?)
[java] - SQL Error: 0, SQLState: null
[java] - Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] - SQL Error: 0, SQLState: 23505
[java] - ERROR: duplicate key violates unique constraint "person_role_pkey"
[java] - SQL Error: 0, SQLState: null
[java] - Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] - SQL Error: 0, SQLState: 23505
[java] - ERROR: duplicate key violates unique constraint "person_role_pkey"
[java] - Could not execute JDBC batch update
[java] Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:107)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:122)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
[java] at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
[java] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
[java] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
[java] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.run(BootstrapSystemUser.java:56)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.main(BootstrapSystemUser.java:97)
[java] - Could not synchronize database state with session
[java] net.sf.hibernate.JDBCException: Could not execute JDBC batch update
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:129)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
[java] at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
[java] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
[java] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
[java] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.run(BootstrapSystemUser.java:56)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.main(BootstrapSystemUser.java:97)
[java] Caused by: Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:107)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:122)
[java] ... 11 more
[java] net.sf.hibernate.JDBCException: Could not execute JDBC batch update
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:129)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:59)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:56)
[java] at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:109)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:460)
[java] at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:442)
[java] at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
[java] at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2382)
[java] at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2335)
[java] at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2204)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.run(BootstrapSystemUser.java:56)
[java] at com.technoetic.xplanner.security.install.BootstrapSystemUser.main(BootstrapSystemUser.java:97)
[java] Caused by: Batch-Anweisung Nummer 0 (insert into person_role (role_id, person_id, project_id) values () wurde abgebrochen.
[java] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:107)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeBatch(DelegatingPreparedStatement.java:203)
[java] at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
[java] at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:122)
[java] ... 11 more
The columns should have "not null" constraints. The roles are initialized in the BootstrapSystemUser class which is invoked (indirectly) by the upgrade-0.5.3-0.6.0 Ant target. That's why I was asking if you had run this target. I'm not sure why you are manually trying to insert rgt,lft column values in the table. It will definitely not work correctly with zeros placed in those columns.
I did the upgrade manually because I'm not upgrading from 0.5.3, as I already said, but from another 0.6pre version to the current one. So I have first translate sql/mysql/xplanner_0-5-3_to_0-6-0.sql tp porstgres dialect and the I picked out the necessary sql statements to synchronize the schemes.
But the good news is that after setting lft and rgt to zero and then running the upgrade-0.5.3-0.6.0 Ant task everything works fine.
Thank you for your help.
> It will definitely not work correctly
> with zeros placed in those columns.
What exactly will work incorrectly? And how can I initialize these values correctly?
Frank-Michael
Create the empty table using your modified SQL script. Run the upgrade Ant target. The Ant target will create the roles with the correct rgt,lft values.
What you described worked fine. I only had to update the person_role table with the new role_ids.
Thank you again.
Frank-Michael