belogz / swe574-group1

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

createNewVersionOfRecipe method failed. #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I received following exception (with full stack trace)

[EL Warning]: 2014-05-30 
01:09:18.231--UnitOfWork(1491308462)--java.lang.IllegalStateException: During 
synchronization a new object was found through a relationship that was not 
marked cascade PERSIST: BaseEntity [id:null].
javax.persistence.RollbackException: java.lang.IllegalStateException: During 
synchronization a new object was found through a relationship that was not 
marked cascade PERSIST: BaseEntity [id:null].
    at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102)
    at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63)
    at edu.boun.swe574.fsn.backend.db.dao.BaseDao.commit(BaseDao.java:148)
    at edu.boun.swe574.fsn.backend.db.dao.BaseDao.save(BaseDao.java:29)
    at edu.boun.swe574.fsn.backend.ws.FoodsService.createNewVersionOfRecipe(FoodsService.java:204)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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:646)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: During synchronization a new object 
was found through a relationship that was not marked cascade PERSIST: 
BaseEntity [id:null].
    at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.discoverAndPersistUnregisteredNewObjects(UnitOfWorkImpl.java:4104)
    at org.eclipse.persistence.mappings.ObjectReferenceMapping.cascadeDiscoverAndPersistUnregisteredNewObjects(ObjectReferenceMapping.java:873)
    at org.eclipse.persistence.mappings.ObjectReferenceMapping.cascadeDiscoverAndPersistUnregisteredNewObjects(ObjectReferenceMapping.java:851)
    at org.eclipse.persistence.internal.descriptors.ObjectBuilder.cascadeDiscoverAndPersistUnregisteredNewObjects(ObjectBuilder.java:1788)
    at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.discoverAndPersistUnregisteredNewObjects(UnitOfWorkImpl.java:4107)
    at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.discoverUnregisteredNewObjects(RepeatableWriteUnitOfWork.java:289)
    at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:690)
    at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1496)
    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)

Original issue reported on code.google.com by esinkara...@gmail.com on 29 May 2014 at 10:12

GoogleCodeExporter commented 8 years ago
fixed

Original comment by esinkara...@gmail.com on 30 May 2014 at 9:42

GoogleCodeExporter commented 8 years ago

Original comment by esinkara...@gmail.com on 30 May 2014 at 9:42