I am sorry but I don't have any clue about what causes this. It seems like there is a reference to a user with ID=5 in your database, except that there is no user with that ID. The database is supposed to keep track of such things and it should really be impossible to have a reference to a non-existing item. From the information in the error message I think the problematic reference (if there is one) should be found in the UserRoles table. Can you check this table if there is a row that has user_id=5 and also verify if there is (or isn't) a row in the Users table that has id=5?
Then, there is a tool distributed with BASE that will print out a lot of details about the database. Got to 'bin' directory of the BASE distribution and execute: ./dbinfo.sh -v This will generate a lot of output, but the interesting part is the part with information about the UserRoles table. Below is an example from my own BASE installation. The thing that is important for the current problem is the presence of the 'foreign key' that references the Users table. ================= Table : UserRoles Catalog : null Schema : null Database information -------------------- Column : user_id INT(10) NOT NULL Column : role_id INT(10) NOT NULL Primary key : PRIMARY [role_id, user_id] Foreign key : FK8AF579929B83E0E [user_id] REFERENCES Users [id] Foreign key : FK8AF57992648D2CAE [role_id] REFERENCES Roles [id] Unique : PRIMARY [user_id, role_id] Index : FK8AF57992648D2CAE [role_id] Index : FK8AF579929B83E0E [user_id] Hibernate information --------------------- So, to summarize there are three questions: 1. Are there any rows in the UserRoles table that has user_id=5? 2. Is there any row in the Users table that has id=5? 3. Is there a foreign key in the UserRoles table that references the Users table? /Nicklas Offord, Victoria wrote: > Hi, > > > > When trying to add a user to BASE I am getting the following error. > This has never happened before!! Any assistance would be much appreciated J > > > > Version > > > > BASE 2.8.4 (build #4603; schema #63) > > Web server > > > > Apache Tomcat/6.0.18 > > Database Server > > > > MySQL 5.0.45 > > Database Dialect > > > > org.hibernate.dialect.MySQLInnoDBDialect > > JDBC Driver > > > > com.mysql.jdbc.Driver (version 5.1) > > Java runtime > > > > Java(TM) SE Runtime Environment (1.6.0_10-b33), Sun Microsystems Inc. > <http://java.sun.com/> > > Operating system > > > > Linux i386 2.6.18-128.el5PAE > > Memory > > > > Total: 100.1 MB > Free: 26.2 MB > Max: 481.5 MB > > Browser > > > > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.7) > Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729) > > Error message > > > > No row with the given identifier exists: > [net.sf.basedb.core.data.UserData#5] > > Stack trace > > > > org.hibernate.ObjectNotFoundException > > ...at > org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377) > > ...at > org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:145) > > ...at > org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:179) > > ...at > org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103) > > ...at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878) > > ...at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846) > > ...at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557) > > ...at org.hibernate.type.EntityType.resolve(EntityType.java:379) > > ...at org.hibernate.type.EntityType.nullSafeGet(EntityType.java:204) > > ...at > org.hibernate.persister.collection.AbstractCollectionPersister.readElement(AbstractCollectionPersister.java:703) > > ...at org.hibernate.collection.PersistentSet.readFrom(PersistentSet.java:318) > > ...at org.hibernate.loader.Loader.readCollectionElement(Loader.java:1008) > > ...at org.hibernate.loader.Loader.readCollectionElements(Loader.java:646) > > ...at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:591) > > ...at org.hibernate.loader.Loader.doQuery(Loader.java:701) > > ...at > org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) > > ...at org.hibernate.loader.Loader.loadCollection(Loader.java:1994) > > ...at > org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) > > ...at > org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565) > > ...at > org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60) > > ...at > org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716) > > ...at > org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344) > > ...at org.hibernate.collection.PersistentSet.add(PersistentSet.java:189) > > ...at User.addDefultRolesAndGroups(User.java:191) > > ...at User.addToDefaultRolesAndGroups(User.java:931) > > ...at org.apache.jsp.admin.users.index_jsp._jspService(index_jsp.java:186) > > ...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > > ...at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > ...at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) > > ...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) > > ...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) > > ...at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > ...at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > > ...at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > > ...at > net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:72) > > ...at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > > ...at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > > ...at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > > ...at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > > ...at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > > ...at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > > ...at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > > ...at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) > > ...at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) > > ...at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) > > ...at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) > > ...at java.lang.Thread.run(Unknown Source) > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > > > ------------------------------------------------------------------------ > > _______________________________________________ > The BASE general discussion mailing list > basedb-users@lists.sourceforge.net > unsubscribe: send a mail with subject "unsubscribe" to > basedb-users-requ...@lists.sourceforge.net ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject "unsubscribe" to basedb-users-requ...@lists.sourceforge.net