Importing data causes error

Thomas Reimer, geändert vor 12 Jahren.

Importing data causes error

Youngling Beiträge: 9 Beitrittsdatum: 11.11.10 Neueste Beiträge
Hi everyone,

I recently set up a new Klaros 3.6.1 server on maschine B and tried to import the project data from the production server A running a Klaros 3.4.6. For this I used an exported project backup xml file. The import failes with the following error messages on the status bar:

Fehler beim Importieren des Projektes: xyz1 : P00001
Fehler beim Importieren des Projektes: xyz2 : P00002
...
Fehler beim Importieren des Projektes: xyzn : P0000n

The following exception is thrown:

2012-06-05 14:37:50: ERROR, org.jboss.seam.transaction.SynchronizationRegistry, http-18080-5 Exception processing transaction Synchronization after completion
org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: de.verit.klaros.core.persistent.TestCaseStepFragment; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: de.verit.klaros.core.persistent.TestCaseStepFragment
    at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:671) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:512) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.orm.hibernate3.HibernateTemplate.get(HibernateTemplate.java:506) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at de.verit.klaros.core.dao.hibernate.HibernateDAO.get(HibernateDAO.java:152) ~[klaros-migration-3.6.1.jar:3.6.1]
    at de.verit.klaros.core.dao.hibernate.HibernateDAO.get(HibernateDAO.java:49) ~[klaros-migration-3.6.1.jar:3.6.1]
    at de.verit.klaros.web.service.categorization.BaseCategorizationService.getCategoryTreeSelection(BaseCategorizationService.java:117) ~[BaseCategorizationService.class:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_31]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_31]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_31]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_31]
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at de.verit.klaros.web.service.categorization.SUTCategorizationService_$$_javassist_seam_56.getCategoryTreeSelection(SUTCategorizationService_$$_javassist_seam_56.java) ~[SUTCategorizationService.class:na]
    at de.verit.klaros.web.beans.base.BaseCategoryBean.loadSUTCategoryDropDown(BaseCategoryBean.java:1089) ~[BaseCategoryBean.class:na]
    at de.verit.klaros.web.beans.pages.define.AssignSUTToCategoryBean.loadCategoryTree_aroundBody0(AssignSUTToCategoryBean.java:148) ~[AssignSUTToCategoryBean.class:na]
    at de.verit.klaros.web.beans.pages.define.AssignSUTToCategoryBean.loadCategoryTree_aroundBody1$advice(AssignSUTToCategoryBean.java:85) ~[AssignSUTToCategoryBean.class:na]
    at de.verit.klaros.web.beans.pages.define.AssignSUTToCategoryBean.loadCategoryTree(AssignSUTToCategoryBean.java:1) ~[AssignSUTToCategoryBean.class:na]
    at de.verit.klaros.web.beans.base.BaseCategoryBean.categorySelectionListener(BaseCategoryBean.java:1158) ~[BaseCategoryBean.class:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_31]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_31]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_31]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_31]
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at de.verit.klaros.web.beans.pages.define.AssignSUTToCategoryBean_$$_javassist_seam_67.categorySelectionListener(AssignSUTToCategoryBean_$$_javassist_seam_67.java) ~[AssignSUTToCategoryBean.class:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_31]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_31]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_31]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_31]
    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.Component.callComponentMethod(Component.java:2275) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.core.Events.raiseEvent(Events.java:85) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.async.AsynchronousEvent$1.process(AsynchronousEvent.java:33) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.async.Asynchronous$ContextualAsynchronousRequest.run(Asynchronous.java:80) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.async.AsynchronousEvent.execute(AsynchronousEvent.java:27) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.async.TransactionCompletionEvent.afterCompletion(TransactionCompletionEvent.java:20) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.transaction.SynchronizationRegistry.afterTransactionCompletion(SynchronizationRegistry.java:42) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.transaction.SeSynchronizations.afterTransactionCommit(SeSynchronizations.java:37) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.ioc.spring.SpringTransaction.commit(SpringTransaction.java:130) [jboss-seam-ioc-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:612) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:603) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:344) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:244) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:195) [jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175) [jsf-impl-1.2_14.jar:1.2_14-b01-FCS]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114) [jsf-impl-1.2_14.jar:1.2_14-b01-FCS]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-1.2_14.jar:1.2_14-b01-FCS]
    at de.verit.klaros.web.beans.application.lifecycle.LifecycleImpl.render(LifecycleImpl.java:125) [LifecycleImpl.class:na]
    at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:132) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:74) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:31) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.servlet.SessionVerifier.service(SessionVerifier.java:26) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23) [icefaces-1.8.2-1.jar:na]
    at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131) [icefaces-1.8.2-1.jar:na]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java) [servlet-api.jar:na]
    at de.verit.klaros.web.servlet.ExceptionHandlingPersistentFacesServlet.service(ExceptionHandlingPersistentFacesServlet.java:47) [ExceptionHandlingPersistentFacesServlet.class:na]
    at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:56) [icefaces-1.8.2-1.jar:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java) [catalina.jar:6.0.32]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java) [catalina.jar:6.0.32]
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:197) [javamelody-core-1.37.0.jar:1.37.0]
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:171) [javamelody-core-1.37.0.jar:1.37.0]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java) [catalina.jar:6.0.32]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java) [catalina.jar:6.0.32]
    at de.verit.klaros.web.beans.interceptor.TimingFilter.doFilter(TimingFilter.java:48) [TimingFilter.class:na]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java) [catalina.jar:6.0.32]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java) [catalina.jar:6.0.32]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java) [catalina.jar:6.0.32]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java) [catalina.jar:6.0.32]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java) [catalina.jar:6.0.32]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java) [catalina.jar:6.0.32]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java) [catalina.jar:6.0.32]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java) [catalina.jar:6.0.32]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java) [catalina.jar:6.0.32]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java) [tomcat-coyote.jar:6.0.32]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java) [tomcat-coyote.jar:6.0.32]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java) [tomcat-coyote.jar:6.0.32]
    at java.lang.Thread.run(Thread.java:662) [na:1.6.0_31]
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: de.verit.klaros.core.persistent.TestCaseStepFragment
    at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:243) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.type.EntityType.getIdentifier(EntityType.java:456) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:121) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(AbstractCollectionPersister.java:815) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractCollectionPersister.java:1203) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.action.CollectionRecreateAction.execute(CollectionRecreateAction.java:58) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:188) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
    at org.hibernate.search.impl.FullTextSessionImpl.flush(FullTextSessionImpl.java:388) ~[hibernate-search-3.3.0.Final.jar:3.3.0.Final]
    at sun.reflect.GeneratedMethodAccessor556.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_31]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_31]
    at org.jboss.seam.persistence.HibernateSessionInvocationHandler.invoke(HibernateSessionInvocationHandler.java:82) ~[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
    at $Proxy89.flush(Unknown Source) ~[na:na]
    at sun.reflect.GeneratedMethodAccessor556.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_31]
    at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_31]
    at org.jboss.seam.ioc.spring.SeamManagedSessionFactoryBean$SeamManagedSessionHandler.invoke(SeamManagedSessionFactoryBean.java:300) ~[jboss-seam-ioc-2.2.2.Final.jar:2.2.2.Final]
    at $Proxy90.flush(Unknown Source) ~[na:na]
    at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:407) ~[spring-orm-3.1.1.RELEASE.jar:3.1.1.RELEASE]
    ... 105 common frames omitted


The error appears both with the out-of-the-box DerbyDB and a clean mysql klaros database.

Regards,
Thomas
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: Importing data causes error

Jedi Council Member Beiträge: 759 Beitrittsdatum: 12.02.09 Neueste Beiträge
Hi Thomas,

is it possible to send the export file for analysis to support@verit.de ?

If you have concerns about sending internal data - the XSLT script found here should be able to hide all sensitive information in the dump.

Please note that the import export feature is currently quite limited in functionality and omits some information during the process (Most notably users).

We currently recommend using database backup/restore methods for production use (e.g. mysqldump).

Hope this helps,

Torsten
thumbnail
Torsten Stolpmann, geändert vor 12 Jahren.

RE: Importing data causes error

Jedi Council Member Beiträge: 759 Beitrittsdatum: 12.02.09 Neueste Beiträge
This issue (KLAROS-1656) is supposed to be fixed with the 3.6.5 release.

Thanks for reporting!

Regards,

Torsten
Thomas Reimer, geändert vor 12 Jahren.

RE: Importing data causes error

Youngling Beiträge: 9 Beitrittsdatum: 11.11.10 Neueste Beiträge
Hi Torsten,

seems to be working properly now in the recent release. Thanks for the quick solving of the problem.

Regards,
Thomas