#1219 closed defect (fixed)
Deleting the active project results in ItemNotFoundException in subsequent operations
Reported by: | Jari Häkkinen | Owned by: | everyone |
---|---|---|---|
Priority: | trivial | Milestone: | BASE 2.9.1 |
Component: | core | Version: | 2.9 |
Keywords: | Cc: |
Description
I get the below stacktrace. I cannot share the items at all now. Also, I cannot remove the project from the share list since the project is gone.
Basically a project should not be deletable as long as items are share to the project. I suppos this is true for users and groups.
net.sf.basedb.core.ItemNotFoundException: Item not found: Project[id=9] net.sf.basedb.core.Project.getById(Project.java:133) net.sf.basedb.core.DbControl.commit(DbControl.java:330) org.apache.jsp.common.share.submit_005fshare_jsp._jspService(submit_005fshare_jsp.java:121) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70)
Change History (8)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
Summary: | Sharing problem when items are to a project that was deleted and removed from trashcan → Sharing problem with items shared to a project that was deleted and removed from trashcan |
---|
comment:3 by , 16 years ago
Summary: | Sharing problem with items shared to a project that was deleted and removed from trashcan → Deleting the active project results in ItemNotFoundException in subsequent operations |
---|
I don't think this has anything to do with sharing at all. It seems to be caused by deleting the currently active project. Steps to reproduce:
- Create a new project
- Make it the active project
- Delete the project and remove it from the trashcan
- Now, almost anything you try to do that updates the database will result in the above exception. For example, try to create a new item of any type.
The workaround is simple: Select a different project as the active project or use no active project at all.
comment:4 by , 16 years ago
Priority: | major → trivial |
---|
Basically a project should not be deletable as long as items are share to the project. I suppos this is true for users and groups.
No, sharing doesn't block deletion of users, groups or projects. The links are automatically removed from the database.
comment:5 by , 16 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You are right. I have now successfully removed the share icon from the web gui. It was still there even though the project was deleted and in consequence the items where not shared any more. I simply selected to share the items and saved without any other interaction. This got the share icon disappear.
comment:6 by , 16 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I think the active project info should be reset if the project is deleted.
comment:7 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
(In [4706]) Fixes #1219: Deleting the active project results in ItemNotFoundException in subsequent operations
comment:8 by , 16 years ago
Milestone: | → BASE 2.9.1 |
---|
I tried to delete the files but this is not allowed and gives this stacktrace:
So, I tried to trick BASE by deleting the parent directory but it gives the same error message.