widerules / swe574-group1

Automatically exported from code.google.com/p/swe574-group1
0 stars 0 forks source link

Updating user profile, gets a validation exception #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Save a user profile
2. Try to update the profile again

Root cause:

org.eclipse.persistence.exceptions.ValidationException: 
Exception Description: The attribute [id] of class 
[edu.boun.swe574.fsn.backend.db.model.User] is mapped to a primary key column 
in the database. Updates are not allowed.
     at org.eclipse.persistence.exceptions.ValidationException.primaryKeyUpdateDisallowed(ValidationException.java:2393)
     at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.writeFromObjectIntoRowWithChangeRecord(AbstractDirectMapping.java:1342)
     at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildRowForUpdateWithChangeSet(ObjectBuilder.java:1206)
     at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:1126)
     at org.eclipse.persistence.queries.UpdateObjectQuery.executeCommitWithChangeSet(UpdateObjectQuery.java:84)
     at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:291)
     at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
     at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:808)
     at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:711)
     at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108)
     at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85)
     at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2842)
     at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1521)
     at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1503)
     at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)
     at org.eclipse.persistence.internal.sessions.CommitManager.commitChangedObjectsForClassWithChangeSet(CommitManager.java:265)
     at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsForClassWithChangeSet(CommitManager.java:190)
     at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:136)
     at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3766)
     at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1404)
     at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:616)
     at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1511)
     at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:264)
     at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1130)
     at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84)
     at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
     at edu.boun.swe574.fsn.backend.db.dao.BaseDao.commit(BaseDao.java:147)
     at edu.boun.swe574.fsn.backend.db.dao.BaseDao.update(BaseDao.java:42)
     at edu.boun.swe574.fsn.backend.ws.NetworkService.editProfile(NetworkService.java:145)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at com.sun.xml.ws.api.server.InstanceResolver$1.invoke(InstanceResolver.java:210)
     at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:132)
     at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:241)
     at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:74)
     at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
     at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
     at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
     at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
     at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:226)
     at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:375)
     at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:175)
     at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:134)
     at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:159)
     at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:49)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:301)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:74)
     at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1015)
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
     at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     at java.lang.Thread.run(Thread.java:744)

Original issue reported on code.google.com by turkmen...@gmail.com on 1 Jun 2014 at 2:24

GoogleCodeExporter commented 9 years ago
reassigning to esin. this screen might not be performing excellently.

Original comment by turkmen...@gmail.com on 1 Jun 2014 at 2:34

GoogleCodeExporter commented 9 years ago
I can not reproduce this problem. This feature works fine.

Original comment by esinkara...@gmail.com on 1 Jun 2014 at 6:44