id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 1925,ObjectNotFoundException when creating a new project default protocol that is replacing an older protocol,Nicklas Nordborg,everyone,"This is more or less the same problem as #1855 but a bit more complicated to reproduce. 1. Create a project and make it the active project 2. Create a protocol and add it as a default protocol to the project 3. Delete the protocol and clean the trashcan 4. Create a second protocol and add it as the default protocol to the project 5. Create a third protocol and replace the the existing default protocol. When saving you get an error message like the one below: {{{ No row with the given identifier exists: [net.sf.basedb.core.data.ProtocolData#752318] org.hibernate.ObjectNotFoundException ...at org.hibernate.internal.SessionFactoryImpl$1$1.handleEntityNotFound(SessionFactoryImpl.java:253) ...at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:262) ...at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:176) ...at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:286) ...at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:185) ...at data.ProtocolData_$$_jvstf1_2.getItemSubtype(ProtocolData_$$_jvstf1_2.java) ...at Project.replaceDefaultItem(Project.java:696) }}} The `ProtocolData#752318` is the id of the first protocol that was deleted. Workaround is to go to the View -> Projects page and enter the current project. This will automatically remove the link to the non-existing item. ",defect,closed,trivial,BASE 3.4.2,core,,fixed,,