bjsion / tongue-tied

Translation and resource management tool
1 stars 0 forks source link

Import of translations causes error #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Import an excel file that contain new translations (not just updates to
exsiting translations)
2. click import

What is the expected output? What do you see instead?
The import to be successful and the user returned to the keyword screen.
Instead the following error is given:

An internal error has occurred in the system. The action you were
attempting cannot be recovered. Please inform your system administrator.

    org.springframework.dao.InvalidDataAccessApiUsageException: object
references an unsaved transient instance - save the transient instance
before merging: org.tonguetied.keywordmanagement.Keyword; nested exception
is org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before merging:
org.tonguetied.keywordmanagement.Keyword

org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessExc
eption(SessionFactoryUtils.java:636)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessExcep
tion(HibernateAccessor.java:412)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate
.java:424)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(Hi
bernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.merge(HibernateTemplate.jav
a:820)
org.tonguetied.keywordmanagement.KeywordRepositoryImpl.saveOrUpdate(KeywordRepos
itoryImpl.java:255)
org.tonguetied.keywordmanagement.KeywordServiceImpl.saveOrUpdate(KeywordServiceI
mpl.java:189)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:310)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:204)
$Proxy31.saveOrUpdate(Unknown Source)
org.tonguetied.datatransfer.importing.ExcelImporter.doImport(ExcelImporter.java:
150)
org.tonguetied.datatransfer.importing.ExcelImporter.doImport(ExcelImporter.java:
68)
org.tonguetied.datatransfer.importing.Importer.importData(Importer.java:72)
org.tonguetied.datatransfer.DataServiceImpl.importData(DataServiceImpl.java:289)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:310)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:182)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:149)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:106)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:171)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:204)
$Proxy33.importData(Unknown Source)
org.tonguetied.web.ImportController.onSubmit(ImportController.java:81)
org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(S
impleFormController.java:267)
org.springframework.web.servlet.mvc.CancellableFormController.processFormSubmiss
ion(CancellableFormController.java:140)
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal
(AbstractFormController.java:265)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractCon
troller.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(Simple
ControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.j
ava:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.ja
va:809)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet
.java:571)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:51
1)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1093)
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119
)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1084)
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestCont
extFilter.java:83)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilte
r.java:76)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1084)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:359)
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(Filt
erSecurityInterceptor.java:109)
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(Fi
lterSecurityInterceptor.java:83)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(Exceptio
nTranslationFilter.java:101)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHt
tp(RememberMeProcessingFilter.java:116)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doF
ilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractPr
ocessingFilter.java:268)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.ja
va:87)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(Ses
sionFixationProtectionFilter.java:61)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilte
rHttp(HttpSessionContextIntegrationFilter.java:235)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilt
er.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:371)
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.jav
a:174)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFi
lterProxy.java:236)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterPr
oxy.java:167)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.jav
a:1084)
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollecti
on.java:206)
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
org.mortbay.jetty.Server.handle(Server.java:324)
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842)
org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Original issue reported on code.google.com by bjs...@gmail.com on 9 Jun 2009 at 2:15

GoogleCodeExporter commented 9 years ago
The cause of this error is because the detached object cannot be merged into the
hibernate session because it contains a new translation. It requires the object 
to be
saved using the session.saveOrUpdate() method

Original comment by bjs...@gmail.com on 9 Jun 2009 at 2:32

GoogleCodeExporter commented 9 years ago

Original comment by bjs...@gmail.com on 16 Jun 2009 at 3:53