I submitted this bug report to the SF issue tracker.
I'm using JTrac 2.1.0. When I created an issue, I included a test
user in the list of users to email about the issue (checked the
checkbox). I created three issues with this user and added one or two
comments to each issue with the user checked in each one. I then
deleted the user. Now I get an internal error when I try to view the
issue. The error is below.
It looks like the item_users table isn't getting properly updated when
a user is deleted. I performed the following SQL commands (in mysql)
and the error went away. User_id 14 is the user I deleted and the
issues are in space_id 9. I wasn't clear what the rows in item_users
that have a NULL item_id are for, but I deleted all rows with user_id
14 and it worked.
mysql> select id,sequence_num,time_stamp from items where space_id=9;
+-----+--------------+---------------------+
| id | sequence_num | time_stamp |
+-----+--------------+---------------------+
| 164 | 1 | 2008-07-03 14:36:15 |
| 165 | 2 | 2008-07-03 14:38:25 |
| 166 | 3 | 2008-07-03 14:49:43 |
+-----+--------------+---------------------+
3 rows in set (0.00 sec)
mysql> select * from item_users where user_id=14;
+-----+---------+------+---------+
| id | user_id | type | item_id |
+-----+---------+------+---------+
| 132 | 14 | 0 | NULL |
| 136 | 14 | 0 | 164 |
| 140 | 14 | 0 | NULL |
| 144 | 14 | 0 | 165 |
| 148 | 14 | 0 | NULL |
| 152 | 14 | 0 | NULL |
| 156 | 14 | 0 | 166 |
+-----+---------+------+---------+
7 rows in set (0.00 sec)
mysql> delete from item_users where user_id=14;
Query OK, 7 rows affected (0.00 sec)
Here is the error log:
8588 [main] INFO org.mortbay.log - Started
SelectChannelConnector@...:8080
2008-07-03 15:05:49,209 [btpool0-8] ERROR
[org.apache.wicket.RequestCycle] - Exception in rendering component:
[MarkupContainer [Component id = itemUsers, page =
info.jtrac.wicket.ItemViewPage, path =
2:itemViewFormPanel:form:itemUsers.JtracCheckBoxMultipleChoice,
isVisible = true, isVersioned = false]]
org.apache.wicket.WicketRuntimeException: Exception in rendering
component: [MarkupContainer [Component id = itemUsers, page =
info.jtrac.wicket.ItemViewPage, path =
2:itemViewFormPanel:form:itemUsers.JtracCheckBoxMultipleChoice,
isVisible = true, isVersioned = false]]
at org.apache.wicket.Component.renderComponent(Component.java:2497)
at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1354)
at org.apache.wicket.Component.render(Component.java:2296)
at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1240)
...
Caused by: org.hibernate.ObjectNotFoundException: No row with the
given identifier exists: [info.jtrac.domain.User#14]
at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377)
at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:79)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:68)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
at info.jtrac.domain.User$$EnhancerByCGLIB$$3e50bc85.hashCode(<generated>)
at info.jtrac.domain.ItemUser.hashCode(ItemUser.java:101)
at java.util.HashMap.put(HashMap.java:372)
at java.util.HashSet.add(HashSet.java:200)
at java.util.AbstractCollection.addAll(AbstractCollection.java:305)
at org.hibernate.collection.PersistentSet.endRead(PersistentSet.java:329
Hopefully this bug can get squashed!
Thanks,
Tauren
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at
http://www.sourceforge.net/community/cca08_______________________________________________
j-trac-users mailing list
j-trac-users@...
https://lists.sourceforge.net/lists/listinfo/j-trac-users